Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,361,467
Community Members
 
Community Events
168
Community Groups

Create Jira Issue using Reporter email Address

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

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.

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.

 

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
TAGS
Community showcase
Published in Jira Software

An update on Jira Software customer feedback – June 2022

Hello Atlassian Community! Feedback from customers like you has helped us shape and improve Jira Software. As Head of Product, Jira Software, I wanted to take this opportunity to share an update on...

5,074 views 18 32
Read article

Atlassian Community Events