I have a User defined field "Select list (multiple choices)"
The options are structured as "Optiontext 1 #01", "Optiontext 2 #02"...
In the automation, i have to sum all selected option values. So, I do a branching and get a smart-value {{Var}} for all entries.
Within the branch loop, I want to extract the number of the selection into another smartvalue. I tried:
{{Var.right(2)}}
{{Var.split("#").second}}
The result is empty.
Hi Marco - Welcome to the Atlassian Community!
Can you share a screenshot of your whole rule?
Upload is not possible, I get an upload error for jpg and png (35 kB).
Script
-----
Trigger
Branch "for all: Smart-Value" --> this works
Copy Branch-Variable into another variable --> this works
Split copied variable into a third variable --> this does not work, Variable is empty
Send email with all values
-----
Split is done: either {{Var.right(2)}} or {{Var.split("#").second}}
I get the right number of emails.
Content is:
Var1: Option #01
Var2: Option #01
Var3: {Empty} (Always)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Adding to John's answer:
Without seeing the exact smart value expressions you are using for the branch and the variables, and your entire rule, it will be difficult to diagnose what you describe. Providing this information is essential when asking for help with automation rules.
If you are only trying to sum those numbers which are part of the option names, that could be done without a branch like this:
{{#=}}0{{#issue.myMultiselectCustomField}}+ {{value.substringAfter("#")}}{{/}}{{/}}
This will iterate over the selected values, extracting the numbers to add them to the total, with an overall default value of 0 on the left side.
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.
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.