curl -D- -u user:pass -X POST --data "{\"fields\":{\"project\":{\"key\":\"TECH\"},\"parent\":{\"key\":\"TECH-456\"},\"summary\":\"Test ChargenNr\",\"description\":\"some description\",\"issuetype\":{\"id\":\"10102\"}}}" -H "Content-Type:application/json" https://compnay.com/rest/api/2/issue/
Issue type 10102 is not a sub-task but a parent is specified."
when setting any other ID-valid issue type is required
I manually created subtask, here is part
"subtasks": [
{
"fields": {
"issuetype": {
"avatarId": 10316,
"description": "The sub-task of the issue",
"iconUrl": "https://jira.corp.hentsu.com/secure/viewavatar?size=xsmall&avatarId=10316&avatarType=issuetype",
"id": "10101",
"name": "Sub-task",
"self": "https://jira.corp.hentsu.com/rest/api/2/issuetype/10101",
"subtask": true
},
What's wrong ?
Hi Dragan
In your curl statement, you have
"issuetype":{"id":"10102"}
but you need "name":"Sub-task" as per your manually created, then it should work
Thanks Warren, now got:
customfield_10107":"Client Account is required
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Finally works !!
"customfield_10107": {
"id": "10400",
"self": "https://company.com/rest/api/2/customFieldOption/10400",
"value": "user Internal"
},
so final code:
curl -D- -u user:password-X POST --data "{\"fields\":{\"project\":{\"key\":\"TECH\"},\"parent\":{\"key\":\"TECH-456\"},\"summary\":\"Test ChargenNr\",\"description\":\"some description\",\"issuetype\":{\"name\":\"Sub-task\"},\"customfield_10107\":{\"id\":\"10400\"}}}" -H "Content-Type:application/json" https://jira.corp.comany.com/rest/api/latest/issue/
This customfield is not mentioned anywhere in JIRA documentation
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.