Forums

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

How to resolve this issue - Parent issue can not be su? Jira Automation

Vladimir Sumilin
Contributor
February 27, 2023

Hello,

I have a problem right now with Jira Automation:

Action details:
Create issue
Error creating issue
Parent issue ID: '16291' / Key: 'SUP-36' can not be sub-task. (issuetype), Issues with this Issue Type must be created in the same project as the parent. (project)
Screenshot of my automation: 
Jirasss.PNG
How can I resolve this problem?
Best regards,
Vladimir

2 answers

0 votes
Patricia Francezi
Community Champion
February 27, 2023

Hi @Vladimir Sumilin 

As far as I could understand your rule is creating a Standard Issue type, and not a sub-task. 

Standard issue types, are already parents. 

Subtasks have different icons, and they are the same even they are customized.

So the error is that you are creating a standard and trying to child this to a already parent task.

The way i found to reach your scenario 

- Use lookup issues action to set the parent issue

- Use advanced braching to create a variable based on {{lookupissues}}

- Set the smartvalue as the variable under the 

image.pngimage.png

image.png

I hope this helps!

Vladimir Sumilin
Contributor
February 27, 2023

@Patricia Francezi thanks for your reply, but unfortunately it's still not working for me :( 

Patricia Francezi
Community Champion
February 27, 2023

Hi @Vladimir Sumilin please post your screen and configuration after changing as suggested. So I can see what's going on.

The rule i post worked perfectly. 

Vladimir Sumilin
Contributor
February 28, 2023

Hi @Patricia Francezi

 

Screenshots:
scorescreen.PNG

advanced.PNG

createnew.PNG

auditlog.PNG

Patricia Francezi
Community Champion
February 28, 2023

hi @Vladimir Sumilin ]

There are two corrections on your rule.

1) You need to set your JQL as key = YourissueKey

This is the number of the issue you want to have the subtask attached, that whay the parent of the issue you want to put the subtask in it.

 

2) the issue type selected in "Create issue action" must be sub-task. 

The way is configured now it will try to create a standard issue again. 

Fix that and let me know if it works. 

Vladimir Sumilin
Contributor
February 28, 2023

Hi @Patricia Francezi 

Thank you for your reply!

1) I'm not sure about which JQL you are saying. Is it from Scheduled? 

2) This one is also not clear to me. When I am creating a new issue - Issue type is Score (Score is subtask)

Patricia Francezi
Community Champion
February 28, 2023

Your current Lookup issues action has a "issuetype = score" JQL, and you have to change to key = your issue that will receive the subtask.

Every subtask has a default icon

 

image.png

I assume Score is not a subtask just because it does not have this icon, so I suggest you to read this doc on how to create and associate subtasks to your project.

 

https://support.atlassian.com/jira-cloud-administration/docs/configure-sub-tasks/ 

0 votes
John Funk
Community Champion
February 27, 2023

Hi Vladimir,

You can not have a sub-task as a parent of another sub-task. Sub-tasks can only be children. So you need to replace the issue key for the parent. When it is processing, it is picking up Sub-task as a part of the JQL attached to the Scheduled trigger, then you are showing the current issue as the parent. 

You need to modify the JQL to not include sub-task issue types. 

Vladimir Sumilin
Contributor
February 27, 2023

Hi John,

In my case I need to create a sub-task with connection to a task. 

I already have Task -> Sub-task and for automation I would like to create every year Sub-task for this Task with the same fields. 

How can I achieve that?

John Funk
Community Champion
February 28, 2023

You probably just need to change the Parent to {{triggerIssue.parent.issue}}

Suggest an answer

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

Atlassian Community Events