I use excel for reporting from TFS, but one day after publishing, the structure of epics and features was destroyed and now all user stories belong to an incorrect feature, resulting in a mess. I think the problem was that I ordered the list before I publish it.
I have tried to publish all again from a correct excel file backup, but this did not work the parents are not corrected.
Any help will be very appreciated
There is no easy way to fix this. When a tree structure is sorted in Excel, all work items will be re-linked to their new parent based on their indentation.
To undo, you have a few options:
You can use the Team Foundation Server Client Object Model to access the Work Item data stores.