A long time ago and about 20 JIRA versions away I made the silly admin mistake of having my username in the internal JIRA directory AND a CROWD directory. With the same password of course, so that I could never tell which directory I was logged into.
Well, I would sometimes switch the order of the directories for one reason or another. As a result about half of my JIRA stuff is associated with the one ID and half with the other. BUMMER!
Now I want to clean up this mess. I renamed the userid in the internal directory and tried to delete it, and cleaned up the stuff I could. Some of it is easy like project and component lead assignments, and reporter and asignee for open issues. But then you get to the hard stuff:
Delete User: xyzzy
Cannot delete user. 'xyzzy' has associations in JIRA that cannot be removed automatically.
Change the following and try again:
Reported Issue: 639 issues
Assigned Issue: 234 issues
Issue Comments: 963
The reported and assigned changes are prevented by workflow constraints. I don't even get the option to change comment owners.
I feel like this is a legitimate thing to do because it really is me who reported and commented all those times. I know other people want to do this for less legitimate reasons like deleting users who leave the company.
So how do I fix these up? I can see two ways:
- Do a XML backup and restore with XML foo in the middle.
- Do SQL foo.
Suggestions? Working code? ;-)