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

Auto generation of reference number

Nikhil Patil May 18, 2023

We have a requirement of auto generation of reference number depending upon fields that are selected by reporter while creating the ticket . The reference number should be generated when ticket is created or when the ticket is transition from status A to status B.

If the reporter select "Motor" from custom field Department while creating the ticket the reference number should be Motor_23_05 where Motor is selected by reporter from Department cf field, 23 is last two digit of year in which the ticket is raised and 05 is the 5th ticket under motor which is selected under department CF.
i.e., user has select department as “Motor” for the 5th time i.e., he has raised 4 tickets before by selecting the department as “Motor” and now its 5th time he is raising ticket by selecting "Motor" as department and the unique reference number we must get as “Motor_23_05”.

Reference number needs to be populated in new custom field.(for e.g. cf unique reference no.)

1 answer

1 vote
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.
May 19, 2023

Hi Nikhil,

There is probably a couple of ways to go about this, but whether I would attempt or not would depends on the number of options available for the Department field. But the thought is that you need a custom number field per Department value such as Motor Count, Engine Count, Tires Count, etc. depending on the number of values. This will be used to increment the number each time a combination of that Reporter username and Department are used. It might get a little messy around the user combination. 

Want you have that figured out, then you are good to go for the most part. You just put in automation rules or ScriptRunner rules to increment the number and another one to update the reference number field to concatenate the other fields. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events