How to create a Sub-task the same status as the parent Issue?

Hi everyone!

I have the following workflow:

Open > Design > Development > Testing > Testing UAT > Closed

I want to know if the following this can be done:

1) Only allow users to create sub-task in the states: Design, Development, Testing

2) When an user creates an issue in one state, the sub-task goes to Open. But I want that the sub-task to be created in the same state as the issue parent.

I've been reading but I don't find a solution or an impediment to do this things.

Cheers, Mage

3 answers

1 accepted

Hey Mage,

I'm not sure how it works with Nic suggestion, but just want to share with you something that for writing JIRA event listeners, you can have a look at:

https://developer.atlassian.com/display/JIRADEV/Writing+JIRA+event+listeners+with+the+atlassian-event+library

Cheers

1 votes

1) Yes and no.

To start with, the yes - all you do is define a new workflow, which has "Create" go to "Design". You then create a "workflow scheme" that says "for top level issues, use old workflow, and for sub-task types, use the new one". Associate that with the project, and you're done.

But the "no" bit - a workflow has one single entry point. You can only Create issues in one status. So it will ALWAYS be "design" in the scheme I outlined above.

2) You can't do this. Issues are created in one status.

But... answer 3... what you can do for both question 2 and the "no" in question 1: Find or write a "listener" that will spot sub-task "create" events, scan the parent for what that status is, and then push the sub-task into the right status.

Hi Nic!!!

Thanks so much for your quick answer!

Do you know how to write a listener?

Thanks a lot again!

Cheers, Mage

Hi Amanda!

Thanks for the tutorial!

Cheers, Mage

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,760 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot