Update Count of same issue types in a custom field

Mahima Srivastav May 8, 2021

I'm trying to generate Serial Numbers for Issues raised based on same Issue Type

I have created a custom field called "Serial Number" and I want it to be updated with the next number when a new Issue of the same Issue Type is generated.

Purpose:

Different Service Requests are being generated within one project and I want each type of requests to have their own unique number since Jira generates Issue Key with the Project prefix.

Issue Types:

  1. Complaints
  2. Requests
  3. Incidents

Hence if a new Complaint is raised, I want its "Serial Number" field to be updated based on the {count of complaints + 1}

Anyway I can do this via Project Automation?

1 answer

2 votes
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 8, 2021

So you could do this with Project Entity Properties. These are values are stored with your project, so you could have something like complaints-serial, requests-serial, and incidents-serial.

It turns out these properties can be accessed by an undocumented Smart Value, like this:

{{project.properties.complaints-serial}}

You might manually want to set these all to 1, or 100, whatever you'd like to start numbering with. I use the very handy Entity Property Tool. 

After setting the initial values, I recommend disabling the app (for all users) because there's a bug where it can't actually just be enabled for a single user, and it shows various Issue Properties that may confuse users or cause add-ons to fail if they are changed. 

Anyways, once the initial values are set, it's as simple as creating a rule triggered by Issue Creation that depending on Issue Type, it increments the appropriate counter by one and Sets the entity property for the Project. It would look something like this. (I didn't have the same issue types as you, so I used Improvements.)

Screen Shot 2021-05-08 at 6.04.46 PM.png

Suggest an answer

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

Atlassian Community Events