It's all about the answers!

Ask a question

IResolution value list for a workitem


Ahmed Hadad (106187) | asked Jun 24 '08, 3:50 p.m.
Who do I get the IResolution value list for a workitem through the Jazz API
using plain Java code?

--
Sincerely,

Ahmed Hadad

2 answers



permanent link
Patrick Streule (4.9k21) | answered Jun 25 '08, 4:25 a.m.
JAZZ DEVELOPER
Who do I get the IResolution value list for a workitem through the Jazz
API using plain Java code?

If you have a workitem, then you can find the resolutions as follows:

IWorkflowInfo workflowInfo= workItemClient.findWorkflowInfo(workitem,
monitor);

For all resolutions:
Identifier<IResolution>[] resolutions= workflowInfo.getAllResolutionIds();

For all resolutions of a specific state:
Identifier<IResolution>[] resolutions=
workflowInfo.getStateResolutionIds(stateId);

For all resolutions of a specific action:
Identifier<IResolution>[] resolutions=
workflowInfo.getResolutionIds(actionId);

The name and icon of the resolution can then be accessed using
String name= workflowInfo.getResolutionName(resolutionId);
URL iconURL= workflowInfo.getResolutionIconName(resolutionId);
ImageDescriptor imageDescriptor= WorkItemUI.getImageDescriptor(iconURL);


HTH,
Patrick
Jazz Work Item Team

permanent link
Ahmed Hadad (106187) | answered Jun 25 '08, 2:59 p.m.
Thanks a lot.

--
Sincerely,

Ahmed Hadad

"Patrick Streule" <patrick_streule> wrote in message
news:g3svfl$84m$1@localhost.localdomain...
Who do I get the IResolution value list for a workitem through the Jazz
API using plain Java code?

If you have a workitem, then you can find the resolutions as follows:

IWorkflowInfo workflowInfo= workItemClient.findWorkflowInfo(workitem,
monitor);

For all resolutions:
Identifier<IResolution>[] resolutions= workflowInfo.getAllResolutionIds();

For all resolutions of a specific state:
Identifier<IResolution>[] resolutions=
workflowInfo.getStateResolutionIds(stateId);

For all resolutions of a specific action:
Identifier<IResolution>[] resolutions=
workflowInfo.getResolutionIds(actionId);

The name and icon of the resolution can then be accessed using
String name= workflowInfo.getResolutionName(resolutionId);
URL iconURL= workflowInfo.getResolutionIconName(resolutionId);
ImageDescriptor imageDescriptor= WorkItemUI.getImageDescriptor(iconURL);


HTH,
Patrick
Jazz Work Item Team

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.