Forums

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

Keep getting "Issue type is a sub-task but parent issue key or id not specified."

Dev
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!
June 20, 2019

I am trying to update an issue as a sub-task. According to the documentation, the issuetype specified must be a sub-task, and I must provide the parent id or key. I have made sure I'm correctly doing both, the type is a sub-task and I'm providing the parent id 

 

{
"fields":
{
"parent":{"id":"60558"},
"summary":"Story",
"description":"",
"issuetype":{"id":"5"}
}
}

But I keep getting "Issue type is a sub-task but parent issue key or id not specified." I've also tried using the parent key to no avail. Any ideas why? For reference, here is the curl request I'm making to test this out:

curl \
-D- \
-u XXXXXX \
-X PUT \
--data '{
"fields":
{
"parent":{"id":"60558"},
"summary":"Story 14",
"description":"",
"issuetype":{"id":"5"}
}
}' \
-H "Content-Type: application/json" \
https://XXXXXXX/rest/api/2/issue/60566

According to https://community.atlassian.com/t5/Answers-Developer-Questions/Convert-task-to-subtask-via-JIRA-REST-API/qaq-p/533484 tasks can not be converted to subtasks via the REST API.

2 answers

1 vote
Elijah Scherz
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!
July 12, 2019

I'm getting the same error and also passing in the parent key and id, but am not trying to change the issue type. Just some simple fields such as summary and description.

 

Did you ever end up doing anything else that allowed you to figure out how to using update() on a subtask?

0 votes
Dev
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!
June 20, 2019

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events