I'm trying to use an automation to set an issue label to an extracted string from another custom field.
I'm trying to set it as a smartvalue, when I test this: {{fields.cf[10358]}} it provides me with the complete string.
But the issue is it has spaces in it so cannot be set as a label. When I try any of the following it returns the smartvalue as completely blank!
{{fields.cf[10358].substring(5,10)}}
{{fields.customfield_10358.trim()}}
{{fields.customfield_10358.replace(" ","_")}}
{{fields.customfield_10358.format(“#”).substring(5,10)}}
Any suggestions?
What field type is the custom field?
Without that, it's more difficult to test this, but I found a few other questions which might help answer your need:
Ste
Thanks!
Went through the links and found one that worked. Set up a variable with this:
{{issue.customfield_10358.value.remove(" -").replace(" ","_")}}
Then 'Added' label using the variable name.
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.