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

Adding custom attribute links via OSLC

The guidance on the wiki to me to the point where I could add links via the built in types without a problem. https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2#Adding_Links_to_a_Work_Item

Now I have added a custom attribute of type "Work Item List" that exposes the same sort of collection ref when fetched, but I get 405 errors with no message when I try to post a new link.

With a custom attribute:

colURL = 'https://wincqserver:9445/rtc/oslc/workitems/2777/rtc_cm:com.ibm.rational.utl.request.attrib.otps'

linkJSON = '''{
"rdf:resource" : "https:\/\/wincqserver:9445\/rtc\/oslc\/workitems\/2774"
}'''
print( jazz.postJSON( colURL, linkJSON ) )
print ( jazz.getQueryResults(projectName, '?oslc_cm.query=dc:identifier=%222777%22&oslc_cm.properties=oslc_cm:relatedChangeManagement,rtc_cm:com.ibm.rational.utl.request.attrib.otps') )


Returns

{'accept': 'text/json',
'content-type': 'application/x-oslc-cm-change-request+json',
'cookie': 'JSESSIONID=D27D60C082F20F8F7829781EC43FE303; Path=/rtc; Secure, JazzFormAuth=Form; Path=/rtc'}
{
"oslc_cm:message": null,
"oslc_cm:status": 405
}
https://wincqserver:9445/rtc/oslc/contexts/_v-iPIIO2Ed-ec4_ZoGHE4w/workitems?oslc_cm.query=dc:identifier=%222777%22&oslc_cm.properties=oslc_cm:relatedChangeManagement,rtc_cm:com.ibm.rational.utl.request.attrib.otps
{"oslc_cm:results":[{"rdf:resource":"https:\/\/wincqserver:9445\/rtc\/resource\/itemName\/com.ibm.team.workitem.WorkItem\/2777","rtc_cm:com.ibm.rational.utl.request.attrib.otps":[],"oslc_cm:relatedChangeManagement":[]}],"oslc_cm:totalCount":1}


So with a built in link type all is well.

colURL = 'https://wincqserver:9445/rtc/oslc/workitems/2777/oslc_cm:relatedChangeManagement'

linkJSON = '''{
"rdf:resource" : "https:\/\/wincqserver:9445\/rtc\/oslc\/workitems\/2774"
}'''
print( jazz.postJSON( colURL, linkJSON ) )
print ( jazz.getQueryResults(projectName, '?oslc_cm.query=dc:identifier=%222777%22&oslc_cm.properties=oslc_cm:relatedChangeManagement,rtc_cm:com.ibm.rational.utl.request.attrib.otps') )


Returns without error and the link is present on the WI.

{'accept': 'text/json',
'content-type': 'application/x-oslc-cm-change-request+json',
'cookie': 'JSESSIONID=D95481D785E69F1D43373094CB495FDD; Path=/rtc; Secure, JazzFormAuth=Form; Path=/rtc'}
{"rdf:resource":"https:\/\/wincqserver:9445\/rtc\/oslc\/workitems\/2774","oslc_cm:label":""}
https://wincqserver:9445/rtc/oslc/contexts/_v-iPIIO2Ed-ec4_ZoGHE4w/workitems?oslc_cm.query=dc:identifier=%222777%22&oslc_cm.properties=oslc_cm:relatedChangeManagement,rtc_cm:com.ibm.rational.utl.request.attrib.otps
{"oslc_cm:results":[{"rdf:resource":"https:\/\/wincqserver:9445\/rtc\/resource\/itemName\/com.ibm.team.workitem.WorkItem\/2777","rtc_cm:com.ibm.rational.utl.request.attrib.otps":[],"oslc_cm:relatedChangeManagement":[{"rdf:resource":"https:\/\/wincqserver:9445\/rtc\/oslc\/workitems\/2774","oslc_cm:label":""}]}],"oslc_cm:totalCount":1}



Is this not currently supported ?

Submitted defect:
http://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=166515

-Sean

0 votes



One answer

Permanent link
Update, this is not currently supported.

-Sean

0 votes

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: May 18 '11, 6:53 p.m.

Question was seen: 4,731 times

Last updated: May 18 '11, 6:53 p.m.

Confirmation Cancel Confirm