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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.