I am trying to create a new subtask on a project already including the link to a parent (another subtask) in JSON.
I wasn't able to find any code to do such a thing.
Here is my code:
{
"fields":
{
"project":
{
"key": "task"
},
"parent":
{
"key": "subtask"
},
"summary": "TesteAutomacaoJiraPai",
"description": "Teste Automacao Jira",
"issuetype":
{
"name": "ToDo"
},
"assignee":
{
"name": "user"
}
},
"update": {
"issuelinks": [{
"add": {
"type": {
"name": "Child-Issue",
"inward": "is child task of",
"outward": "is parent task of"
},
"outwardIssue": {
"key": "BLOQUEV-17611",
"fields": {
"summary": "Test Adapter"
}
}
}
}]
}
}
I have already created the BLOQUEV-17463 and the BLOQUEV-17611
I am doing the command bellow:
curl -k -D- -u usarname:password -X POST --data @1.json -H "Content-Type: application/json" https://xxxxx/rest/api/latest/issue/
and it keeps showing me this error: {"errorMessages":[],"errors":{"issuelinks":"Field 'issuelinks' cannot be set. It is not on the appropriate screen, or unknown."}}
thanks in advance..