It's all about the answers!

Ask a question

How to get all iterations in a RTC plugin?


Idan Shanny (124) | asked Jul 18 '13, 3:22 a.m.
For some reasons, we have a lot(!) of iterations in the project area. Hence, the DropDown list becomes huge.
We want to assign the WI using two custom enumeration fields, and parse them inside a plugin in order to find the required iteration.
In order to check process feasibility, I need to know if I can get a collection of all iterations in my project area in a plugin.
Well, how do I do it?

2 answers



permanent link
sam detweiler (12.5k6195201) | answered Jul 18 '13, 9:29 a.m.
from the project get the Timelines, and from the timelines get the list of iterations

<code>
         IDevelopmentLineHandle[] dlh = iprja.getDevelopmentLines();
         IDevelopmentLine dl = (IDevelopmentLine) auditableClient .fetchCurrentAuditable(dlh[0],
              ItemProfile.createFullProfile(IDevelopmentLine.ITEM_TYPE), null);
         
          // get current iteration for this timeline
          IIterationHandle cih = dl.getCurrentIteration();
         // get all iterations for this timeline. note this is top level iterations.
         // iteration.getChildren() will get the next layer down.
          IIterationHandle[] iterations = dl.getIterations();
</code>

permanent link
Ralph Schoon (63.1k33645) | answered Jul 18 '13, 3:56 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi Idan,

you should be able to get some inspiration from: https://rsjazz.wordpress.com/2012/10/05/handling-iterations-automation-for-the-planned-for-attribute/

You can get all timelines and then from the timeline iterate trough the iterations, sub iterations and so forth.

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.