Uploaded image for project: 'Bamboo'
  1. Bamboo
  2. BAM-20668

Variable to get plan branch name



    • Suggestion
    • Status: Gathering Interest (View Workflow)
    • Resolution: Unresolved
    • None
    • Variables
    • None
    • 2
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.



      The plan branch name could be retrieved from ${bamboo.shortPlanName} in the past, but after fixing https://jira.atlassian.com/browse/BAM-17810 this is no longer possible.
      The fix was correct, but it brought up another need for a Bamboo variable to provide the plan branch display name.

      None of the variables below can be used for this purpose:

      • bamboo_planRepository_branchName
      • bamboo_planRepository_1_branchDisplayName
      • bamboo_planRepository_branchName
        All the variables above will show what is configured in the repository section for the branch. if the branch is changed manually the display name will not be represented by them anymore.

      It would be good if we have a variable like bamboo_branchName which returns the current Plan branch name that the job is run, in the same way before the bug fix for bamboo.shortPlanName, or bamboo.planRepository.branchName without the need to add <position> but just the current branchName that the plan is run.

      Workaround (Partial)

      For script task on Linux
      Use bash substitution to get the branch display name from the bamboo_planName variable.

      bamboo_planBranchName = ${bamboo_planName##* - }


        Issue Links



              Unassigned Unassigned
              dsantos Daniel Santos
              26 Vote for this issue
              21 Start watching this issue