Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to automate adding characters to a field in a ticket?

Joshua Young March 13, 2024

I am trying to set an automation for incoming tickets that will check a field and if it isnt formatted properly to automate a correction to the data in the field. 

The field is an ssn field that allows users to enter the ssn as either 123456789 or 123-45-6789. And the preferred formatting is the latter. 

i was able to get as far as when an issue is created, if the field does not contain "-" then edit field.

im stuck on how to retain the inputted data and add the "-" characters 

any help is appreciated, thank you,

2 answers

1 accepted

3 votes
Answer accepted
Kalyan Sattaluri
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.
March 13, 2024

Hello @Joshua Young 

Probably many ways to do this, I could think of substring function.

if my field was called "Text 1", then below will give me formatted string:

{{Text 1.substring(0,3)}}-{{Text 1.substring(3,5)}}-{{Text 1.substring(5,9)}}

 

In my test, I am checking if length is 9, then do this step:

image.png

 

Joshua Young March 13, 2024

thank you for your help, im going to try this in my environment

Like Kalyan Sattaluri likes this
Kalyan Sattaluri
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.
March 13, 2024

Please store your original SSN value in a variable, modify the variable as above and finally store that variable back in your field.

Like Joshua Young likes this
0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 14, 2024

Hi Joshua,

Are you using an Advanced Form? If so, you might be able to set the format there to enforce the entry. 

Joshua Young March 14, 2024

im not using a form here, just a custom field on the ticket.

Suggest an answer

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

Atlassian Community Events