I have used smart values in other JQL-related actions, but for branch rule / related issues I can't:
Am I doing something wrong, or is it a limitation in this case? I haven't read any limitations that restrict using smart values in this context. If so was it reported? Thanks
Hi @David Leal ,
Going from what the error says, you may have missed out on adding a Action/Component after the JQL branch. I tried a similar configuration at my end got the error :
@Jehan Bhathena correct, that was the issue, I was looking for some more complex errors related to the smart values, without looking at the obvious.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @David Leal
A couple of things...
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Bill Sheboy for your help on this. Do you mean I didn't add a space after in and I put user.Inputs instead of userInputs? I tested also the following:
labels in ({{userInputs.remLabels}})
but I am getting the same error. Yes, it is a list of values, but at this point, since it is a user input from a manual trigger rule, the error is not because of that. The input is in CSV format. Good point, I didn't know I needed to put quotation marks around each value. I am getting the error not executing the rule, but publishing the rule.
Note: I was able to convert the input with comma-separated values to add the quotation mark as follows, maybe there is an easier way, but the following works:
{{userInputs.keyList.leftPad(userInputs.keyList.length().plus(1), "\"").replace(",","\",\"").concat("\"")}}
For example, if the input is: a,b,c,d will return: "a","b","c","d". If I store the result in a smart variable. {{csvKeyList}}. Then using the split function the final result is a list, for example: {{csvKeyList.split(",").first}}, I am able to get the first element.
Thanks for any additional help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, and sorry for the delay in responding. It looks like you got it figured out.
For the CSV part, I was suggesting using an iterator to add the values to build the JQL. Something like this:
labels IN ( {{#userInputs.keyList}}"{{.}}"{{^last}}, {{/}}{{/}} )
That would iterate over the input values, wrapping each one in double-quotes, and adding a comma between each one. The {{^last}} part is to ensure their is not comma at the end.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, @Bill Sheboy good idea, it would require converting the input string into a list first via split(",") for example.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.