You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I am attempting to use automation to ADD a dynamic Label derived from two custom fields.
The automation currently is attempting to do the folllowing:
*Note:
{
"update": {
"labels": [{
"add": "string1"
},
{
"add": "string2-{{issue.cf1_Value}}-{{issue.cf2_Value}}"
}]
},
}
The cf1_Value is the display name of the custom field vs. the ID (cf#####) format.
I feel like one of these options should enable this operation but so far, I've not been able to crack the nut. Anyone have a solution for this challenge? Thanks!
Hello @Doug Winenger
Did you try it with variables like
vparent = {{issue.cf_XXXX.value}}
vchild = {{issue.cf_XXX.child.value}}
vlabel = {{vparent.concat(vchild)}}
and set your label with {{vlabel}}
Thanks @JM Perrot
I'm trying to concatenate 5 different values (vs. 2):
Using the method you describe, I'd have to do a series of variables to build out my string using concat() based on what I'm seeing. That probably will work. I'm just thinking there's got to be a more efficient way to build the final string I need for the label.
In any case, I've tried the initial steps of your idea. So far, my variables are not set with my custom field values. I've tried variations of the syntax below attempting to set my "vparent" value from the field's value.
I've tried:
Each time, my automation "Succeeds" but I have no value in my variable in the audit log. Note, i've tried this with two different custom fields as one is a number and the other is a dropdown/string. I get the same result (null value) each time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey, it's normal, the syntax is not correct, sorry I wrote an abbreviation
the correct smart value is : {{issue.customfield_22190.value}} for the parent value and {{issue.customfield_22190.child.value}} for the children.
If you have just a simple custom field (not a cascading list) you can just write {{issue.customfield_XXXXX}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
okay, that syntax worked on my first field...thank you. I've read so many articles and questions...finding the correct syntax is a bit of an adventure...
I'm working on the logic to see if I can use this to get to my final label/string now...will update here if I get it to work :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
okay, happy to report that this process is working :)
I am currently creating and concatenating 8 variables in a sequence to get my final output.
I'm working through a final issue where my prior/dependent automations' label is not being applied or is being removed somehow...(now fixed - working 100% as expected)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For anyone that finds this and wants to know how it works, here's the process and syntax I used based on JM's suggestion:
My result is a string:
"lr-cf2_value-cf1_value"
I then used the {{labelFour}} smart value to ADD the label via the Edit Issue fields component.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad this is working!
As an aside, the Log action is very handy for debugging stuff like the above.
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.