Heads up! On March 5, starting at 4:30 PM Central Time, our community will be undergoing scheduled maintenance for a few hours. During this time, you will find the site temporarily inaccessible. Thanks for your patience. Read more.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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

 

 

 

 

 

TAGS
AUG Leaders

Atlassian Community Events