Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Branch rule / related issues by JQL doesn't accept smart values

David Leal
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.
Aug 31, 2023

I have used smart values in other JQL-related actions, but for branch rule / related issues I can't:

Screenshot 2023-08-31 at 9.20.05 AM.png

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

2 answers

1 accepted

2 votes
Answer accepted
Jehan Bhathena
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 31, 2023

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 : 

image.png

David Leal
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.
Sep 01, 2023

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

3 votes
Bill Sheboy
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.
Aug 31, 2023

Hi @David Leal 

A couple of things...

  • There appears to be a typo in the smart value for userInputs in that JQL
  • Are there multiple values in that input, or just one value?  If multiple you may need to parse that into a list to work: CSV with quotation marks around each value.

Kind regards,
Bill

David Leal
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.
Aug 31, 2023 • edited

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

Like Bill Sheboy likes this
Bill Sheboy
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.
Sep 07, 2023

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. 

Like David Leal likes this
David Leal
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.
Sep 07, 2023

Thanks, @Bill Sheboy good idea, it would require converting the input string into a list first via split(",") for example.

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events