Hi Jira community,
I have read through the documentation here Jira smart values - text fields | Cloud automation Cloud | Atlassian Support on the different string manipulation methods available to format Jira Smart Values.
I need to capitalize each word in a field but I note that the "capitalize()" method only capitalises the first word in a field.
Use case example:
A text field contains the value "john smith". I need a method to transform the field value to "John Smith".
Do you know if such a method exists on Jira? I can't seem to find anything in the documentation.
Thank you,
Best regards
Jakob
Hi @Jakob Kristoffersen
You can combine multiple functions just like how we use them in Javascript. So in this case, you want to do the following:
1. Get the value of the custom field e.g. fullname
2. Split the text value bye .g. a space
3. Capitalize the first letter for each word
4. Join each word separated by e.g. a space
Try to use the following smart value:
{{issue.fullname.split(" ").capitalize().join(" ")}}
I hope it helps.
Best Regards,
Marini
Hi Marini,
Your suggestion worked. Thank you very much.
It looks like you're new here. Sign in or register to get started.