Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

REST API Create Issue - reporter field passing causing trouble

RGIRIGOWDA
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 2, 2020

Hi,

I went through so many posts suggesting answers, none of them working for me. 

I am calling REST API to create issue, part of it i need to pass Reporter field, in the fields if i pass reporter accountid alone i get success, else all other scenerios i get error. For me email ID is the unique ID i need to use to pass, please help with insight why this is not working. 

 

"reporter":{"accountId": "5defa1XYZ......."},  --> It works

"reporter":{"emailAddress": "rtest@org.com"}, --> i get "errors": {"reporter": "Reporter is required."}

"reporter":{"name": "firstname lastname"}, --> i get "errors": {"reporter": "Reporter is required."}

"reporter":{"displayName": "firstname lastname"}, --> i get "errors": {"reporter": "Reporter is required."}

2 answers

2 accepted

0 votes
Answer accepted
Prince Nyeche
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 3, 2020

Hi @RGIRIGOWDA 

On Atlassian Cloud, accountId is required to identify who the users are. it works on any user picker field e.g. watcher, reporter, assignee etc

Since you're integrating this from another system that uses email ID, you can pass a username parameter to get the accountId using this endpoint for bulk migration (usernames on Cloud is usually the prefix of the email address e.g. max@example.com; username=max). You can look into this idea as that's one of the endpoint to actually get accountId and you can use it elsewhere in your Script.

0 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 2, 2020

Hi @RGIRIGOWDA  -- Welcome to the Atlassian Community!

After the GDPR changes, and the deprecation of most of the user-related parameters, it appears you can no longer create an issue without the accountID values for the users involved using the REST API.

https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/

https://blog.developer.atlassian.com/creating-a-jira-cloud-issue-in-a-single-rest-call/

 

Best regards,

Bill

Suggest an answer

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

Atlassian Community Events