Forums

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

Keeping Original Reporter on Post Function Tickets ScriptRunner

Megan Hannon October 11, 2021

Hello! I created a series of post function tickets for a workflow using the Clones an issue, and links [ScriptRunner] Function. When the assignee of a ticket closes the original request they become the Reporter on the new request created by the post function ticket. 

I can make our Jira admin the user that the post function will run as, but I really am looking for a way to keep the original reporter as the reporter on all the post function tickets so they can track the work being done. 

Is there a way to script an additional issue action that can assign the reporter from the original ticket to be the reporter of the ticket generated by the post function?  I have looked at the script runner documentation and am curious if anyone has had success with a similar solution. 

1 answer

1 accepted

0 votes
Answer accepted
Dirk Ronsmans
Community Champion
October 11, 2021

Hey @Megan Hannon ,

The script that creates the new issue, how exactly are you setting that up? 

You should be able to just use a issueInputParamters object and use the setReporter() function during creation.

https://docs.atlassian.com/software/jira/docs/api/8.11.0/com/atlassian/jira/issue/IssueInputParameters.html

If you have an existing script you could post that here and we can take a look at how we can amend/expand on it :)

This would then mean getting the Reporter from the triggering issue (most likely iwth a getReporterId() )

Megan Hannon October 11, 2021

Thank you @Dirk Ronsmans

That is a very helpful link! I expanded my script by adding issue.reporterId = sourceIssue.getReporterId()  which keeps the reporter on all of the post function tickets. 

Suggest an answer

Log in or Sign up to answer