Я хочу создать проблему, используя Jira REST API. Ниже приведен код для создания простой проблемы:
curl --request POST \
--url 'https://company_name.atlassian.net/rest/api/3/issue' \
--user 'user:token' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data {
"fields": {
"summary": "Remote test with request type",
"issuetype": {
"id": "12542"
},
"project": {
"key": "Test"
},
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "Second remote test",
"type": "text"
}
]
}
]
}
}
}
Дело в том, что я хочу создать проблему с настраиваемым полем - customfield_10029
. По умолчанию он установлен на ноль, но когда я изменил его вручную на своей плате, я увидел в нем что-то еще: первый запрос POST, как показано ниже:
curl --request POST \
--url 'https://company_name.atlassian.net/rest/api/3/issue' \
--user 'user:token' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data {
"fields": {
"summary": "Remote test with request type",
"issuetype": {
"id": "12542"
},
"project": {
"key": "SUP"
},
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "Second remote test",
"type": "text"
}
]
}
]
},
"customfield_10029":
{"_links": {"jiraRest": "https://company_name.atlassian.net/rest/api/2/issue/241495", "web": "https://company_name.atlassian.net/servicedesk/customer/portal/19/SUP-11", "self": "https://company_name.atlassian.net/rest/servicedeskapi/request/241495"},
"requestType":
{"_expands": ["field"],
"id": "358",
"_links": {"self": "https://company_name.atlassian.net/rest/servicedeskapi/servicedesk/19/requesttype/358"},
"name": "Add Colaborator / Team Member",
"description": "e.g. external dev",
"helpText": "you can find github nicks down here https://github.com/some_url",
"issueTypeId": "12542",
"serviceDeskId": "19",
"groupIds": ["70"],
"icon":
{"id": "19558",
"_links":
{"iconUrls":
{"48x48": "https://company_name.atlassian.net/secure/viewavatar?avatarType=SD_REQTYPE&avatarId=19558&size=large",
"24x24": "https://company_name.atlassian.net/secure/viewavatar?avatarType=SD_REQTYPE&avatarId=19558&size=small",
"16x16": "https://company_name.atlassian.net/secure/viewavatar?avatarType=SD_REQTYPE&avatarId=19558&size=xsmall",
"32x32": "https://company_name.atlassian.net/secure/viewavatar?avatarType=SD_REQTYPE&avatarId=19558&size=medium"}}}}
}
}
Но я получаю сообщение об ошибке:
{"errorMessages":["Unexpected end-of-input: expected close marker for OBJECT (from [Source: org.apache.catalina.connector.CoyoteInputStream@2e2743e7; line: 1, column: 0])\n at [Source: org.apache.catalina.connector.CoyoteInputStream@2e2743e7; line: 46, column: 1863]"]}
Есть ли за этим логика c? как создать такую проблему с customfield?