Forums

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

Changing Issue Key to customized number

Samandeep Singh February 21, 2019

I want to change the keys of Taska and Sub-Tasks to the customizable number.

For example, I have created Tasks and Sub-Tasks for a project.

So, I would like to give the first Task as Issue Key:- "1"  and for 3 subtasks within it as-   "1.1, 1.2, 1.3"    issue Keys.

 

Please Help

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.
February 21, 2019

Hello,

You can not do it.

You can create your own custom field and fill the value of the field with a scripting add-on.

Samandeep Singh February 21, 2019

How can we do that?

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.
February 21, 2019

You could use the Power Scripts add-on.

Let s say you create a custom field called "Issue Number"

Then you could add a post function to the create transition with a code like this:

persistent number counter = 1;
if (issueType == "Task") {
    #{Issue Number} = counter;
    counter++;
}
if (issueType == "Sub-task") {
   string subtaskkeys = subtasks(parent);
int subtaskcode = size(subtaskkeys) + 1;
   #{Issue Number} = %parent%.#{Issue Number} + "." + subtaskcode;
}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events