It's all about the answers!

Ask a question

RTC 6.0 :How to get custom attribute sections value of a workIteam through RTC java API


Naveen Tyagi (19778152) | asked Dec 02 '15, 2:34 a.m.
is it possible to get particular section value of a custom attribute in a work Item ?

2 answers



permanent link
Michele Pegoraro (1.8k14119103) | answered Dec 02 '15, 4:27 a.m.
Hi, with plain API is possible to obtain any attribute value of a work item. What do you mean with "section value"?

Anyway take a look to this link to start developing extensions.



permanent link
Nilesh Patil (1734150) | answered Dec 10 '15, 5:44 a.m.
Hi Michele,
Thank you for quick response.
Naveen was talking about how can we identify the particular attribute is present in particular tab(for example/Overview tab)
Or let me put it different way,
 I have workitem UI(say Defect workitem) which contains different tabs(Overview, links,Approval, and some custom tab(X)). How Can I know which attributes are present in Custom tab(X). I want to list down all the attributes under Custom tab(X)

Thank you in Advance.

Comments
Michele Pegoraro commented Dec 10 '15, 6:06 a.m.

Ok, I did not understand. In order to find out what you want you have to inquiry the process configuration, not the work item itself. I've never use API to retrieve editor configuration and I'm not sure they exist. But it is possible to get the entire process configuration source, which is an xml file. from there, you can get the section that belongs to a tab and, from the section, the presentation.


Michele Pegoraro commented Dec 10 '15, 6:09 a.m.

Like in this example:
<tab id="com.ibm.team.workitem.tab.overview" layout="builtInOverviewLayout">
                    <section sectionId="com.ibm.team.workitem.section.details" slot="details" title="Details"/> ...
</tab>
....
 <section id="com.ibm.team.workitem.section.details">
                    <presentation attributeId="com.ibm.team.workitem.attribute.workitemtype" kind="com.ibm.team.workitem.kind.enumeration"/>
                    <presentation attributeId="com.ibm.team.workitem.attribute.category" kind="com.ibm.team.workitem.kind.internal.category"/>
...
</section>


Nilesh Patil commented Dec 10 '15, 6:43 a.m.

Hi Michele,
Thank you for quick response
I am developing server side plugin in RTC. I want to get only those custom attributes which are present under particular section of workitem or particular tab of workitem.
Is their any API available to get this deatils?


1
Kevin Ramer commented Dec 10 '15, 12:22 p.m.

What happens if the presentation is changed ?  Unless the project is pretty tightly locked down, this is a real possibility.   My take is that your target(s) should be the attributes themselves, not where they sit on a potentially mutable presentation.   Rather like US vs UK automobiles; the drivers seat are on opposite sides, but both have all the same doo-dads.  


Ralph Schoon commented Dec 10 '15, 12:43 p.m. | edited Dec 10 '15, 12:48 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

As far as I can tell, the server API should not care for if an editor presentation is available for an attribute or not. It should check for hasAttribute() and if the attribute is there it should work with it. The server does and should not care if there is an editor presentation, that would be bad design. You can also set attributes that have no editor presentation in e.g. work item queries.

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.