It's all about the answers!

Ask a question

Setting the current iteration programmatically


EclipseTalk . (32735759) | asked Dec 17 '13, 10:13 a.m.
edited Dec 17 '13, 10:14 a.m.
 Hello,
Is there a way via APIs to set the current iteration based on the current date? Let's say, I have a 2 week sprint, every 2 weeks I'd like to set via a cron job the current iteration for my projects.
Thanks in advance for your help.

Comments
sam detweiler commented Dec 17 '13, 10:44 a.m.

there is nothing out of the box. you could create a tool to do this with the api. 


you will have to loop thru the timelines on the projectarea, as there can be a different 'current' iteration for each timeline. 

I just learned how to do something similar. 

logon, find the project, get its timelines, for each, get the iterations (for each get their iterations), find the interation you wish to set as current, then 
timeline.setCurrentIteration(new iteration);

then you have to save the project and the affected timeline together. 
processItemClient.save(list_of_modified_objects, null); 


EclipseTalk . commented Dec 17 '13, 11:04 a.m.

 Thanks!

Be the first one to answer this question!


Register or to post your answer.