Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bamboo APIs - Iterate All Stages and Jobs on a Plan

Adam Myatt
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 25, 2012

While writing a Bamboo plugin I have reviewed multiple manager classes and have found a few different ways of iterating over all the Stage and Jobs under a single plan, given the Plan Key.

What's the most efficient way of doing this given a PlanKey and assuming I want to iterate over each Stage in a Plan and each Job in each Stage to identify the Key or each Stage and each Job?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 28, 2012
PlanManager planManager;
        Chain myPlan = planManager.getPlanByKey(planKey, Chain.class);
        for (ChainStage chainStage : myPlan.getStages())
        {
            for (Job  job: chainStage.getJobs())
            {

            }
        }

Adam Myatt
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 28, 2012

Awesome, thanks!

TAGS
AUG Leaders

Atlassian Community Events