How do I get the Project Area of an Iteration
Hello
My task is to create a method that can export all plans of a project to a textfile. After searching for a long time, I've finally found a method to get the plans programmatically: https://jazz.net/wiki/bin/view/Main/InformalProjectCopy (under "Agile Planning") List<IIterationPlanRecordHandle> handles= source.fetchAllIterationPlans(ItemProfile.createFullProfile(IIterationPlanRecord.ITEM_TYPE), monitor); List<IIterationPlanRecord> plans= source.getItemManager().fetchCompleteItems(handles, IItemManager.DEFAULT, monitor);However, this method gets me all plans of all project areas that I have access to, and I can't find a way to filter only the plans that are in the current project area. That's why I made a subfunction that whould check if the iteration lies within the current project area. The problem is, that I can't find an option to get the project area of an iteration, and looping the getParent command also doesn't work, because it only gets to the top level iteration, but not the Project Area itself. I'd either need an option to only search through the current project area with the linked method, or a command to get the project area of an iteration. If anyone knows a way to do any of these, I'd much appreciate the help. Thanks |
Accepted answer
I don't think you can find the backlink,
so you have to get all the interations in a project (in their developmentlines), and make a hash table or something to be able to go backwards. ProjectArea->getDevelopmentLines() IDevelopmentLineHandle[] getDevelopmentLines()IDevelopmentLine->getIterations()
IIterationHandle[]
getIterations()
get their children IIteration->getChildren()
IIterationHandle[]
getChildren()
Matthias Lückl selected this answer as the correct answer
Comments Yes, that whould work. Thanks for the answer!
|
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.