Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Q&A
  • Jira
  • Questions
  • Auto increment a custom field on Jira cloud where the counter continues monthly but resets annually?

Auto increment a custom field on Jira cloud where the counter continues monthly but resets annually?

Maria Zahid
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 15, 2026

Hi Experts,

I am trying to create a custom field in Jira, that automatically generates a unique incremental identifier every time a new story is created. The required format for this identifier is YY‑MM‑XXXX, (YY - last two digits of the year, MM - month of creation, and XXXX - sequential number).

For example, the first story created in January 2027 should have the value 27‑01‑0001, the next one 27‑01‑0002, and so on.

When the month changes, the identifier should reflect the new month, but the incremental counter should continue increasing rather than resetting; for instance, if three stories are created in February, they would be: 27‑02‑0003, 27‑02‑0004, and 27‑02‑0005.

However, when a new year begins, the counter should reset, so the first story created on January 1, 2028 will be 28‑01‑0001 and continue following the above logic.

1 answer

2 votes
Marc -Devoteam-
Community Champion
June 15, 2026

Hi @Maria Zahid 

First why, as each work item in Jira has already a unique identifier and on creation created date is stored?

Second, calculation on number increments can only be done with number fields, these fields can only hold numbers no text characters.

You could use project properties see these articles for more info on project properties.

Maria Zahid
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 15, 2026

Thank you @Marc -Devoteam- for your input.

You are right that Jira provides a unique issue key but, in our case, we need an additional business-specific identifier to track customer RMAs. This identifier is not intended to replace the Jira issue key but to align with our internal process.

Regarding your second point, I agree that numeric incrementation is handled by number fields. In our case, the requirement is to generate a sequential numeric counter, but present it as part of a formatted identifier (YY‑MM‑XXXX) under a custom field. So, while the core logic is numeric, the final value is a structured combination of date and sequence.

Marc -Devoteam-
Community Champion
June 15, 2026

Hi @Maria Zahid 

Then see the options using project properties.

Or see other ways to identify an issue to a customer, is there a way via webhook or API to get this business specific identifier to add?

Maria Zahid
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 15, 2026
Hi @Marc -Devoteam- I am not sure how this could be implemented using project properties. Could you please elaborate a bit more if possible?
Marc -Devoteam-
Community Champion
June 15, 2026

Hi @Maria Zahid 

Look at the links I shared.

Like Maria Zahid likes this
Maria Zahid
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 16, 2026

Hi  @Marc -Devoteam- 

I used one of the solutions from this thread (https://community.atlassian.com/forums/Jira-questions/Auto-increment-a-custom-field-on-Jira-cloud/qaq-p/2280500) and I’m able to generate an incremental ID. However, I’m facing an issue with formatting.

 

Currently, the generated value is something like 26061, but I need it in an 8-digit format, for example 26060001.

To achieve this, I tried using the following expression in the Edit work item fields step:

{{now.format("yyMM")}}{{project.properties.sequence.padLeft(4,"0")}}, 

but the sequence part is not being appended correctly, and I only get the date portion.

Could you please guide me on how to correctly format the incremental value to include zero-padding and ensure the sequence is properly appended? I have attached screenshots for reference.

SH#01.PNGSH#02.PNG

Marc -Devoteam-
Community Champion
June 16, 2026

Hi @Maria Zahid 

Use {{project.properties.sequence.leftPad(4,"0")}}

Maria Zahid
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 16, 2026

Hi @Marc -Devoteam- 

I tried with the changes you suggested but now I'm only seeing year and month without incremental value. 

{{now.format("yyMM")}}{{project.properties.sequence.leftPad(4,"0")}} - this is the updated expression I have used, while keeping the other setting as is.

SH#03.PNG

Marc -Devoteam-
Community Champion
June 16, 2026

Hi @Maria Zahid 

You can't combine function like this into a single value.

You probably can store the dat in the field using smart value options for concatenate

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/ 

So you probably will have to store the date value into a variable and concatenate the variable and the property.

Suggest an answer

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

Atlassian Community Events