Forums

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

How to create a Story with a SubTask on a different project from the starting one ?

Fabio Salvi January 31, 2024

Hi Everyone,

 

I have created a Manual Action, this action must be executed by an Epic and must create a child story and a subTask of the story just created.

Of this Action I have 2 versions
1) that creates Story and subTask on the same project as the Epic => It works


2) Story and subTask are on another project => Does not work, the Story is created but subTask is not created.

 

image.png

 

image.png

 

image.png

The 2 actions are identical, it only changes that in the second case Story and subTask are created on another project.

Can you help me understand why the subTask is not created in case 2 (another project)

 

Thanks

3 answers

1 accepted

0 votes
Answer accepted
Bill Sheboy
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.
January 31, 2024

Hi @Fabio Salvi -- Welcome to the Atlassian Community!

Based on your rule and audit log details, I suspect this is what is happening:

  • Your rule has project-level scope (but not in the "Mobile" project)
  • It creates the Story in "Mobile" project, and that works
  • Then the rule tries to branch to the Story in the "Mobile" project to add the subtask (also in the "Mobile" project because it is part of the parent story), and that does not work

Project-scope rules can create (or clone) issues into other projects, but they cannot see them or edit them.  And even if it could see them, it could not edit them: as @Nic Brough -Adaptavist- notes, subtasks are part of the parent issue, and that is in the other project.

 

There are two solutions, depending on what data you need to create the subtask:

  • If the subtask is getting some data from the original Manually Triggered issue, the rule scope will need to change to multiple-project, stored at the global rules level.  Please discuss this with your Jira Admin as they will need to make the changes.  This is better than the next one...
  • If the subtask only needs data from their parent issue, you can create a second rule in the "Mobile" project, triggered on Issue Created, which will add the subtask
    • This approach is only relevant if you can accurately detect when a subtask should be added.  You probably do not want to add subtasks for every issue created in the "Mobile" project :^)
    • By default, the actions of one rule cannot trigger another rule.  This is to prevent errors and rule-looping problems.  When you want an action (like issue create) to trigger another rule, the option "Allow Rule Trigger" should be enabled.  Definitely talk to your Jira Admin before enabling this option for a rule.

Kind regards,
Bill

Fabio Salvi February 1, 2024

Thanks for your response

Yes exactly what I wanted to do

On the EPIC ( Project 1) I press on the Action "Create Story on Project 2"
On creation of the story on project 2 , autoamtically always on project 2 I would also like to create a child (subTask) related to the Story just created.

 

Thanks

Bill Sheboy
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 1, 2024

Thank you for confirming your scenario.  Please see the two approaches I described, and discuss with your Jira Site Admin to decide which to use:

  1. single rule at the global scope, possibly selecting the specific projects
  2. two rules, in different projects, and one can trigger the other
0 votes
Kate Pawlak _Appsvio_
Community Champion
January 31, 2024

Hi @Fabio Salvi

Subtasks must be created in the same project as Task/Story. It's not possible to split them. What you can do is creating Epic (issue type level +1) and Task/Story/ any other issue type from level 0 in different projects.

Here is what I found in the official Atlassian documentation (source)

Note that when you create a subtask, the following values are inherited from the parent task:

  • project

  • issue security level

  • sprint value (if any)

Nic Brough -Adaptavist-
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.
January 31, 2024

It's not even a case of "must be in the same project".

A sub-task is a fragment of its parent, not an independent entity.  It's complete nonsense to have a sub-task in another project.  Imagine having the spark-plugs in your car in a different county to the rest of your car - your car will not work.

Like # people like this
Fabio Salvi February 1, 2024

Thank you for your response

Let me clarify better

 

On the EPIC ( Project 1) I press on the Action "Create Story on Project 2"

The goal is to create on project 2 both the story and the subTask ( the parent of the subTask must be the story just created)


On creation of the story on project 2 , autoamtically always on project 2 I would also like to create a child (subTask) related to the Story just created.

 

Thanks

Nic Brough -Adaptavist-
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 1, 2024

Ah, I misunderstood the question!  Sorry!

0 votes
Jehan Bhathena
Community Champion
January 31, 2024
Fabio Salvi February 1, 2024

Thank you for your response

The cases do not seem to be the same as mine .

Let me clarify further


On the EPIC (project 1) I press the action "Create story on project 2".

The goal is to create on project 2 both the story and the subTask (the parent of the subTask must be the story just created).


Upon creation of the story on project 2, automatically always on project 2, I would also like to create a child (subTask) related to the story just created.

Translated with www.DeepL.com/Translator (free version)

Like Jehan Bhathena likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events