Convert Custom Name Field to Proper Case

ayoung May 8, 2024

Scenario: I am using a look up table with agents names and Team Lead names to assign tickets.  All working great! However, to ensure the Agent names matched the look up table exactly I was going to create a DDL of these but found out they are limited to 55 rows and I have 97 agents.  So I had to make the Agent name field be free text. Boo.


Challenge: The issue is to make an exact match to the look up table the case and EVERYTHING has to match. (understanding typos will happen with free text we have an exception path for this if they are a true typo) but looking to fix the bulk of case issues right in the automation to reduce exceptions. 


Desired Outcome: If someone types in JANE DOE or jane doe. I want to run an automation to update that field to be Jane Doe so it will always match the look up table case format. I found how to force it to lower case which seems odd for names or full caps which is also an odd one and not natural for name fields. Any way to switch them to proper case? 

1 answer

1 accepted

0 votes
Answer accepted
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.
May 8, 2024

Hi @ayoung 

There is no built-in "Pascal Case" function for rules.  As a workaround you could:

{{#yourField.lowercase().split(" ")}}{{capitalize()}}{{^last}} {{/}}{{/}}

The "trick" here is some of the smart value functions can work on a list item / value even when it is not named directly.  The list item from split(" ") is normally referenced as {{.}} but that is implied with the expression shown.

Kind regards,
Bill

ayoung May 8, 2024

Thanks Bill appreciate this creative work around to get what we're looking for!

Like Bill Sheboy likes this
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.
May 9, 2024

I updated the suggested solution so there is no trailing space after the last word parsed from the field.

Suggest an answer

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

Atlassian Community Events