Closed brhahlen closed 6 years ago
We need this plugin to create releases, as the official one cannot pass variables into a "wildcarded" release template. (Calling a release template with a variable in the name, as we always know one part, but not the variable part).
Part of the JIRA Query is in the variables, which looks like: PROJECTNAME = "ABC", "DEF", "GHI"
This is being parsed into: ""ABC", "DEF", GHI"" Escaping the " does not work for the JIRA Query
So basically: Two releases, Test and CallMe CallMe has the PROJECTNAME variable, and is being called by Test.
The JIRA API requires an "in" statement to look like:
project in ("ABC", "DEF", "GHI")
Which is why I can't use a list variable for this, as that would show it as:
project in (["ABC", "DEF", "GHI"])
JIRA Query in XLR is:
project in (${PROJECTNAME}) and status = "CLOSED" and type = "Task" and priority = "Minor"
(Testing against our JIRA)
@jdewinne I could use some help with this, if you please :-)
@brhahlen What is the type of the variable you're doing this with?
It is a TEXT variable. I have tried to use a list, but the problem is that the formatting of a list is different and doesn't work at all with the JIRA query.
But a TEXT
variable should work already. Some questions:
CreateAndStartSubRelease
task, correct?So, what we are doing:
We have a "generic" template that calls upon a specific template, based on the ${APPLICATION_NAME}. This means that we cannot use the built-in Create Release, as that will not give you the option to populate the variables.
The application template, has a number of variables, including two for the JIRA Query Tile:
${PROJECTNAME} and ${FIXVERSION}. The JIRA query for the tile looks like:
project in (${PROJECTNAME} and fixVersion in (${FIXVERSION})
Said variables need to take the form of:
"PRJ1","PRJ2","PRJ3"
Now, those two variables already have default values assigned, so we do not necessarily need to pass them to the new release, but it seems that CreateAndStartSubRelease
requires them to be passed anyway.
Does that make sense and answer your questions?
Get it now. The problem is 2 fold:
,
char. That we can make configurable."
. That is a problem, as behind the scenes we use json, which is going to conflict with your "
. Can you use single quotes for the JQL?I tried reproducing the problem with default values, where it still requires a value to be set in the parent, but couldn't reproduce that. Conclusion: If you can use single quotes in your JQL, we might be able to workout a solution.
Using single quotes in JQL is possible, so I think that could be a good solution. I think we have to do some refactoring on our end, but that's not a problem.
Can you check v2.2.0. I've introduced a new property for specifying variables that takes a map. The old style is now deprecated. And it should also work with double quotes.
This issue is indeed fixed in v2.2.0 (and later versions). Closing this issue.
When trying to start a release, which has multiple values in a variable, the plugin throws the following error:
I have tried the fix proposed in #16, but that doesn't seem to work for this.