How to change creator system field via JAVA API?

Is there any way to change the "creator" system field using the JIRA JAVA API. The background: the user should be able to create an issue which should be visible as anonymous within the system. So the reporter field can be easily changed during creation to some technical user called "anonymous", but still the "creator" field is set to the current user, who created the issue and this information is visible in the change history.

So one approach would be to change the creator within a post-function, e.g. script-runner, but how?  

4 answers

1 accepted

3 votes
Accepted answer


A solution for changing the Creator field during issue creation would be to switch the AuthenticationContext to the anonymous user within a post-function. This can be implemented by using ScriptRunner and a Custom script post-function with the following code:

import com.atlassian.jira.component.ComponentAccessor

def userManager = ComponentAccessor.getUserManager()
def user = userManager.getUserByName("<anonymous_username>")
def authContext = ComponentAccessor.getJiraAuthenticationContext()



It is very important that this post-function must be executed before the post-function (named: "Creates the issue originally.") which creates the issue.

These can be done in 2 ways:

  • Post-function - This will have to be added in the "Create" transition of the ticket (Edit the Workflow and click on the Create label). Put a post-function in to update the Assignee to someone.
  • Default Assignee - I'm not sure if you have checked this, who is the default assignee for your project? This can be set in the "Roles" admin screen of your project.


hi gabrielle, what I need is to update the creator field to a technical user, the creator system field is not equal to the assignee. I understand completely your approaches and they are absolutely fine, but does not macht my use case. The creator field is not visible on the GUI, just in the change history of an issue. BTW, is also not the reporter. See:

@david kreuter: Did you find a solution for this?

I think i will create a hidden transition and trigger this with JIRA Automation as another user. I think this will work. Also for the created issue link.


@Tim Eddelbuettel There are multiple solutions to this:

  1. A create postfuntion that sets the new reporter to an "anonymous" user and deletes the whole issue history (which is only the change from the original reporter) -> needs scriptrunner
  2. A create postfunction that clones the issue with an anonymous placeholder reporter (again scriptrunner) and uses this anonymous user as the one who creates the ticket
  3. A custom implementation for issue creation which creates an issue through a rest call, authenticating the call as the anonymous placeholder user (probably alot of work, but needs no scriptrunner)

We have used 2) as for our needs it was the best solution.

Greetings, alex


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,711 views 17 21
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you