Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Editor Presentation - get state group?

Hello,

I have contributed a Work Item Editor Presentation and I am able to get the state of the Work Item the presentation is placed on. However I haven't found a way of tracing it to the state group ... is there a way of getting the state group that state belongs to?

Thanks!

Regards,

Jorge.

0 votes



2 answers

Permanent link
Hello Jorge,

I assume you simply want to know whether the work item's state belongs to a certain state group. For example, if you want to know whether a work item is somehow 'CLOSED' you do something like:

IWorkItem workItem= ...;
Identifier<IState> state= workItem.getState2();
IWorkflowInfo info= workItemCommon.findWorkflowInfo(workItem, monitor);
if (info.stateGroupContains(IWorkflowInfo.CLOSED_STATES, state))
// do something
}

HTH,
Jan.


Hello,

I have contributed a Work Item Editor Presentation and I am able to get the state of the Work Item the presentation is placed on. However I haven't found a way of tracing it to the state group ... is there a way of getting the state group that state belongs to?

Thanks!

Regards,

Jorge.

0 votes


Permanent link
Hello Jan,

I am afraid I didn't stated my case clear enough. I want to do exactly what you say but from Web UI. My editor presentation is placed in the Web UI and I want to make it reactive depending on state group (right now is for certain states).

I haven't been able to find something similar to you suggestion to be triggered from javascript API.

Thanks in advance for your help!

Regards,

Jorge.

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,952

Question asked: Feb 27 '12, 1:17 p.m.

Question was seen: 5,007 times

Last updated: Feb 27 '12, 1:17 p.m.

Confirmation Cancel Confirm