Hello all,
I have multi-select field "Node Type" (ID 16310) where I can select the options L, N and R.
Then I have select list field "Release" (ID 14639) where I can select the options 26.Q1, 26.Q2, 26.Q3 and 26.Q4.
I want to automation rule which will add value/s into the text field "Versions" (ID 15595).
When I select the options L, N and R in the field "Node Type" and the option 26.Q1 in the "Release" field then I want to add into to the Versions field: L 26.Q2, N 26.Q2, R 26.Q2
When I use the smart value {{#issue.customfield_14639}} {{issue.customfield_16310}} {{value}}{{/}} in the "Versions" field I get output: L, N, R 26.Q2
When I use the smart value {{#issue.customfield_16310}}{{value}} {{issue.customfield_14639.value}}{{^last}}, {{/}}{{/}} in the "Versions" field I get output: L, N, R
What is the right smart value to get output: L 26.Q2, N 26.Q2, R 26.Q2?
Hi,
Have you tried turning it around because I think you've got your custom fields switched:
{{#issue.customfield_16310}}{{value}} {{issue.customfield_14639}}{{/}}
Your 16310 field is the multiselect, right?
Hello Jeroen,
yes, the multi-select field is 16310. Anyway if I change it to your smart value:
{{#issue.customfield_16310}}{{value}} {{issue.customfield_14639}}{{/}}the result is still the same: L N R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see what you mean. Unfortunately not to do in a one-liner and here is why: Inside the list iterator you can not access other issue field values, that is why you only get L N R.
There is however a workaround. In you automation do the following:
Create a variable versionString with value
{{issue.customfield_14639}}
Create a variable textString with value
{{#issue.customfield_16310}} {{value}} %VERSION%,{{/}}
%VERSION% is a placeholder which you are going to substitute.
Create a variable resultString with value:
{{textString.replace("%VERSION%", versionString)}}
The result will be L 26.Q2, N 26.Q2, R 26.Q2,
It still has an extra comma at the end but there will possibly be a string fucntion you can use to trim this off (link is for cloud, but functions do exist on DC):
Automation smart values - text fields | Cloud automation Cloud | Atlassian Support
Hope this helps!
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.