The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Number sequence to be generated

Kustagi Suma
February 26, 2026

Hi,

  I have created a automation rule to get Number sequence once issue type is created in jira but seems the sequence number is not getting updated automatically.

Rule steps

1.Issue created 

2.Issue type = Risk

3.{{lookupIssues.Sequence Number.max.plus(1)}}

 

Let me know if I have missed something or need to change the smart value.

REgards,

Suma

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Arkadiusz Wroblewski
Community Champion
February 26, 2026

Hello and Welcome @Kustagi Suma 

You’re super close, but two key pieces are missing.

Right now you’re using {{lookupIssues…}}, but that only works if you actually add a Lookup issues action first. And even after you calculate the value, Jira won’t update anything unless you write it into the field with an Edit issue action.

A working flow is:

Trigger: Issue created

Condition: Issue type = Risk

Action: Lookup issues (JQL like: project = XYZ AND issuetype = Risk AND "Sequence Number" is not EMPTY)

Action: Edit issue → set Sequence Number to:
{{lookupIssues."Sequence Number".max.plus(1)}}

Also add a fallback for the very first Risk:

If {{lookupIssues.size}} = 0 → set Sequence Number = 1

Else → max + 1

One more heads-up: this “max+1” approach can create duplicates if two Risk issues are created at the same time. If you need guaranteed unique numbering, you’ll need a real counter (Assets/external/etc.).

0 votes
Ajay _view26_
Community Champion
February 27, 2026

This could be done with a rule like:

  • When issue created
  • Set an entity property on the project. E.g. property name = "count"
  • Set the value to:
    {{#increment}}{{issue.project.properties.count}}{{/}}
    
  • Then Edit the issue and set a field value to:
    {{issue.project.properties.count}}
    

That would set the value uniquely for every issue created in that project.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
TAGS
AUG Leaders

Atlassian Community Events