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

Tomas Buzga November 7, 2012

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
James Dumay
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 15, 2012

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.

Tomas Buzga November 20, 2012

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).

0 votes
Tomas Buzga November 11, 2012

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
TAGS
AUG Leaders

Atlassian Community Events