Jira Rest Api is it possible to set custom reporter (Email address which is not JIRA user already)

rahm November 12, 2019

Hello Everyone, greetings,

I am using JIRA Rest API to create issues from web interface where users can create tickets (Could be 50 users and not all JIRA users).

At the moment Token user is set as reporter and notification goes to that user though would like the user who is creating the ticket to receive the email notification from the thread.

How that can be done through REST API (Each ticket may or may not have different user)?

Earlier I was sending the emails directly to a JIRA email address which seems to be working.

Thanks for the help in advance.

 

1 answer

1 accepted

0 votes
Answer accepted
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 13, 2019

Hello,

Thanks for reaching out to the Community to see if there is a way to create an issue with a reporter who has not yet been created within Jira. Unless you’re using a common reporter for users who do not exist within the system you’ll need to create the user before attempting to set them as the reporter. The good news is this can also be done via the REST API. I would approach the issue creation through this workflow:

  1. See if the user is already created:
    1. GET /rest/api/3/user/bulk/migration
    2. GET /rest/api/3/user
  2. If the user is present then create the issue
    1. Else;
    2. POST /rest/api/3/user
  3. If the response is a 200 then recheck if user is present within the system and then proceed to create the issue.

I hope the above workflow helps to understand how to check for users and create them if missing.

Regards,
Stephen Sifers

rahm November 15, 2019

@Stephen Sifers Thanks sorry for the late reply,

API endpoints might be different and using REST API V2 (Not able to recall though was having some issues with the V3).

Like Stephen Sifers likes this

Suggest an answer

Log in or Sign up to answer