Forums

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

Format text field that is like a date into a label

Andy Tran
February 5, 2026

I've read a few posts that are similar but still cannot figure out how to transform my text field into a label with jira automation.

Problem:

I have a custom text field {{issue.customfield_12345}} that get automatically filled with a value of "Q1 2026".  Yes there is a space between the QQ and YYYY.  

Outcome: I'm trying to convert this into a label but want the value to be "2026Q1" with no space.

This seems simple but I'm not sure if "Q1" would be recognized as "QQ" if I were to format.

1 answer

1 accepted

1 vote
Answer accepted
Chris Rogers
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 Champions.
February 5, 2026

Hi @Andy Tran 

If I'm understanding correctly, you want to use Jira automation to:

  1. Read in a value like "Q1 2026"
  2. Convert that to a value like "2026Q1" and add that as a label?

As long as this is consistently how you have this formatted in your text field, you should be able to do this with automation, with some text manipulation functions.

Here's a simple test I did in Automation:

 

2026-02-05_11-19-42.png

The variable I created used the substringBefore and substringAfter functions to pull the relevant parts of the text out.  Here's the value:

{{TextCustomField.substringAfter(" ")}}{{TextCustomField.substringBefore(" ")}}

Which basically translates to "give me the text after the space and add it to the text before the space"

Give that a try and see if that works!

Andy Tran
February 5, 2026

This worked perfectly.  Thank you

Chris Rogers
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 Champions.
February 5, 2026

Awesome, glad I could help!

Suggest an answer

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

Atlassian Community Events