The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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 @jfischer
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
I updated the sample. It’s not a numeric field. It works if I just print the value but no string manipulation works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @jfischer
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 @jfischer
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.
Interesting! My field type is single select list. I’ll have to do more testing. Thank you!
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 @jfischer
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.
👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.