Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

In a bamboo plugin. How do I get the values for substituted variables?

Geoff Bullen October 29, 2015

I am writing a custom task.  My starting point was https://developer.atlassian.com/bamboodev/bamboo-tasks-api/writing-a-task-with-a-user-interface

If I use a variable in the UI text field, I can't figure out how to get at it's value in my code.  For example if I enter ${bamboo.myVariable}, how do I get at it's value?

taskContect.getConfigurationMap() has ${bamboo.myVariable} 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Preston Gilchrist November 2, 2015

taskContext.getConfigurationMap().get("my.configuration.variable.from.ftl"));

 

Make sure that your configuration class is complete and has the following method implemented:

@NotNull
@Override
public Map<String, String> generateTaskConfigMap(@NotNull ActionParametersMap params, @Nullable TaskDefinition previousTaskDefinition)
{
final Map<String, String> config = super.generateTaskConfigMap(params, previousTaskDefinition);
taskConfiguratorHelper.populateTaskConfigMapWithActionParameters(config, params, FIELDS);
return config;
}

 

 

TAGS
AUG Leaders

Atlassian Community Events