#BASH CODE
#!/bin/bash
jira_user="ID"
jira_pw="PASS!"
jira_server="jira.test.com"
jira_key="SECURITY-2480"
assignee="yccheon"
curl -D- -u "$jira_user":"$jira_pw" -X PUT -H "Content-Type: application/json" https://$jira_server/rest/api/2/issue/$jira_key --data '{"fields": {"assignee":{"name":"$assignee"}}}'
[incle@incle jira]$ ./jiraa.sh
HTTP/1.1 400 Bad Request
Server: nginx
Date: Tue, 04 Sep 2018 09:10:19 GMT
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
X-AREQUESTID: 1090x2941986x4
X-ASEN: SEN-2024910
Set-Cookie: JSESSIONID=63DEFAB473D458CFB183DFE55BFE8EC5; Path=/; HttpOnly
X-Seraph-LoginReason: OK
Set-Cookie: atlassian.xsrf.token=BSLJ-Y93F-8O6L-OULL|f95e7e2957b816674023cce36edb66d695e0f75d|lin; Path=/
X-ASESSIONID: ljee1t
X-AUSERNAME: yccheon
Cache-Control: no-cache, no-store, no-transform
X-Content-Type-Options: nosniff
{"errorMessages":[],"errors":{"assignee":"User '$assignee' does not exist."}}[incle@incle jira]$
I am worried about changing the assignment after creating JIRA.
Failed.
I have since found an API for changing assignments
I made the following error message
Please solve the problem