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

Accepted Answer
0 votes

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
Community showcase
Published 13 hours ago in Jira Ops

Jira Ops Early Access Program Update #1: Announcing our next feature and a new integration

Thanks for signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...

166 views 0 5
Read article

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