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

JIRA API - How to change "Created By" to generic account

AdamC
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!
February 10, 2020

I'm working on an integration with the JIRA service desk and it's working very well. We're using the Create Customer Request API to create new tickets. These tickets are being "created by" the user who generated the API key. Is it possible to change the created by to "JIRA API" or any other account that's not associated with a user? I basically just don't want to receive emails for every update on these tickets.

1 answer

1 accepted

0 votes
Answer accepted
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 11, 2020

Hi Adam,

I understand that you are creating Jira Service Desk Cloud requests for a customer, but that these appear to always be showing that you are creator and not the customer.   Also you are not wanting to see the notifications for this request.   

While I don't exactly have a solution to have a non-user create these as you asked, Jira Service Desk does have a 'raiseOnBehalfOf' parameter that you can use in the REST API call of POST /rest/servicedeskapi/request.  If you were to use this parameter in the REST API call when creating the request, it can make that other user appear to be the creator instead.  And in turn your account, or the service account that actually created the request is not expected to actually get any notifications about this request. 

There are some notes about using this though:

The fields required for a customer request type depend on the user's permissions:

  • raiseOnBehalfOf is not available to Users who have the customer permission only.

As long as your account used to create the request is a licensed Jira user, you should be able to use this parameter in the REST API call.   As far as Jira Service Desk notifications are concerned it should only send to the raiseOnBehalfOf user account.  Granted if you can view the issue in Jira (not customer portal) looking at the history tab will show the true issue creator in Jira, but this is one case where the request creator can be different than the issue creator.  More on this in Jira Service Desk: Issues vs. Requests.

Try this and let me know the results.

Regards,

Andy

AdamC
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!
February 12, 2020

Exactly what I was looking for, thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events