Create Jira Issue using Reporter email Address

gopi krishna October 27, 2020

Hello,

 

I wanted to create an issue in Jira using REST API. I would like to see "reporter" field populated in Jira when I create that issue.

My question here is, would it be possible to create Jira issue using "reporter" email address ?

Below example is NOT working for me.

example :

 "reporter": {          "emailAddress": "Firsname.Lastname@gmail.com"        }

However it's allowing me to create an issue using reporter username like below.

example :

 "reporter": {          "name": "7847874414"        }

The reason why I want to create an issue using reporter email address is, I have only reporter email address available via email support question. I don't want to make one more call to find user name from user email address.

 

Thanks,

Stay Safe!.

 

2 answers

1 accepted

0 votes
Answer accepted
Yevgen Lasman
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.
October 27, 2020

The create issue REST API requires username and you cannot bypass this requirement.

However, you can add another step in your sequence to find a username by the email address and then use it as the reporter.

gopi krishna October 29, 2020

Thanks Yevgen!.

 

Before making create issue request, I'm using below resource to find the reporter user name based on his/her email address.

https://localhost/rest/api/2/user/search?username=firstname.lastname@gmail.com

So that I can update who is the reporter based on support ticket sender email address.

0 votes
daniel_westerdale August 12, 2022

 

I have so far not been able to create an issue with this any of the json snippets below

 

"reporter": {
"displayName": "firstname lastname"
}

"reporter": {
"name": "firstname lastname"
}

"reporter": {
"emailAddress": "firstname.lastname@company.com"
}

 

 

So unless some one tells me otherwise , I am forced to search on email or name using a separate rest API call then calling my Create Issue action with the user Id I have located in my rest API call

In my testing:

https://company.atlassian.net/rest/api/2/user/search?username=fristname.lastname@company.com

Response:

 

{"errorMessages":["The query parameter 'username' is not supported in GDPR strict mode."],"errors":{}}

 

https://company.atlassian.net/rest/api/2/groupuserpicker?query=firstname.lastname@company.com

 

Gives a nice response showing an array with one item, containing the name , ID  👍

Suggest an answer

Log in or Sign up to answer