Programmatically query RTC work item for plan item assignment
Hi,
can I programmatically (using RTC client plain Java API) find out whether a certain work item is a plan or execution item.
If so can you show me an example piece of code for this case?
Reason for this is that I need to handle execution items differently than plan items in my java application.
Thank you
can I programmatically (using RTC client plain Java API) find out whether a certain work item is a plan or execution item.
If so can you show me an example piece of code for this case?
Reason for this is that I need to handle execution items differently than plan items in my java application.
Thank you
2 answers
I haven't found any api, so I think you will have to read the process XML and look for the settings
<configuration-data id="com.ibm.team.apt.configuration.topLevelPlanWorkItemBinding" xmlns="http://com.ibm.team.apt/topLevelPlanWorkItemBinding">
<topLevelPlanWorkItemBinding workitemType="com.ibm.team.apt.workItemType.story"/>
<topLevelPlanWorkItemBinding workitemType="com.ibm.team.apt.workItemType.epic"/>
</configuration-data>
to get the process xml see my sample pgm here
https://jazz.net/forum/questions/111660/programmatically-finding-the-process-template-used-in-a-project
I use this mechanism to determine a particular variable type in my sample here
https://jazz.net/forum/questions/94776/assertionfailedexception-problem-with-getting-the-values-of-attributes
// get the xml source for the project, in case there is a multi-select
// stored in a string field
IContent pxml = (IContent) pa.getProcessData().get(
"com.ibm.team.internal.process.compiled.xml");
String XML = getXMLSource(pa, pxml, icm, mine);
<configuration-data id="com.ibm.team.apt.configuration.topLevelPlanWorkItemBinding" xmlns="http://com.ibm.team.apt/topLevelPlanWorkItemBinding">
<topLevelPlanWorkItemBinding workitemType="com.ibm.team.apt.workItemType.story"/>
<topLevelPlanWorkItemBinding workitemType="com.ibm.team.apt.workItemType.epic"/>
</configuration-data>
to get the process xml see my sample pgm here
https://jazz.net/forum/questions/111660/programmatically-finding-the-process-template-used-in-a-project
I use this mechanism to determine a particular variable type in my sample here
https://jazz.net/forum/questions/94776/assertionfailedexception-problem-with-getting-the-values-of-attributes
// get the xml source for the project, in case there is a multi-select
// stored in a string field
IContent pxml = (IContent) pa.getProcessData().get(
"com.ibm.team.internal.process.compiled.xml");
String XML = getXMLSource(pa, pxml, icm, mine);
Hi Marko,
I don't know if it's possible via API
As you may know, the information is part of the Project Area (Project Area configuration -> Configuration Data -> Planning -> Work Item Type Categorization"
Perhaps in your Java code, you could check against this? Would this help?
Just a thought
I don't know if it's possible via API
As you may know, the information is part of the Project Area (Project Area configuration -> Configuration Data -> Planning -> Work Item Type Categorization"
Perhaps in your Java code, you could check against this? Would this help?
Just a thought
Comments
I know that it is part of the project area configuration.
But how can I programmatically query this configuration switch?
Any idea?
I don't know about the API call.
I am assuming that your application is querying the work items. In that case you could hard code these work item type names and then verify against them?
just a thought
Of course I am doing that at the moment but that adds a logical dependency to the project area the work item belongs to.
I want to get rid of that, is possible.