It's all about the answers!

Ask a question

How to create Iteration Plan programatically?


Bruno Braga (48013621) | asked Dec 09 '08, 9:19 p.m.
- create Iteration Plan programatically
- associate workitems to this plan (programatically)

thanks

5 answers



permanent link
Johannes Rieken (1.2k1) | answered Dec 10 '08, 3:38 a.m.
bruno.braga wrote:
- create Iteration Plan programatically

That is currently not possible as the Agile Planning component does not
surface API. Please file an enhancement request.

--
Cheers, Johannes
Agile Planning Team

permanent link
DAVID GUO (35411) | answered May 24 '10, 11:24 p.m.
Hi,

I want to create new Iterations programatically in RTC 2.0.0.2 ifix2.

But i don't know how to do.

Please let me know whether it is possible or not in RTC.

Thanks


permanent link
Sapan Desai (5625) | answered Aug 14 '12, 5:00 p.m.
 This is one way of creating iteration:

IProcessItemService service= (IProcessItemService) repo.getClientLibrary(IProcessItemService.class);

IIteration newIteration = (IIteration) IIteration.ITEM_TYPE.createItem();

newIteration.setName("Ssdfecowsdfnd Iteration");

newIteration.setId("193");

IDevelopmentLine workingDevLine = (IDevelopmentLine) devLine.getWorkingCopy();

workingDevLine.addIteration((IIterationHandle) newIteration.getItemHandle());

newIteration.setDevelopmentLine(workingDevLine);

service.save(new IProcessItem[] { workingDevLine, newIteration }, monitor);


permanent link
Bruno Braga (48013621) | answered Aug 15 '12, 7:52 a.m.
 I asked here but I found a solution and I created that method to do that:

         public static IIteration createIteration(IRepositoryItemService repositoryService, IProcessServerService processService, IDevelopmentLine iDevelopmentLine, String name, String id, Date startDate, Date endDate) throws TeamRepositoryException {
IDevelopmentLine timeLine = (IDevelopmentLine) repositoryService.fetchItem(iDevelopmentLine, IRepositoryItemService.COMPLETE);
IIteration newIteration = (IIteration) timeLine.getCurrentIteration().getItemType().createItem();
IDevelopmentLine timeLineCopy = (IDevelopmentLine) timeLine.getWorkingCopy(); 
newIteration.setDevelopmentLine(iDevelopmentLine);
newIteration.setHasDeliverable(true);
newIteration.setName(name);
newIteration.setId(id);
newIteration.setStartDate(startDate);
newIteration.setEndDate(endDate);
                timeLineCopy.addIteration(newIteration);
        
                processService.saveProcessItems(new IProcessItem[] {newIteration, timeLineCopy});
        
                return newIteration;
      }


Thanks

Your answer


Register or to post your answer.