It's all about the answers!

Ask a question

The 'Filed Against' attribute needs to be set error creating a work item


Eduardo Carrasquero (133) | asked Jun 26 '13, 4:57 p.m.
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



permanent link
Dinesh Kumar B (4.1k413) | answered Jun 27 '13, 6:06 a.m.
JAZZ DEVELOPER
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


Comments
Vatsala Ramachandran commented Jun 27 '14, 6:16 a.m.

Perfect!! That does the trick.... I was also stuck with a similar problem!


permanent link
sam detweiler (12.5k6195201) | answered Jun 26 '13, 5:24 p.m.
I think the field is
rtc_cm:filed_against

Comments
Eduardo Carrasquero commented Jun 26 '13, 6:00 p.m.

hello sam, thanks for answer me,

but

rtc_cm:filed_against

doesn't work.


permanent link
Dinesh Kumar B (4.1k413) | answered Jun 27 '13, 3:05 a.m.
JAZZ DEVELOPER
edited Jun 27 '13, 3:06 a.m.
have you tried with
rtc_cm:filedAgainst
(notice the camel case capital A)

also, just to ensure the value you provide for filedAgainst is the right one, i would list an existing work item which was tagged with that category value and pick the rdf:resource value from there.

permanent link
Dinesh Kumar B (4.1k413) | answered Jun 27 '13, 6:09 a.m.
JAZZ DEVELOPER
looking at the resource shape of the work item type will show the referred namespace url
<oslc:propertyDefinition rdf:resource="http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/filedAgainst"/>

permanent link
Eduardo Carrasquero (133) | answered Jun 27 '13, 9:38 p.m.
I modified

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, but I have a new error:

status: 500

message: internalCategoryId is not a valid property for ProjectArea

any ideas?


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.