CCM custom workitem: get current fields from API
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.
Accepted answer
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.
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Apr 28 '22, 7:06 a.m.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
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Apr 28 '22, 7:16 a.m.As a second thought, you can probably ignore everything that has zero or more multiplicity in the resource shape.
Enrique Sánchez
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
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).