-
Bug
-
Resolution: Duplicate
-
Low
-
None
-
5.10.0
-
Severity 3 - Minor
-
The bamboo_shortPlanName environment variable contains the plan name when building the default branch, but contains the branch name for branch builds. I consider this a defect, not a improvement. But your JIRA configuration wouldn't allow be to create a "bug" and told me to raise a support ticket, and your support staff told me to file an enhancement request.
While the bamboo_buildPlanName and bamboo_planName contain the plan name, it can not be extracted with 100% reliably because the character sequence " - " used to delimit project and plan names are valid in project and plan names themselves.
I filed BAM-17988 to request a new environment variable for the project name, but to be truly useful we also need a plan name environment variable that contains the plan name (it makes no sense to me why bamboo_shortPlanName does not).
In general, I find it more separate values more useful than composite or derived values. It's usually easy to paste two or more variables together; it's often much harder (or impossible) to extract individual values from a composite. For example, I averaged 60 miles/hour on my commute this morning – how long did I take to get to work?
Ideally there wouldn't be variables like bamboo_buildPlanName or bamboo_planName at all, as users that need a string with project name + plan name + branch name + job name could construct it out of component parts (Of course, now that these exists they can't be removed, I'm just using this an example of the principle).