Forums

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

How to increment custom field value for same issue type

Shubham Burghate January 22, 2019

Requirement is to have for custom field Request No.  value get generated while issue moved from

DRAFT state -->Request state 

Then Request No. will be: 1 for first time

If some user creates an issue in same type and issue transition from Draft to Request then 

For that issue the Request No. field need to be automatically 2 which is non editable. 

Need suggestion how it can be possible to do this.

Thanks in advance, 

-Shubham burghate

1 answer

1 vote
Alexey Matveev
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 22, 2019

Hello,

You would need an add-on for it.

For example, you could use the Power Scripts add-on:

https://marketplace.atlassian.com/apps/43318/power-scripts-jira-script-automation?hosting=cloud&tab=overview

You could create a post function for the required transition with a code like this:

persistent number counter = 1;

counter++

The counter variable is your number.

In this post function persistent variables are used. You can read more about persistent variables here:

https://confluence.cprime.io/display/SIL/Persistent+variables 

Suggest an answer

Log in or Sign up to answer