Auto generate Project Number

Shashi Kempwodeyar
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!
January 5, 2022

Hi,

 

I have a use case to create template for my client to create projects.

I have created a Issue-Type as "Project" and assigned to "My-Client's projects" project

So when I click on Create

Project Required * - My-Client's projects

Issue Type * - Project

I have a required field Project Number

So I give a number for the project, say in the format YY-XXX

YY is current year and XXX is the number starting 001 to 999.

For this year 22-001 to 22-999

My Question: How do I make the custom field - Project Number to auto populated with latest available number + 1

If there are no project available, it should start with 22-001.

If 22-345 is available , when I click on Create it should auto populate Project Number  value as 22-346.

Can you please help me here ?

Thanks

Shashi

1 comment

Comment

Log in or Sign up to comment
Nic Brough -Adaptavist-
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 Leaders.
January 5, 2022

You will need to do some coding - I would recommend a post-function on the "create" transition that can do a search in the project for the current list of values of your number held on existing issues, and add 1 to the highest it finds, then add it to the field on the new issue.

TAGS
AUG Leaders

Atlassian Community Events