The 'Filed Against' attribute needs to be set error creating a work item
I want to create a work item and I found this way..
POST https://rtc:9443/jazz/oslc/contexts/_gasc4Ju-Ed6cerS9lb5AWw/workitems Content-Type: application/x-oslc-cm-change-request+xml
<oslc_cm:ChangeRequest
xmlns:dc="http://purl.org/dc/terms/"
xmlns:rtc_cm="https://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:oslc_cm="http://open-services.net/xmlns/cm/1.0/">
<dc:title>A new Bug</dc:title>
<dc:description>This is new bug</dc:description>
<dc:type rdf:resource="https://rtc:9443/jazz/oslc/types/_gasc4Ju-Ed6cerS9lb5AWw/defect"/>
<rtc_cm:filedAgainst rdf:resource="https://rtc:9443/jazz/resource/itemOid/com.ibm.team.workitem.Category/_hckJkpu-Ed6cerS9lb5AWw"/>
</oslc_cm:ChangeRequest>
but the server responses:
'Save Work Item' failed. Preconditions have not been met: The 'Filed Against' attribute needs to be set
What I am doing wrong?
thanks
5 answers
the rtc_cm tag value needs to be changed to http from your current https modify:
xmlns:rtc_cm="https://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/
to:
xmlns:rtc_cm="http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/"
and it works