RTC 6.0.6.1 Failing to set Priority & Severity...other enums OK
I am writing a tool that creates new work items with quite a few attributes. The POST is working fine and the work item is being created with no errors and all attributes are being set, except for priority and severity.
Priority and Severity are ignored... I have tried the following:
"oslc_cm:priority":{"rdf:resource":"<<resource url for literal>>"}
and
"oslc_cmx:priority":{"rdf:resource":"<<resource url for literal>>"}
My headers are:
Content-Type: application/json
OSLC-Core-Version: 2.0
If I do a GET, the JSON does have additional items in the JSON... like this:
"oslc_cmx:priority":{"rdf:resource":"<<resource url for literal>>", "rdf:type":[{"rdf:resource":"https://rtc.domain/ccm/oslc/enumerations/_projectId/priority"},{"rdf:resource":"http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/Literal"}]}
I even tried including those parts that seem unnecessary, but the severity and priority are ignored.
Can someone send me a working example json that includes priority and severity and successfully creates a new work item and sets priority and severity?
Thanks,
Dave
Accepted answer
Dave,
this is the JSON body I sent and it created the work item just fine.
{
"dcterms:title": "Work Item Created from JSON in Python.",
"dcterms:description": "This is a work item linking to Jazz.net">https://jazz.net/\"">Jazz.net.",
"rtc_cm:filedAgainst": "https://elm.example.com:9443/ccm/resource/itemOid/com.ibm.team.workitem.Category/_HWNLMFpnEeukW7cqqDjAuA",
"oslc_cmx:priority": "https://elm.example.com:9443/ccm/oslc/enumerations/_8e5qfFpmEeukW7cqqDjAuA/priority/priority.literal.l11"
}
I used the creation factory and the allowed values for the attribute with Title "Priority" and value "High" to get the enumeration literal.