Forums

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

Edit worklogs author

Deleted user July 19, 2019 edited

Good morning,

One of our JIRA user has two account (one which he can´t access anymore and a new one), we would like to transfer all the work he logs with his old account to the new account.

Is there a way or a plugin to transfer the worklogs to a new account or edit the worklogs´ author ?

For the moment the only solution that we found is to use the plugin "log work for another" and transfer all the worklogs by hand, but I would like to find a faster solution.

 

Thank you for your answer.

1 answer

1 accepted

0 votes
Answer accepted
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.
July 19, 2019

Dear @[deleted] ,

you can do this with a script using the REST API with following pseudo algorithm:

  • search for issue with worklogs of olduser  (JQL: worklogAuthor = olduser)
  • for each returned issue do a "Get Issue worklog"
  • read from each worklog entry matching olduser comment, started and time spent
  • "Add worklog" with the read information
  • if possible, "Delete worklog" the old entries.

This has to be performed with the credentials of "newuser".

So long

Thomas

Deleted user July 22, 2019 edited

@Thomas DeilerThank you for your answer, I will do so.

Just a little question for my curiosity: can we, or, why could we not modify it with SQL directly in the database ?

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.
July 22, 2019

Dear @[deleted] ,

its strongly recommended not to directly modify the DB, unless you exactly know what you do. You could really harm your system. If you plan to do do a try-run and intensively test afterwards if the system is still integer.

But again no guarantee that it will work.

Another approach somehow between DB and API: modify the exported XML dump and restore. In this case you have at least the validation by the importer. But again dry-run first on a staging environment.

So long

Thomas

Deleted user July 22, 2019 edited

Ok, I understand.

Just another little question, I am working with JIRA server, I tried to use the plugin "REST API Browser" but when I tried to create an issue I received an error xxx.xx.xx.xx:8080/rest/api/2/api/2/issue (404). I´ve seen that it could be an error because of the update JIRA.8.

 

Is there any other plugin ?

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.
July 22, 2019

Dear @[deleted] ,

for the REST API you do not need a plugin. Just use Postman or any other REST Client browser plugin to validate your commands. Then transfer them to a scripting language like python or php ...

The API ist very constant - so functions available on JIRA 7 are also available on JIRA 8. from time to time functions depreciate - but this is quite rarely.

So long

Thomas

Deleted user July 22, 2019

Thank you for all.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events