Retreiving information from a WorkItem using Plain Java
Hi, I am very new to RTC and have been writing some plain java code to extract information from a workItem.
Assume I have extracted the correct work item and a IWorkItem object has been extracted. I can now extract information such as the creator, severity, owner, amoung other things. I also have several other attributes such as Category, ODC Impact and a few others which I believe are custom ones. How do I go about accessing the information contained within these fields since the methods do not seem to be there to allow me to do this. The last one is the Status of the workItem, I need to be able to return a String which contains the current Status of a workItem but I cannot find a way to do this. Any help on this would be very much appreciated. Jonathan Taylor |
3 answers
I have finally figured out the custom Attributes, after playing around with it a little more.
I am however still stuck as to how to retreive the Status of a WorkItem, since this does not seem to be held within the workItem itself. |
I also have several other attributes such as Category, ODC Impact and All attribute values, bot custom and built-in can be accessed using: IAttribute attribute= workItemClient.findAttribute(projectArea, IWorkItem.XY_PROPERTY_ID, monitor); Object value= workItem.getValue(attribute); The last one is the Status of the workItem, I need to be able to IWorkflowInfo info= workItemClient.findWorkflowInfo(workItem, monitor); String name= info.getStateName(workItem.getState2()); -- Regards, Patrick Jazz Work Item Team |
Thankyou very much, thats exactly what I needed. I had managed to get the getStste2() method working but could not find a way to convert this into the actual named values.
Thanks again for the help. -- Regards Jon IBM I also have several other attributes such as Category, ODC Impact and All attribute values, bot custom and built-in can be accessed using: IAttribute attribute= workItemClient.findAttribute(projectArea, IWorkItem.XY_PROPERTY_ID, monitor); Object value= workItem.getValue(attribute); The last one is the Status of the workItem, I need to be able to IWorkflowInfo info= workItemClient.findWorkflowInfo(workItem, monitor); String name= info.getStateName(workItem.getState2()); -- Regards, Patrick Jazz Work Item Team |
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.