It's all about the answers!

Ask a question

Editor Presentation - get state group?


Jorge Diaz (8664434) | asked Feb 27 '12, 1:17 p.m.
JAZZ DEVELOPER
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.

2 answers



permanent link
Jan Wloka (4161) | answered Feb 29 '12, 2:51 a.m.
JAZZ DEVELOPER
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.

permanent link
Jorge Diaz (8664434) | answered Feb 29 '12, 3:07 a.m.
JAZZ DEVELOPER
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.

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.