Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Not able to get owned by attribute through OSLC API in rest client

Hi Team,
We are working on RTC 7.0.2 SR1. We are trying to get Resolver and owner IDs through OSLC Query 
Below is the query:
Method: GET
Headers-
Accept: application/rdf+xml
OSLC-Core-Version: 2.0
When we are trying this query in web browser we are getting below result
<dc:identifier>148</dc:identifier>
<rtc_cm:ownedBy rdf:resource="https://Servername/jts/users/USerID"/>
<rtc_cm:resolvedBy rdf:resource="https://Servername/jts/users/unassigned"/>
</oslc_cm:ChangeRequest>
</oslc_cm:Collection>
it contains both resolved by and owned by tags available which is expected answer
but when we are trying through Rest client we are giving below output:
<rdf:RDF
    xmlns:dcterms="http://purl.org/dc/terms/"
    xmlns:oslc_cm="http://open-services.net/ns/cm#"
        <rdf:type rdf:resource="http://open-services.net/ns/cm#ChangeRequest"/>
        <rtc_cm:resolvedBy rdf:resource="https://Servername/jts/users/unassigned"/>
    </rdf:Description>
    </rdf:Description>
        <dcterms:title>Work Items</dcterms:title>
        <oslc:totalCount>1</oslc:totalCount>
        <rdf:type rdf:resource="http://open-services.net/ns/core#ResponseInfo"/>
    </rdf:Description>
</rdf:RDF>
Here we are getting only resolved by attribute value and not owned by attribute
Why these are giving different results.
Please help us if anything is missing from API client

Thanks

0 votes

Comments
Using the web browser you can't be providing those two headers, so you get non-OSLC response. In the REST client query, try putting oslc.select=* do you get the resolved property? Do you really only have one workitem?

Yes I can able to get resolved by data but not owned by. This is very new project with only one workitem 


Accepted answer

Permanent link

 I OSLC GET a work item with OSLC-Core_Version=2.0 and Accept=application/xml+rdf and there is no rtc_cm:ownedBy attribute. I looked into the resource shape and there is no either.


I found 
    <oslc:propertyDefinition rdf:resource="http://purl.org/dc/terms/contributor"/>
    <dcterms:title rdf:parseType="Literal">Owned By</dcterms:title>

in the resource shape and

dcterms:contributor in the work item like

    <dcterms:contributor rdf:resource="https://elm.example.com:3443/jts/users/bob"/>

KT PD selected this answer as the correct answer

0 votes


One other answer

Permanent link

Using 7.0.2 iFix023 - AFAICT it's dcterms:creator rather than rtc_cm:owner, but rtc_cm:resolvedBy works.


So this query with headers as you use (querying just for a WI id of 2):
Returns:

<rdf:RDF
    xmlns:dcterms="http://purl.org/dc/terms/"
    xmlns:oslc_cm="http://open-services.net/ns/cm#"
  </rdf:Description>
    <dcterms:title>Work Items</dcterms:title>
    <oslc:totalCount>1</oslc:totalCount>
    <rdf:type rdf:resource="http://open-services.net/ns/core#ResponseInfo"/>
  </rdf:Description>
    <rdf:type rdf:resource="http://open-services.net/ns/cm#ChangeRequest"/>
    <dcterms:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">2</dcterms:identifier>
    <rtc_cm:resolvedBy rdf:resource="https://jazz.ibm.com:9443/jts/users/unassigned"/>
    <dcterms:creator rdf:resource="https://jazz.ibm.com:9443/jts/users/deb"/>
  </rdf:Description>
</rdf:RDF>


0 votes

Comments
Its mean that creator and owner will be same?

there's no mention of 'owner' even is using oslc.select=* 

No, there is no dcterms:contributor statement, so that work item currently has no owner. The creator is specified by dcterms:creator and usually does not change after creation. Those two properties are orthogonal. See the OSLC Change Management specification at https://docs.oasis-open-projects.org/oslc-op/cm/v3.0/os/change-mgt-shapes.html for details.

1 vote

Ah yes what is Owner in the EWM UI is dcterms:contributor in the OSLC Query results RDF/XML.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Jul 13 '23, 5:46 a.m.

Question was seen: 1,481 times

Last updated: Jul 13 '23, 11:43 a.m.

Related questions
Confirmation Cancel Confirm