Forums

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

Find newest task and create a subtask under it -Jira automation

Eran Malovany September 4, 2018

Hi, 

How can I automate the following, let's assume I have a story and multiple tasks link to it. on transition changed i would like to find the newest task, (can be based on Jira ID or custom field), and create a sub subtask under it...

please advise.

thanks!

3 answers

0 votes
Deleted user September 5, 2018

Hi Eran,

This is very easy to achieve with Automation for Jira. I've quickly implemented this myself to illustrate it to you. The rule would like the following:

 

 

 

 

createSubTaskForLinkedIssue.png

I've added an Issue Transitioned trigger which will fire when an issue is transitioned to In Progress.

To make sure that the rule only acts on Story issues, I use a Compare Condition to check the issue type. The rule will only continue executing if the issue is a Story.

If the issue passes this check then I use a JQL Branch to change the issue that I'm working on from the Story to the issue that is the most recently linked issue.

Once I have branched onto working on that issue I use the Create Sub Task action to create a sub task.

You should find it relatively easy to do this in Automation for Jira. If you wanted to create the sub task in all the linked issues, then you would change from a JQL branch to a linked issues branch.

Please get in touch if you'd like any help with this.

Cheers,

Simeon [Automation for Jira]

Eran Malovany September 12, 2018

Thanks for your feedback Simeon! very helpful.

will let you know if i have any question.

thanks again!

0 votes
Bryan McMillan
Contributor
September 5, 2018

I recommend PowerScripts over any of the others.  I have years of experience with ScriptRunner and JMWE but not with Automation for Jira. I would recommend Power Scripts for a host of reasons after having used it many times to solve a broad range of problems.  The scripting language can SIL for short (i.e., Simple Issue Language) is very easy to learn and use.  Power Scripts can replace JMWE, Create on Transition, Update on Transition, Clone Plus, Field Security for Jira and no doubt a host of others.  Additionally, you can use Power Scripts in conjunction with Power Custom Fields to add SIL scripts right on a special Custom Field for SIL Scripts and do amazing things you just cannot do with Automation for Jira.

Regards,

Bryan McMillan

0 votes
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.
September 4, 2018

Hello,

You would need an add-on for like Power Scripts, ScripRunner, Automation for Jira, JWME and so on.

Eran Malovany September 5, 2018

thanks! i am using Jira automation, what is the easiest way to implement it, let's assume i found the story and i need to search for the related issue, type = X , find the newest task and create a subtask... 

 

thanks in advanced.

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.
September 5, 2018

I am not that much familiar with Jira automation. Maybe someone will see the question and answer. I also added a tag for this question. This tag means that this question also concerns the Jira automation plugin. In this case the vendor will be notified of this question.

Eran Malovany September 5, 2018

10x Alexey!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events