I've modified my summary field to include the project key, year, and I want a rolling counter as all issues are created.
I can't seem to find an ideal way to store a global value that all issues within my project can pull from and increment.
Essentially I want to create something similar to the list below. I could create a custom entry in a database and potentially access that field with scriptrunner, but I want to keep as much as I can within the core of scriptrunner and jira core to avoid having too much of a home rolled system.
PROJ-2019-0001...PROJ-2019-3142, PROJ-2019-3143
PROJ-2020-0001, PROJ-2020-0002...PROJ-2020-XXXX
That's an ugly misuse of the summary field, but I'm sure you have some justification for it.
I would not try to do this with a variable, you are probably going to find it does "interesting" things due to the way Jira does things internally.
I am also unsure of what use such a global value would be, all I can think of is "number of issues we've created", but you can get a more useful number by simply asking how many issues are returned by a query for everything (or with SR, pull the number from the system information page)
If you just want a numeric unique id as an alternative for issues, you can easily get to the issue id (it's the id in the jira issue table)
I had thought about that too. We're coming from a legacy system where there was very "blunt" ways of doing things, like adding counters to issues because we couldn't do simple actions like "Search all issues created within this year" easily.
The workforce has requested features like this because this is what they know. I'll work with the issue id for now and see if we can change this via culture.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good to hear - "we used to do it that way" is probably a good way to start process improvements - you did it that way because the tool was clumsy. Now you've got a better one, it's worth a look at using it better to support your desired ways of working!
The raw issue id in the database is not sequential, but it will increment with each issue (so you know issue 123456 was created after 123455), and you won't get the problems you might have with a variable. With scriptrunner, you can easily get to it with issue.getId()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.