Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Text Functions don't seem to work on custom fields

Jeremiah
Contributor
June 6, 2022

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: "

2 answers

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 6, 2022

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

Jeremiah
Contributor
June 6, 2022

I updated the sample. It’s not a numeric field. It works if I just print the value but no string manipulation works. 

0 votes
David Freitez
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 6, 2022

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

Jeremiah
Contributor
June 6, 2022

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. 

David Freitez
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 6, 2022

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:

 

image.png

 

Are you using Jira Cloud?  What custom field type is the field you are having the problem with ?

Jeremiah
Contributor
June 6, 2022

Interesting! My field type is single select list. I’ll have to do more testing. Thank you!

Jeremiah
Contributor
June 6, 2022

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!

Like Bill Sheboy likes this
David Freitez
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 7, 2022

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 ?

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events