Forums

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

Error When Creating Sub-Tasks in Automation

Amelia Giuliani
Contributor
February 23, 2023

Problem: 

I have a couple automations in a JSM project that create a task and then add subtasks to that most recently created issue. I am receiving the following error: 

 

Create subtasks
Some sub-tasks could not be created:
1: The issue type selected is invalid. (issuetype), Issues with this Issue Type must be created in the same project as the parent. (project), 2: The issue type selected is invalid. (issuetype), Issues with this Issue Type must be created in the same project as the parent. (project), 3: The issue type selected is invalid. (issuetype), Issues with this Issue Type must be created in the same project as the parent. (project), 4: The issue type selected is invalid. (issuetype), Issues with this Issue Type must be created in the same project as the parent. (project), 5: The issue type selected is invalid. (issuetype), Issues with this Issue Type must be created in the same project as the parent. (project), 6: The issue type selected is invalid. (issuetype), Issues with this Issue Type must be created in the same project as the parent. (project)

What I have tried so far: 

  1. I have checked that the task and sub-task are part of the issue type scheme for this project & that sub-task is actually a sub-task: JSM- issue type scheme.png
  2. That the original task being created is being created in the current project
  3. Searching google/this community for anyone else having the same problem... 
  4. Checking that other projects in the same company are not having this problem
  5. Staring into the abyss hoping for an answer.. no answer has come. 

 

Additional Info:

Here is the automation example: 

JSM-subtask automation setup.png

5 answers

0 votes
Chris Kite
Contributor
April 3, 2023

I'm having this exact same issue. I have an automation rule that creates an issue on the first of each month (CRON schedule). After the issue is created, I'm using the branch "for most recently created issue" with the action "Create sub-tasks" and it fails in the same way.

This is a rule that worked just fine on Server, but after migrating to cloud this week it is no longer working.

Chris Kite
Contributor
May 12, 2023

I forgot to reply to this earlier but I fixed it in my instance by simply deleting the "Create sub-tasks" action and re-creating it. In my case these were all automations that were exported from Jira Server and imported into Jira Cloud.

My guess is this is caused by the id of the sub-task issue type being different between server and cloud, and so it doesn't know how to map it properly after importing (though there is no indication of any problems through the Automation UI or when saving).

0 votes
Joseph Chung Yin
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 23, 2023

@Amelia Giuliani -

I agreed with what @Kai Becker stated, we will need more information on your "subtask creation" section you used in your automation rule configuration.

Once we obtained more details from you, then we can assist you further.

One common mistake that people do is what they used in the "Parent issue" parameter when creating sub-task (example image below).  It will be excellent that if you can provide us what you have in your rule configuration -

Screen Shot.png

 

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Technology Applications Team

Viasat Inc.

Amelia Giuliani
Contributor
February 24, 2023

@Joseph Chung Yin @Kai Becker I'm on the cloud version, so I think mine might look different. Here is what sub-task creation looks like: 

JSM - subtask creation.png

The branching rule for most recently created issue typically has worked to link the sub-tasks to the created task similar to how yours works in your screenshot. 

JSM- branching rule.png

Ben Walker
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 12, 2023

@Joseph Chung Yin 

{{createdIssue}} in the Parent Issue box only works for the first subtask for me if they are separated out into subtasks with extra fields. When I try to do createdIssue it will throw an error for the next subtask in the branch since it tries to create that 2nd subtask as a subtask under the first subtask and that is not possible. 

Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 12, 2023

@Ben Walker -

Can you provide details of your automation rule, so I can troubleshoot your issue further?

Best, Joseph

0 votes
Suzi Firth
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 23, 2023

Hi @Amelia Giuliani 

 

I'm a little confused why your automation says "Create 6 sub-tasks".

It should be listed as individual Sub-tasks. I'm not sure if this is an issue between Standard vs Premium.

Capture.JPG

Kai Becker
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 23, 2023

@Suzi Firth thats actually normal if you do not enter additional field values for the sub tasks.

Like Ben Walker likes this
Suzi Firth
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 26, 2023

@Kai Becker oh that's interesting. I see the difference now.

You chose the "Create Sub-tasks" action where as I had used "Create Issue" action and then selected  "Sub-task" in the Issue type drop down.

Two ways of achieving the same thing.

0 votes
Florian Bonniec
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 23, 2023

Hi @Amelia Giuliani 

I'm not use to the Cloud version but does it failes every time ? Does it create 1 subtask then failed ?

 

I wonder if the newly created issue is not the first sub-task created ?

 

Regards

Amelia Giuliani
Contributor
February 24, 2023

It doesn't full fail. It creates the main task before the branching rule but then fails for all the sub-tasks

0 votes
Kai Becker
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 23, 2023

Hi @Amelia Giuliani ,

from your screenshots and explanations, everything looks ok. Could you please add a screenshot of the audit log of the rule and the sub task part?

I would like to reproduce this.

Amelia Giuliani
Contributor
February 24, 2023

Here is the audit log: 

It is creating the main task so I know that up to that point it's ok. 

JSM - Audit Log.png

Simmo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 28, 2023

I would suggest that you maybe raise a support case. Failing that, in the project where you're trying to create them, what are the sub task types? Have they changed at all?

Suggest an answer

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

Atlassian Community Events