I am using Jira Rest API to create issues. I need to set a reporter for each issue using rest API.
Below is the body parameter which I am creating to use in the API
json_object = {"fields":{"project":{"key":"IM"},"reporter": { "name": "Gloria Laureano" },"summary":"Testing Jira Data","description":"this is the test jira issue testing","issuetype":{"name":"Client Implementation"}}};
Below is my code to create issue using rest API
headers.put("Content-Type","application/json");
headers.put("Authorization","Basic c2hyYWRkaGFAY3JtLW1hc3RlcnMuY29tOmRPaVN1eGtkZmVtUG85TnY5YUZGMUEzMA==");
json_object = {"fields":{"project":{"key":"IM"},"reporter": { "name": "Gloria Laureano" },"summary":"Testing Jira Data","description":"this is the test jira issue testing","issuetype":{"name":"Client Implementation"}}};
jiradata = invokeurl
[
url :"https://b2bsoft.atlassian.net/rest/api/2/issue"
type :POST
parameters:json_object.toString()
headers:headers
];
But I am getting error while hitting this. the error which I am getting is
{"errorMessages":[],"errors":{"reporter":"Field 'reporter' cannot be set. It is not on the appropriate screen, or unknown."}}.
I am not able to understand what I am doing wrong. So please help me how to set the reporter using API.