OSLC shape pain trying to derive filedAgainst IDs without relying on an existing task
Hi,
As always with OSLC it seems possible to do what I want but painful and involves getting it wrong tons of time before succeeding.
I am trying to create a map on the fly mapping FiledAgainst categories and Planned For Iterations, such that the user can pass a valid text value into my utility and a work item will be created with the valid resource URLs
I can get the shape from an existing item, and the values by submitting each allowedvalue url, but not in general,
I suppose I could just query for all items of a particular type a user can see and use the first one to create an URL
Specifically, if I have a work item 851570, I can get its URL like so
And I can get the shape for that particular type of work item from the instance shape resource
<oslc:instanceShaperdf:resource="server/ccm/oslc/shapes/workitems/_-67AYIeoEemaHMKdzCZsUw"/>
I can then get the allowed values from that: -
#sever/ccm/oslc/shapes/workitems/_G_GzMEumEem6Xb4hlAXn7A/property/category/allowedValues
navigating the URL for each value allows me to map the ID to the actual name, convoluted , but doable, but it needs an existing work item id and I want this to work by supplying a project_id, it might be acceptable to hard code if this was for one particular project.
You would think that there would be a way to do this for a particular work item Type or from a draft work item, but neither works for me, hopefully I am missing something.
Any pearls of wisdom from anyone who has done this before welcome ;-)
Many Thanks
Richard
#I DONT WANT TO RELY ON AN ITEM EXISTING!!!