Creating an incremental custom field

Aviva April 27, 2013

Is it possible to create a numeric custom field with default value that will automatically increment by 1 for each new issue that is created?

And to make it even more fun, can I create a different series of these numbers with an alpha prefix.

For instance, I want to manage customer requirements from several customers in one project and want to issue a unique ID based on the customer.

Field 1 = SRS-1, SRS-2, SRS-3
Field 2 = TRS-1, TRS-2
etc.....

These could be in one field where I select the prefix or many fields if needed. (preferred method is one field.)

Also, can these fields be based on the value of a radio button or single select field?

(meaning if I have a previous field that indicates which project is involved, can that affect which serial number field is generated/activated)

Any help on this would be greatly appreciated.

Thanks!
Aviva

2 answers

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.
April 28, 2013

Wouldn't it be easier to simply capture the customer and project as custom fields on each issue? Using a string of numbers seems the wrong approach on this requirement.

0 votes
MJ
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 28, 2013

Hi Aviva,
I think I'm missing the point on why you want to have data like this available in a custom field. This would mean that down the line you will need to gather all this data under 1 and the same issue in order to see all relevant data. Wouldn't in this case using the "filter results" gadget for the JIRA dashboard combined with relevant JQLs provide you with an easier solution, with better overview?

Aviva April 30, 2013

We have within one project several subsets of requirements. We would like to have unique ID's that begin with a fixed pre-fix that indicates to which requirements subset the issue belongs.

We would want to create a search based on issue where the field is not equal to none to generate the list. Using a select list does not give us the unique ID.

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.
April 30, 2013

Er, yes it does, if you populate the select list correctly. Each option on a select list is unique within the select list, and only searchable on that select list.

In fact, it sounds like a cascading-select might be more use to you, but I'm not sure.

Aviva May 12, 2013

Maybe I'm not being clear.

We have an issue type requirement in project a.

Within that list of requirements we have subgroups of requirements. GeneralReq -1, GeneralReq -2, SizeReq -1, SizeReq -2.

I know that I can create all these requirements and then create a select list for requirement type. GeneralReq, SizeReq, etc.

The problem is that I want each GeneralReq or SizeReq to have a unique ID within the relevant Req subset. (not using the issue key)

A cascading select will only work for a predefined list, not to create unique IDs.

Suggest an answer

Log in or Sign up to answer