It's all about the answers!

Ask a question

CCM custom workitem: get current fields from API


Enrique Sánchez (434) | asked Apr 28 '22, 6:46 a.m.

I have a custom workitem definition in CCM that is called e.g. "Bug report" that also has some custom fields e.g. "Bug priority" with some values to select.


If I query the area services:
https://[IP]:9443/ccm/oslc/contexts/[areacode]/workitems/services.xml
the Bug report appears in CreationFactory list and I can get the fields from the resourceShape url:

https://[IP]:9443/ccm/oslc/context/[areacode]/shapes/workitems/bugreport
With the URL above I get all the possible fields (customized or not) in the Bug report workitem and not only the ones that are shown when you try to create a new workitem in Jazz web interface.
Is it possible to get only the fields that are displayed when you create a new work item in Jazz interface?
(those fields are defined in the Work Item Editor presentation that in my case is called com.ibm.team.workitem.editor.default).
Thanks.


Comments
Ralph Schoon commented Apr 28 '22, 7:06 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
As a comment. I am not the most experienced OSLC API user. I have described my findings here: https://rsjazz.wordpress.com/2022/02/02/ewm-work-item-oslc-cm-api/

I am not aware of a way to only get the attributes that are displayed in the work item editor presentation. There is not even a way to find out the required attributes of the work items, especially not the ones that are dynamically required. OSLC does not seem to have a process for that.

The creation dialogues allow to delegate the creation to the target tool. After the creation you get the data back, that is available for the work item.

For OSLC there is also not built in and custom attributes. This distinction is an implementation detail of a target OSLC provider, as far as I understand.

Ralph Schoon commented Apr 28 '22, 7:16 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

As a second thought, you can probably ignore everything that has zero or more multiplicity in the resource shape.


Enrique Sánchez commented May 03 '22, 9:13 a.m.

Thank you. I haven't found a way of ignoring some fields based on the resource shape properties. I will try for an alternative solution in this case (the creation dialogues usage seem to be the best one).


Enrique Sánchez commented May 03 '22, 9:13 a.m.

Thank you. I haven't found a way of ignoring some fields based on the resource shape properties. I will try for an alternative solution in this case (the creation dialogues usage seem to be the best one). 

Accepted answer


permanent link
David Honey (1.8k17) | answered Apr 28 '22, 8:40 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Apr 28 '22, 8:41 a.m.

OSLC resource shapes describe what properties might appear in the RDF representation of a resource described by that resource shape. It says nothing about UI presentation. There is no mechanism defined by OSLC to determine which set of properties referenced in some resource shape might be displayed in some application's dialog. There might not be a static mapping of such attributes. Applications might display different properties in different dialogs, and the set of properties displayed might be role-dependent, or dependent on some aspects of the data.

Enrique Sánchez selected this answer as the correct answer

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.