Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to set reporter during create issue with Jira rest api?

Jennifer Yu - Admin March 4, 2021

As I set using php to create Jira issue and assigned the value in php, moreover, the reporter in Jira Issue is still "Anonymous", please help.

$arr['reporter']=array('name'=>$_POST['email'],
'email'=>$_POST['email'],
'raiseOnBehalfOf'=>$_POST['email']);

"reporter":{"name":"abc@test.com","email":"abc@test.com","raiseOnBehalfOf":"abc@test.com"}

 

1 answer

0 votes
Angélica Luz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 5, 2021

Hello @Jennifer Yu - Admin,

Welcome to Atlassian Community!

When creating tickets using API, the reporter is set on "raiseOnBehalfOf" which is the same field we use in the UI when creating a ticket.

curl --request POST \
--url 'https://xxxxx.atlassian.net/rest/servicedeskapi/request' \
--user 'xxxxx@domain.com:TOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"raiseOnBehalfOf":
"qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d69abfa3980ce712caae",
"serviceDeskId": "12",
"requestTypeId": "123",
"requestFieldValues": {
"summary": "Request JSD help via REST",
"description": "I need a new *mouse* for my Mac"
}
}'

Also, when creating the ticket using API we need to add the customer's accountId, which means that we can only create tickets for existing customers.

Hope this helps!

Kind regards,
Angélica

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events