You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I accidentally changed an Epic, which was linked in thousands of issues, to a Task. This un-linked all of the Issues. Yes, major face-palm, I know.
Is there any way to restore the Epic Link to all of the Issues that previously had them?
Hi @Yair Spolter,
I was able to reproduce the issue (obviously) but I don't really have good news. I couldn't find an easy way to restore the issues linked to that epic. However you can view the issues that were linked to the Epic in the history. Thus there's a way to figure our which issues were linked.
Hope this helps.
As the doc that @Maarten Cautreels linked is now offline, if someone stumbles upon this, my guess is that he suggested:
If you only have one epic, is not difficult to do by hand. If your task keys are ABC-1, ABC-2 and ABC3 and your epic is ABC-4, search for
project = "ABC" and (key="ABC-1" or key="ABC-2" or key="ABC-3") ORDER BY created DESC
And run the bulk change on them.
In my case, I delinked ALL my epics (I changed their type to a custom "epic", only to discover that there's no such thing). With ~70 epics I needed more automation, so I wrote a script. Is super-tailored to what I needed, so I'll leave it here and then it's up to you to modify it accordingly.
My workflow consisted in copying the history of an Epic into a text file called "History.txt" straight from my browser. Then the script will look for changes made by the specified user (as my mistake was caused by an automation, the user was "Automation for Jira"). The script will output the JQL query needed for Bulk Changing. As that was going to be a lot of work, I looked around and found GitHub - ankitpokhrel/jira-cli: 🔥 [WIP] Feature-rich interactive Jira command line., a Jira CLI interface. My script also will build the command that needs to be executed to link a number of issues to an epic, but if you don't want that, just comment the lines. It's based on Go, so you might need that too, or if you don't want to go through that hassle, use the JQL query.
To run it, for example, to search for changes made by "Automation by Jira" in the epic's history that is pasted on "History.txt", of an Epic with key "ABC-4" on a project with acronym "ABC", I would call it like this
python3 JiraLinker.py -p ABC -t History.txt -u "Automation for Jira" -e ABC-4
Just so we are looking in the right direction a few questions:
I'd love to help search for an easy restore solution but I'm afraid restoring a backup will most likely be the easiest way.
Thanks for your help Maarten.
We are on Jira server.
We do have Kanban etc.
I changed the "Type" from Epic to Task
I want to restore the the issues being linked to the Epic through the Epic Link field.
Restoring a backup means going back to a previous state (which affects ALL changeds made since)?
Thanks for the info and quick response. I'm going to try and reproduce this on my test instance to see if I can find an easy way to restore it.