It's all about the answers!

Ask a question

What is the best way to fetch all the iterations in a hierarchical manner ?


Arshad Adavani (231220) | asked Apr 18 '16, 1:00 a.m.
edited Apr 18 '16, 2:00 a.m. by Ralph Schoon (63.1k33645)
What is the best way to fetch all the iterations in a hierarchical manner ?

Currently I am iterating over all the development lines and fetching iterations. For projects which have a lot of iterations, say around 1000, it takes around 10 minutes to fetch all the iterations.
Is there a better way to do this?

Comments
Ralph Schoon commented Apr 18 '16, 3:01 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

PS: the question is pretty fuzzy and almost incomprehensible. There is basically not enough information about what you do, how and why. The initial tagging with agile does not tell anything. I am assuming that this is somehow around automation, but that might be far fetched. If you want useful information in response, put useful information into your question.


Arshad Adavani commented Apr 18 '16, 5:00 a.m.

Hi Ralph,

Say I have an iteration:

Iteration 1
- Sub iteration 1
- - next sub iteration 1
Iteration 2
- Sub iteration 2
- - next sub iteration 2

My first expectation is that I should get the output in the same structure. For this as of now I have created a TreeNode class which returns me this result.

And then to fetch the iterations, I iterate over development lines which is retrieved through :
IDevelopmentLineHandle[] developmentLineHandlers = pa.getDevelopmentLines();

I retrieve iterations from all the development lines through:

IIterationHandle[] iterationHandle = developmentLine.getIterations();
....
....

But if I have a lot of iterations it takes very long. So I wanted to know if there is some other better approach to do this..

One answer



permanent link
Ralph Schoon (63.1k33645) | answered Oct 18 '16, 10:31 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
In general, especially for API's never have expectations. What you think is most efficient in a specific use case you have does not necessarily represent anything that is efficient for the tool. For example, the API is optimized to act as a UI and not to be easy for a automation developer.

I have published the code I usually use for iterations here: https://rsjazz.wordpress.com/2012/10/05/handling-iterations-automation-for-the-planned-for-attribute/

The code is used in some of the automation I have done. Not sure anymore what it was. I also created some helper classes. Usually the challenge is to have text and map it to the real objects in the tool.

It is still unclear why you want to do this, so no idea.

The structure is

IDevelopmentLine 

IIterationhandle = IDevelopmentLine.getIterations() // The top level iterations
IIterationhandle.getChildren() // Nested inside an iteration

Comments
Ralph Schoon commented Oct 18 '16, 10:42 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

10 minutes sounds way too long. Not sure why it should take so long. You could look into resolving multiple objects to be more efficient. As long as we don't know where the time is spent in the API I don't see how we could look at that.

Your answer


Register or to post your answer.