The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to retrieve Reporter from current issue to newly created issue

Samuel Srungarapati
April 12, 2025

Dear all,

I'm trying to create a groovy script to create a new issue out of the current issue's linked issue.

I'm unable to set reporter into the new issue, thus new issue is failing to be created programmatically from the current issue.

 

Error:   Validation failed for new issue: Errors: {reporter=The reporter specified is not a user.} Error Messages: []

Where as I'm using a reporter name with valid permissions to create the issue. 

Could someone explain how to retrieve the reporter?

 

 


final String TEMP_REPORTER_USERNAME = "automation"


// Debug currentIssue.reporter
def currentReporter = currentIssue.reporter
log.info("Current issue reporter: name=${currentReporter?.name}, key=${currentReporter?.key}, active=${currentReporter ? userManager.getUserByKey(currentReporter.key)?.active : 'null'}")
if (!currentReporter) {
    log.error("Current issue reporter is null")
} else if (!userManager.getUserByKey(currentReporter.key)?.active) {
    log.error("Current issue reporter is inactive: name=${currentReporter.name}, key=${currentReporter.key}")
}

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Ram Kumar Aravindakshan _Adaptavist_
Community Champion
April 14, 2025

Hi @Samuel Srungarapati

From the code you have share, I am going to assume you are trying to do this via Automation? Please confirm this.

It if is based on Automation, then based on what condition do you want the new issue to be created? Is it when the Issue transitions? 

Kindly provide the information requested above so I can provide a sample solution.

I am looking forward to your feedback and clarification.

Thank you and Kind regards,
Ram

0 votes
Florian Bonniec
Community Champion
April 14, 2025

Hi @Samuel Srungarapati 

 

How do you create the new issue ? Listener, post function or something else ? What is the script use for creating the new issue ?

 

Regards