How to get the state Identifier by state name by program?
Hi,
If I create query in API to get the status= resolved work item, I need to establish the stateExpression, this need the state identifier. But I only know the state name like resolved.
So how can I get the the state identifier by it name?
|
One answer
Ralph Schoon (63.3k●3●36●46)
| answered Aug 14 '12, 4:06 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Jia,
you can either look it up in the process XML, or you can look it up while debugging or you could write a small tool to look at the data. Based on the ProgrammaticWorkItemCreation wiki page example: int id = new Integer(idString).intValue(); IWorkItem workItem = workItemClient.findWorkItemById(id, IWorkItem.FULL_PROFILE, null); Identifier<IState> state=workItem.getState2(); String stateID = state.getStringIdentifier(); System.out.println("State: " + stateID + "."); Comments
Ralph Schoon
commented Aug 14 '12, 6:08 a.m.
| edited Aug 14 '12, 6:08 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You can also iterate through the available states using the workflow manager. |
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.