It's all about the answers!

Ask a question

How to set 'planned for' attribute to 'Unassigned' in RTC ALM


Nicole Cherches (113) | asked Jun 23 '21, 2:07 a.m.
edited Jun 23 '21, 2:16 a.m.
If 'planned for' attribute has been set for a workitem, there is no way to set it back to 'Unassigned' . And if it is set to 'Unassigned', then the response of the workitem returns null.

I am using OSLC CM 2.0. and RTC API.

One answer



permanent link
Ralph Schoon (63.2k33646) | answered Jun 24 '21, 2:42 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jun 24 '21, 2:44 a.m.

 In the OSLC API, getting the work item, removing the entire entry for the planned for attribute value and PUTing the new payload - including the If-Match etag should do the trick. 


In some cases such as the category there are "unassigned" values you can set. 

I do not know if there is for planned for. You can try to follow the resource shape and try to find if there is a unassigned value for the planned for attribute. In any case not setting the value as explained above should create the same result.


Comments
Ralph Schoon commented Jun 24 '21, 3:08 a.m. | edited Jun 24 '21, 3:14 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I did a simple test. I created a work item with planned for unassigned and GET the item in OSLC.  

I change the planned for to the backlog and save. Then I GET the item again.

The difference between the first state and the second is that this got added:

<pre>
"process:iteration": {
    "rdf:resource": "https://elm.example.com:9443/ccm/process/iterations/_8iPSV1pmEeukW7cqqDjAuA"
},
"rtc_cm:plannedFor": {
    "rdf:resource": "https://elm.example.com:9443/ccm/oslc/iterations/_8iPSV1pmEeukW7cqqDjAuA",
    "rdf:type": [
        {
            "rdf:resource": "http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/Iteration"
        }
    ]
}


This means that removing these entries from the payload and PUTing the new payload sets the work items planned for to "unassigned".


Nicole Cherches commented Jun 24 '21, 6:21 a.m.
Sorry, I forgot to mention, I am interested in the xml+rdf structure, because we work with that in our environment. I tried to PUT the part representation without the Planned For Tag but it did not work, the planned for is still set to the initial release I set before.
For some reason PUT does partial updates on our system, without removing the attributes, we don't send.

Also, I already studied the resource shape of workitems, there is no 'unassigned' or anything similar to be found there.

It could be a bug, I found it listed as a defect from 5 years ago. They describe exactly the problem I am having and how to reproduce it with XML:

It is also listed as 'Fixed' but it does not work in ALM, maybe our system has not been updated yet??

Ralph Schoon commented Jun 24 '21, 7:32 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER



The work item claims that this was fixed June 2016.  It points to https://jazz.net/wiki/bin/view/Main/WorkItemAPIsForOSLCCM20 I looked into the example and modified my URI to 



With both the iterations removed like above. This worked.


David Honey commented Jun 25 '21, 3:47 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Your answer


Register or 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.