Auto Increment a number field of all the issues of a projects when I edit the number field of one is

Priyanka khare May 28, 2021

I want a script that will auto-increment the number field that is "Issue Ranking" having numbers from 1 to 100. So when I create an issue and manually number that issue say - 49(edit that issue ) then I need that the already existing 49 should become 50 and already existing 50 should become 51.. that is, it should automatically increment itself on the basis of what number I have selected in the recently created ticket.
similarly when I number the issue manually as 30 then already existing should be 31 and already existing 31 should be 32 and so on... .

can someone please help?

 

 

1 answer

0 votes
Nic Brough -Adaptavist-
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 28, 2021

Ok, yes, you could use Scriptrunner to do this, but before you go down this route, I want to question why you're doing this.

What you are describing here is a form of ranking. There are two questions that jump out when I realised that it was ranking:

  • Why are you not using the ranking built into Jira Software or the queues in Jira Service Management?  (Is the answer "I only have Jira Core"?)
  • Your "solution" does not scale.  There's a reason Atlassian stopped doing what you're describing years ago and it's that your scheme gets exponentially less performant as you rank more issues.

However, those lead me on to the easier question - what problem are you trying to solve with this?

Suggest an answer

Log in or Sign up to answer