Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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.

0 votes

Comments
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.

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

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).

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

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

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Apr 28 '22, 6:46 a.m.

Question was seen: 887 times

Last updated: May 03 '22, 9:13 a.m.

Confirmation Cancel Confirm