Forums

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

Can a Task (not sub-task) be auto-created for another ticket?

Dmitry Panov February 2, 2023

I have a ticket (let's call it Ticket A) with required field, options "Yes" or "No".

I'd like to know if it is possible to auto-create TASK (not sub-task) if user picks YES in the required field of Ticket A. That Task needs to be auto-created for the same project with ability to change that Task to a different project, if needed (because you can't really move sub-task from its parent's project to some other project by default, from what i understand)

Thanks, any help is appreciated.

 

2 answers

2 accepted

1 vote
Answer accepted
Mikael Sandberg
Community Champion
February 2, 2023

Hi @Dmitry Panov,

Welcome to Atlassian Community!

Yes, automation can create tasks, and would look something like this:

Screenshot 2023-02-02 at 4.08.16 PM.png 

In this example I used Priority as the field to check, just change that to your custom field.

Dmitry Panov February 2, 2023

Awesome! Thank you, Mikael!

side question: if I also wanted to "block" ticket A from being closed (moved to status DONE) until Task is marked as DONE, how would automation go about that?

And I'm also assuming that Task can be moved to any project later, if needed, correct?

Mikael Sandberg
Community Champion
February 3, 2023

So regarding blocking issue A from being closed, the automation would look something like this:

Screenshot 2023-02-03 at 8.01.11 AM.png

Note that this is just an example and have not been tested, and I would probably use a different link type as well.

Yes, your tasks can be moved to other projects after they have been created, just make sure that any automation that deals with issues spanning multiple projects have those listed under rules details.

Dmitry Panov February 3, 2023

Mikael, thank you again!

Sorry, but another quick follow up question: we don't want for Ticket A to be transitioned to be in "in progress". We want it to be in any status but DONE, unless Task is marked as Done, essentially blocking user from closing Ticket A.

to give you more perspective, here's what we're looking for:

1. Ticket A is opened, answer to required question is YES

2. Task is auto-populated for the same team, Ticket A's status "DONE" is blocked (you shouldn't be able to pick/save it that status), but Ticket A can move to any other status (In Progress, In Review)

3. Once Task is marked as DONE, Ticket A is "unblocked" and can have ANY status, including DONE.

Is something like that possible?

Mikael Sandberg
Community Champion
February 3, 2023

In that case you cannot use automation, since rules are triggered after an action is taken. You would need an app that integrate with the workflow, like Scriptrunner or JSU Automation. There are other apps in the Marketplace that can do that, these two I have used in the past.

Evn Tomeny [Appfire]
Atlassian Partner
February 8, 2023

Hi Dmitry,

Evn from Appfire here. I wanted to piggy back on what Mikael said to let you know that JMWE from Appfire allows you to add a Condition or a Validator to your Workflow that prevents a transition based on the status of one or more Linked Issues.Screenshot 2023-02-08 at 9.59.03 AM.png

Let me know if you have any questions!

Cheers,
Evn

0 votes
Answer accepted
Dmitry Panov February 3, 2023

Understood. 

Still a bit confused on one part:

>So regarding blocking issue A from being closed, the automation would look something >like this:

Screenshot 2023-02-03 at 8.01.11 AM.png

It says "If: Linked Issues match

Types: related toMatch: status !=Done"

 

I'm assuming you're talking about Task's status != Done?

If so, shouldn't it be the other way around? like "

If: Linked Issues match

Types: related toMatch: status = Done"

Then: Transition the issue to "In Progress"

 

let me know if I'm reading diagrams wrong.

Can't thank you enough.

 

D

Mikael Sandberg
Community Champion
February 3, 2023

So the example is pretty simplified. If I would implement is it I would use a different link type, like composed of/composes and also add in a check for the required field for ticket A. That way you limit the number of false positives.

What the If: Linked issues is doing is checking if the linked issues, in this case your tasks that you link to ticket A to see if they are still open, and if so move ticket A back to an open status. 

I use a similar automation for an external system that generates issues in Jira, and if a team is closing the Jira issue before the external system has cleared it, it will reopen the issue and add a comment saying that the external system still sees it as an open issue.

Dmitry Panov February 3, 2023

Understood. Thank you!

Like Mikael Sandberg likes this

Suggest an answer

Log in or Sign up to answer