It's all about the answers!

Ask a question

Using CSharp to create a work item in RTC, how do I set the priority?


Alec Crawford (1112) | asked Nov 20 '12, 10:51 a.m.

I'm using a NameValueCollection to pass to the UploadValues for posting data to RTC. What is the format for setting the priority? Here's an example of what I tried:

NameValueCollection data = new NameValueCollection {

{ "dc:type", _sWIType }, //e.g. Task

{ "dc:title", _sTitle }, //summary

{ "dc:description", _sComment }, //Description

{ "oslc_cm:Priority", "rdf:resource=\"https://[server]/ccm/oslc/enumerations/[ID]/priority/priority.literal.l02\"" }

};

This creates the task, but no matter what I put in for the priority, it comes out as priority.literal.l01 (Unassigned). I've tried different formats for the rdf:resource string, to no avail.

One answer



permanent link
Alec Crawford (1112) | answered Nov 21 '12, 3:01 p.m.

I figured it out. This worked:

{ "oslc_cm:priority", "https://[server]/ccm/oslc/enumerations/[ID]/priority/priority.literal.l02" }

Your answer


Register or to post your answer.