Forums

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

Creation of subtasks linked to a scheduled daily Task

kay bickell
Contributor
January 16, 2023

I am trying to get Jira to create a ticket each day to cover the daily tasks required of a specific team, within which I need to have ten or eleven sub-tasks.   

I have got the Cron job to create the ticket daily at 0800 no problem at all, but when I ask it to then create subtasks as part of that ticket creation, it fails with the message 

"Error creating issue

Issue type is a sub-task but parent issue key or id not specified. (issuetype)"

I have set the parent case to be "Current", assuming that this means the "Current" would be the case created in the first place

I did try change the parent to "Trigger" just in case my understanding of what that bit meant was wrong, but there is no improvement - the case creates, but no subtasks are found within it, and the same error message is shown. 

The parent case is issueType "Task", but since these are scheduled to be created each morning, I cannot add a parent issue key, because it simply wont have been created yet - so I am a bit stuck and would appreciate any suggestions to help me fix this.

1 answer

1 accepted

2 votes
Answer accepted
Ste Wright
Community Champion
January 16, 2023

Hi @kay bickell 

You'd need a Branch after the creation of the Task, to house the Sub-task creations - rule would look something like this:

  • Trigger: Scheduled
  • Action: Create Issue - this is the Task
  • Branch: Related Issues
    • Type = Most Recently Created Issue
      • Branch-Action: Create Issue
        • Project = <Project Here>
        • Issue Type = Sub-task
        • Parent = Current Issue
          • Fields = <Set Here>
      • ...etc (one Action per Sub-task)

This should then work :)

Current Issue will now function against the Task - because the second Create Issue Action is now in a Branch.

Ste

kay bickell
Contributor
January 16, 2023

Thank you! 

Like Ste Wright likes this

Suggest an answer

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

Atlassian Community Events