REST/Python: "The reporter specified is not a user."

Lucas Molenaar January 11, 2021

I like to clone a ticket but things are going wrong when the original reporter is no longer active.

I use the following to set the reporter:

reporter={'name': parent.fields.reporter.name}

The exception that is thrown = The reporter specified is not a user.

I can print the name of the reporter, confirming its existence in the DB:

print("Reporter=%s" % (parent.fields.reporter.name))

Which returns: Reporter=username.contractor

 

Could somebody please advise what I need to reference to set the reporter in case the user is no longer active?

 

3 answers

0 votes
Thomas Deiler
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 4, 2021

Dear @Lucas Molenaar ,

I think what you plan to do cannot work. With cloning you mean read an existing issue and create a new one with its data. You cannot set the reporter to a person that is inactive (not consuming a license) - that even does not work from the UI.

What you could do as a workaround:

  • Read origin issue
  • check if user is active
  • if not POST /rest/api/2/user/application
  • create issue with activated user
  • if not DELETE /rest/api/2/user/application

So long

Thomas

0 votes
Lucas Molenaar January 11, 2021

You are absolutely right, forget to mention that:

0 votes
Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 11, 2021

Hi @Lucas Molenaar ,

Could you specify what version of jira/jsd you are on? A lot of these features including inactive users have changed throughout the versions.

This might be similar to https://jira.atlassian.com/browse/JRASERVER-38412 which has a lot of "affected versions" so it would help to narrow down the issue and hopefully a workaround. 

Suggest an answer

Log in or Sign up to answer