Hi,
Ive been following the api rest instructions to create a sub-task. I have it creating tasks no problem, but sub tasks - it keeps giving me the following error
400 Bad Request
{
"errorMessages": [],
"errors": {
"project": "project is required"
}
}
Im using this:
{"fields":
{"parent":{"id":"10013"},
"project":{"id":"TMEQ-12"},
"summary":"a test sub-task of my first issue",
"issuetype":{"id":"5"},
"description":"description"}
}
Can anyone assist, Please?
James
You are passing
"project":{"id":"TMEQ-12"},
This doesn't look like a valid project id to me thus the error.
See this working sample from docs for sub-task creation using REST API
{ "fields": { "project": { "key": "TEST" }, "parent": { "key": "TEST-101" }, "summary": "Sub-task of TEST-101", "description": "Don't forget to do this too.", "issuetype": { "id": "5" } } }
https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks it was the id (5) that was wrong in my case. All working now :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad to know it's working, please accept/upvote answer so that others are helped as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@James Lewis | @Tarun Sapra I'm new for jira-rest-api, can you please help with some document guideline. I want to auto create set of sub-task when any story or defect created. Looking for help.
[for now not looking for paid add-on]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.