It's all about the answers!

Ask a question

How can I modify the Notes_Entry ClearQuest field using OSLC 2.0 API? (receiving 409 error...)


Jeannot Langlois (2111) | asked Jun 22 '15, 12:31 p.m.
edited Jun 22 '15, 1:42 p.m.
I have successfully switched a ClearQuest record from the "Defined" state to the "Investigate" state using the OSLC 2.0 API (using the "Investigate" action).

However, with very similar code, now I am trying to switch a ClearQuest record back from the "Investigate" state to the "Defined" state.  I thought that specifying the "ReDefine" action would be enough, but I am getting a 409 error as well as message "CRVAP0290E CRMUD0061E The field "Note_Entry" is mandatory; a value must be specified.".

I did include a Note_Entry in the XML I have sent out -- so why I am getting this error?

Here is the XML I've sent:

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cq="http://www.ibm.com/xmlns/prod/rational/clearquest/1.0/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:oslc="http://open-services.net/ns/core#" xmlns:oslc_cm="http://open-services.net/ns/cm#">
<oslc_cm:ChangeRequest rdf:about="http://mitelcqw.mitel.com/cqweb/oslc/repo/MITEL/db/MN/record/16777224-34138553">
<oslc_cm:status>Defined</oslc_cm:status>
<cq:Note_Entry>Exprimental note programmatically added by JLCLICQUTILS on state switch...</cq:Note_Entry>
</oslc_cm:ChangeRequest>
</rdf:RDF>

And here is the response I've received back:

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://open-services.net/ns/core#" xmlns:cq="http://www.ibm.com/xmlns/prod/rational/clearquest/1.0/">
<Error>
<message>CRVAP0290E CRMUD0061E The field "Note_Entry" is mandatory; a value must be specified. </message>
<statusCode>409</statusCode>
< details xmlns="http://www.ibm.com/xmlns/prod/rational/clearquest/1.0/">
<invalidFields>
<Note_Entry>
<message>CRMUD0061E The field "Note_Entry" is mandatory; a value must be specified.</message> <currentValue/>
</Note_Entry>
</invalidFields>
< /details>
</Error>
</rdf:RDF>

Can anyone spot something wrong in the XML I've sent out?

One answer



permanent link
Jeannot Langlois (2111) | answered Jun 22 '15, 1:51 p.m.
I've managed to answer my own question.

In the URI of the HTTP PUT request I needed to specify "cq:Note_Entry" in the oslc.properties (NOT just oscl:status for the state switch...)

PUT /cqweb/oslc/repo/MITEL/db/MN/record/16777224-34138553?oslc.properties=oslc_cm%3Astatus,cq:Note_Entry&rcm.action=ReDefine HTTP/1.1

:)


Comments
Ginny Ghezzo commented Jun 25 '15, 11:23 a.m.
JAZZ DEVELOPER

 Jeannot : Thank you for following up with an answer. This is very helpful. 

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.