Trouble creating custom workItem with required custom attributes using RTC Rest API
Here is the error message I am receiving submit a request using a python script:
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:oslc="http://open-services.net/ns/core#" > <rdf:Description rdf:nodeID="A0"> <oslc:message>'Save Work Item' failed. Preconditions have not been met: The 'Date Detected' attribute needs to be set (work item <01:12:56>).</oslc:message> <oslc:statusCode>403</oslc:statusCode> <rdf:type rdf:resource="http://open-services.net/ns/core#Error"/> </rdf:Description> </rdf:RDF> Here is the request I am submitting: <rdf:RDF xmlns:oslc_cm="http://open-services.net/xmlns/cm/1.0/" rdf:about="https://rtc01.aide.oit.va.gov/jazz/resource/itemName/com.ibm.team.workitem.WorkItem" xmlns:dc="http://purl.org/dc/terms/" As I have listed above, I submit a value for the attribute. Also, the type of the attribute is time-stamp. Currently, I am at a lost of how to remedy this. Any insight will help. Thanks in advance. |
One answer
Pay attention to the name space. It's <rtc_ext:datedetected>, not <rtc_cm:datedetected> - at least this is true in my RTC 5.0.2 environment.
Also, I'm keen to know how you can get away without the <rtc_cm:type> attribute - I just can't create a defect in my environment without specifying the work item type. P.S. Why do you specify rdf:nodeID="A0" in the <rdf:description>? Comments When I tried <rtc_ext:datedetected>, the following error message appears:
Donald Nong
commented Feb 03 '16, 8:32 p.m.
That's strange. You can create such a work item in the Web GUI first, and do an OSLC GET to confirm the presentation of the "Date Detected" attribute - that's what I usually do. Other than that, I cannot think of anything else.
Spencer Clark
commented Feb 11 '16, 9:36 p.m.
Thanks Donald,
Donald Nong
commented Feb 11 '16, 9:44 p.m.
By "same thing", do you mean the attribute has the namespace "rtc_cm", rather than "rtc_ext"? If so, I would like to see how the attribute is defined in the process configuration. When I add such an attribute, it will have the namespace "rtc_ext". It's probably that the attribute is defined differently than I thought on your end.
|
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.