Forums

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

Is there a plugin that creates subtask or story keys that are the parent key (ABC)-01, 02, 03 etc.??

Mary Kelly February 24, 2025

Parent ABC-546

1st Subtask key ABC-546-01

2nd Subtask key ABC-546-02

3rd Subtask key ABC-546-03

etc.

2 answers

Suggest an answer

Log in or Sign up to answer
0 votes
Stephen_Lugton
Community Champion
February 26, 2025

Hi @Mary Kelly 

Work item keys are automatically assigned by Jira in the format "ProjectKey-NNNN" where NNNN is an incrementing number for each project.

There is no way to set up the work item key in the format you've asked about ie. "ParentKey-NN"

The simplest way to be able to view subtask keys would be to put "ParentKey-NN" at the start of the Summary for the subtask. 

This can be achieved by automation if you were to have a consistent set of subtasks for the parent story that would all have recurring summaries, e.g.

  1. Create Button
  2. Test Button
  3. Release Button

But if this is not the case then manually adding this when you create the subtask will be the easiest solution.

0 votes
Pasam Venkateshwarrao
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 25, 2025

Hi @Mary Kelly 

 

Yes this can be possible through REST API

Example:

    IssueInputBuilder issueBuilder = new IssueInputBuilder("Project1", 5L);//5 is the id for subtask type. You can know the id of subtask type by querying this REST api /rest/api/2/issue/createmeta
    issueBuilder.setDescription(">> Test Description");
    issueBuilder.setSummary("Test summary");
    issueBuilder.setProjectKey("Project1");
    Map<String, Object> parent = new HashMap<String, Object>();
    parent.put("key", "SOMEISSUE-234");
    FieldInput parentField = new FieldInput("parent", new ComplexIssueInputFieldValue(parent));

    Map<String, Object> customField = new HashMap<String, Object>();
    customField.put("value", "someValue");//This is some custom field value on the subtask
    customField.put("id", "12345");//This is the id of the custom field. You can know this by calling REST GET for a manually created sub-task

    issueBuilder.setFieldInput(parentField);
    issueBuilder.setFieldValue("customfield_12345",  new ComplexIssueInputFieldValue(customField));//here again you have to query an existing subtask to know the "customfield_*" value

    com.atlassian.jira.rest.client.domain.input.IssueInput issueInput = issueBuilder.build();
    BasicIssue bIssue = restClient.getIssueClient().createIssue(issueInput, pm);    
    System.out.println(">>> " + bIssue.getKey());

 

to get it to associate with the parent story. the setFieldInput to parent seemed to do it

 

 

Hope this helps

 

 

 

 

 

Payal _appbox_ai_
Atlassian Partner
March 5, 2025

Hi @Mary Kelly 

@Stephen_Lugton is right; there is no control over the issue key (at least on the cloud), and they get auto-generated.

The best option is to have the desired (incremental) key in the Summary of the newly created issue.

We at appbox allow you to create child issues using your own AI Prompts. This can simplify this task, and you can command the AI to create child issues in the desired format; please see the example demo below.

 

Demo - https://youtu.be/qtntxU7fiwY

 

Marketplace App - https://marketplace.atlassian.com/apps/1236275/ai-agents-for-jira-enterprise?hosting=cloud&tab=overview

 

Let us know if you have any questions.

Team,

Appbox AI

 

TAGS
AUG Leaders

Atlassian Community Events