Add comment to work item using API
I'm trying to add new comment to a work item using c#
and I can't make it work. I get the exception: The remote server returned an error: (400) Bad Reques (I'm trying to aviod using CURL) my code is:
thanks for any help |
3 answers
I'm trying to add new comment to a work item using c# 400 Bad Request usually contains an error element in the requested format (XML in your case) that describes the problem in more detail. Can you check if there is such an error description? -- Regards, Patrick Jazz Work Item Team |
I'm trying to add new comment to a work item using c# 400 Bad Request usually contains an error element in the requested format (XML in your case) that describes the problem in more detail. Can you check if there is such an error description? -- Regards, Patrick Jazz Work Item Team Thanks for your help Patrick I get the error:
my xml file is(I replace the first '>' char to ' [rtc_cm:Comment rdf:resource="https://192.168.16.14:9443/jazz/oslc/workitems/10/rtc_cm:comments/0"> dc:created> 2009-10-12T12:27:24.170Z [/dc:created> [dc:creator rdf:resource="https://192.168.16.14:9443/jazz/oslc/users/_tj6fYK2lEd6wr5OgrMF4rQ" /> [dc:description> OK [/dc:description> [/rtc_cm:Comment> Regards, Ronen |
I found my answer:
the XML file need to get the description of all parameters like "rtc_cm". I enterd to one of the comments in my work item and copy the parameters. my xml file need to change to:
|
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.