It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Choosing variable value for parametrized plan from predefined list of choices?

I have many small packages, which are being worked on, and built individually, using basically the same pipeline (only the package name differs).
So i guess i need to use parametrized plan, to allow the user to specify name of the package before running it.
Is there any way of extending the Bamboo UI, so the variable value with package name could be chosen from a list of values?
The problem is, there are approx. 50 of these packages in every project/branch, they are being updated relatively often, built on demand, and the idea of a user typing the value every time... it's too error prone and unfriendly.

From what i seen so far, Bamboo lacks this feature (define list of choices for variable value), but could it be solved via some kind of plugin?

2 answers

1 accepted

0 votes
Answer accepted

Why not use jquery to change the behavior of the Custom build dialog? You could make particular variables madatory by intercepting the click on the Run button or have predefined values (even change a text input to a dropdown) for specific variables by injecting the javascript in using a Web Resource Bamboo plugin.

Thank you, that would also be a way how to do it.
Nevertheless, because in this case i need to change just one variable, i decided to alter templates displayBuildPlansList.ftl, displayWideBuildPlansList.ftl, and menus.ftl, allowing me to make the drop down box accessible right away (depending on whether the plan uses that special variable), and select values with just one click (no need to even open that parametrized build form).

I wrote a web panel module plugin, which ended up as a dead end, because of the rather limited option where it can be actually placed.

But while i was working on the plugin, i discovered i can change the original templates - had no idea i could do that!
So i made changes to the "displayWideBuildPlansList.ftl" template, but i am unable to make it work with the AJAX request.
I can inject the variable name/value into the request URL, the plan is being run, but the value is not overriden - aparently, either the AJAX request isn't written to account for plan variables, or i am using wrong variable name.

So now my question is:
What is the correct way to pass the plan variable/value via the standard AJAX request ?
Is it even possible?

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted 3 hours ago in Jira

Upcoming Enterprise releases targeting Q3 2019: Jira Software 8.5 & Jira Service Desk 4.5

Since launching the Jira Software 8.0 and Jira Service Desk 4.0 platform releases in February, many of you have been asking when the next Enterprise release will be so you can take advantage of the m...

164 views 0 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you