How can I Update RTC Workitem of Attribute type ”String List” by REST API
Hi
<?xml version="1.0" ?><rdf:RDF xmlns:ns1="http://purl.org/dc/terms/" xmlns:ns2="http://open-services.net/ns/cm#" xmlns:rtc_ext="http://jazz.net/xmlns/prod/jazz/rtc/ext/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> but It fails when it is executed. It will be "500 Err" Statuscode500 ”Incorrect JSON array:” [aaaaaa,bbbbb] Please thanks
showing 5 of 6
show 1 more comments
|
3 answers
This can be done. I have just confirmed.
|
|
I tried it over and over but I could not acquire the above XML.
Comments
Ian Wark
commented Nov 29 '17, 11:09 p.m.
Did you try using Firebug with Poster as per this example?
HIROAKI JOSAKO
commented Dec 04 '17, 8:52 p.m.
>Did you try using Firebug with Poster as per this example?
HIROAKI JOSAKO
commented Mar 19 '18, 8:12 p.m.
Long time no see.
|
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.
Comments
We had similar discussions in the past and it seems that there is no sure way to assign values in a "list" form - be it string list, enumeration list, and etc.
Hi Donald!
Thank you for valuable information
It is very disappointing that Enumerations List can not be set....
Enumeration list works. Still trying with String list. You may need to use the Match-If header with the ETag.
https://jazz.net/forum/questions/166325/how-update-rtc-work-item-with-enumeration-list-field-by-rest
Hi lan
Thanks for infomations
Unfortunately, I did not understand well.
What is this ETag??
Umm..
Is there an example?
How to update list type
In the post that Ian provided, Dmitry updated the Enumeration List attribute only. Note the ?oslc_cm.properties=rtc_ext:com.finecosoft.components.field at the end of the URL he used. Maybe that's the trick.
ETag is to make sure that you have the current version of the work item. If someone else updates the work item after you GET it, ETag will change, and when you PUT to the work item with the previous ETag, it will fail (to prevent corruption).
I understand that it will be retained by editing with another tag on change