Why don't text functions work on custom fields?
I have a simple test automation to make a comment of the result of some text manipulation, but it doesn't work with custom fields. Can anyone help me figure this out or am I out of luck?
The automation is responding to a field change event, then an action of add a comment. Below are my comment results:
Works
Result: {{issue.Store Location}} -> "Result: Store Name 143"
Doesn't work
Result {{issue.Store Location.capitalize()}} -> "Result: "
Hi @Jeremiah
Have you confirmed the type of that custom field is not numeric?
And, smart values are spacing and case-sensitive...have you confirmed that is the correct name of the field? Perhaps when the function is added a name error causes a problem. Please try this how-to article with an example issue to learn the smart value for your field: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
Kind regards,
Bill
Hi @Jeremiah
Can you give more context of what you are trying to achieve ?
In your example, issue.Store Location has as value 143 ?
If it is, why are you trying to use that function on a number ?
Regards,
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That was just an example of a text function. The store location is longer and text based. I tried the simplest function. Either way, there’s no output.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jeremiah
I just tried an example on my sandbox instance and created a custom field of type Text Field (multi-line) and it successfully used the function:
Are you using Jira Cloud? What custom field type is the field you are having the problem with ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This lead me down the right path. I was missing .value - because it's a select list and not just a straight text field. argh! Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jeremiah
If the custom field is of type: Select (dropdown) then the smart value would have need to be this way to be used with the text function:
{{issue.Store Location.value.capitalize()}}
Can you confirm this worked ?
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.