set reporter when creating ticket in JSM via the API

Marcus Jones
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 2, 2024

I've been working on creating tickets with all their info in Jira using the REST API. I've played with both version 2 and 3, which seems to still be in beta. One thing I have struggled with is setting the reporter during the ticket creation. For some reason the calls are successful, and the ticket is created with all other data, but I just can't get it to set the reporter. I've tried setting it via the username, email, and account ID but no success. Wondering if anyone else has some experience with this and could shed some light on what I'm doing wrong?

Here's my request body:

{
"fields": {
"project": {
"key": "CASE"
},
"summary": "Test Subject",
"issuetype": {
"name": "Accounting Case"
},
"description": "This is a test"
},
"reporter": {
"id": "6393a2f2z6c85b343c0991ab"
}
}

 

2 answers

1 accepted

2 votes
Answer accepted
Marc Koppelaar
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.
March 4, 2024

Hi @Marcus Jones 

You could use the "raiseOnBehalfOf" parameter in your request.

Reporter is set based on the user executing the call.

This would require you to use the JSM API

Marcus Jones
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 5, 2024

Yes! That was the push in the right direction I needed. Thank you!

0 votes
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 2, 2024

@Marcus Jones -

Hi Marcus:

It is my understandng that by default, the account that you used to authenticate with your REST APIs into JSM will be the reporter.  I believe you will need to have another call to change the reporter after your create issue call.

I am not an expert in using REST APIs, so hopefully it helps.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Technology Applications Team

Viasat Inc.

Suggest an answer

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

Atlassian Community Events