Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-17810

shortPlanName contains branch name for plan branches

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 6.10.2
    • 5.9.7, 5.12.3.1
    • Variables

      Summary

      According to https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.html bamboo.shortPlanName should contain the name of the plan, however for plan branches it contains the branch name (instead of the plan name).

      Environment

      • Bamboo 5.12.3.1

      Steps to Reproduce

      1. Create a script task that only contains echo ${bamboo.shortPlanName}
      2. Run the plan and look at the log - you will see the plan name being output
      3. Create a plan branch

      Expected Results

      The name of the plan is output.

      Actual Results

      The name of the branch is output

      Workaround

      There is no known workaround

            [BAM-17810] shortPlanName contains branch name for plan branches

            We are also affected by this after upgrading to 6.10.4.  Any updates on a fix for this?

            Suba Bhakta added a comment - We are also affected by this after upgrading to 6.10.4.  Any updates on a fix for this?

            We are also affected by this issue with Bamboo 6.8.1. We are going to use the workaround suggested by Jonathan Lynch for now, but it would be nice if this could be fixed soon.

            Tobias Wächter added a comment - We are also affected by this issue with Bamboo 6.8.1. We are going to use the workaround suggested by Jonathan Lynch for now, but it would be nice if this could be fixed soon.

            Update: I am working around this issue by awk'ing the shortPlanName out of the planName. The branch build doesn't seem to mess up the planName, only the shortPlanName.

            Jonathan Lynch added a comment - Update: I am working around this issue by awk'ing the shortPlanName out of the planName. The branch build doesn't seem to mess up the planName, only the shortPlanName.

            +1 on this issue. This is messing up my branch builds. Would rather not work around it by introducing an additional variable, as this makes it more difficult to clone plans and have the clone still work.

            Jonathan Lynch added a comment - +1 on this issue. This is messing up my branch builds. Would rather not work around it by introducing an additional variable, as this makes it more difficult to clone plans and have the clone still work.

            Peter Hoy added a comment -

            I just ran into this... I wanted the Plan name ... and got the branch name.

            And yes, we are using branch builds ... but so what ... "branch name" ... "plan name" ... provide what is advertised.

            Peter Hoy added a comment - I just ran into this... I wanted the Plan name ... and got the branch name. And yes, we are using branch builds ... but so what ... "branch name" ... "plan name" ... provide what is advertised.

            Bill Sim added a comment -

            Love is a strong word, but I do have a mild affection for it. It may not be a bug in the 'broken' sense of bug, but it is, in my opinion, a bug in the sense of being non-intuitive/unexpected behaviour. There is already a variable that returns the branch name, so the plan name should always return the plan name.

            Bill Sim added a comment - Love is a strong word, but I do have a mild affection for it. It may not be a bug in the 'broken' sense of bug, but it is, in my opinion, a bug in the sense of being non-intuitive/unexpected behaviour. There is already a variable that returns the branch name, so the plan name should always return the plan name.

            Any love for this issue? I was wondering if this was really a bug and not by design for some reason....

            So a couple workarounds:

            1) Set a variable in the Build Plan that can be referenced instead of shortPlanName

            2) Set the Build Job's name to the desired value, then reference bamboo_shortJobName

            These are not ideal, but both will get the job done for now. If this is a bug, it needs to be addressed at some point.

            Chris Bellar added a comment - Any love for this issue? I was wondering if this was really a bug and not by design for some reason.... So a couple workarounds: 1) Set a variable in the Build Plan that can be referenced instead of shortPlanName 2) Set the Build Job's name to the desired value, then reference bamboo_shortJobName These are not ideal, but both will get the job done for now. If this is a bug, it needs to be addressed at some point.

            Bill Sim added a comment -

            Affects 5.15.4. This is a little bit of a pain for me too. If I wanted the branch name, I'd've asked for it with the branchName variable.

            Bill Sim added a comment - Affects 5.15.4. This is a little bit of a pain for me too. If I wanted the branch name, I'd've asked for it with the branchName variable.

            Affects version 5.14.0.2

            Bruce Ashton added a comment - Affects version 5.14.0.2

              achystoprudov Alexey Chystoprudov
              cglockner Christian Glockner
              Affected customers:
              17 This affects my team
              Watchers:
              20 Start watching this issue

                Created:
                Updated:
                Resolved: