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}
Community moderators have prevented the ability to post new answers.
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;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.