My situation is this: I have a list of TFS change sets. Each change set has an ID, and a list of related work items. A work item has an ID, and a list of links, which are basically strings with change set ID's.
I want to have a list with the reverse hierarchy, meaning, I want to have a list of work items, and for each one a list of related change sets (and keep the ID field of both).
The structure now:
---chageset1
|
|-------workitem1
|-------workitem2
---chageset2
|
|-------workitem2
|-------workitem3
the structure I want
---workitem1
|
|-------chageset1
---workitem2
|
|-------chageset1
|-------chageset2
---workitem3
|
|-------chageset2