Structure allows you to have multiple instances of the same item in one structure. This can be really useful - for example, if there is a bug that breaks several features and you want to show it under each of these features in your structure.
But in some cases you may want to avoid duplicates, or just have a way to quickly identify them. Structure provides an easy way to find such items.
If there are duplicating items in a structure, the status bar will show the counter with the number of such items.
The duplicate counter works for the visible part of the structure only. If you apply filters on top of the existing structure (for example, transformations) and these filters hide some of the duplicates leaving just one instance of duplicated item, such issues won't be treated as duplicates anymore.
Clicking the duplicates counter will open the duplicates panel, which allows to highlight, filter, pin or quickly navigate between duplicate items.
The status bar counter shows the number of items that have duplicates. The duplicates panel shows the number of rows these items produce. In the example above there are two issue with duplicates - one is added twice, the other - three times, which makes it 5 rows of duplicates.
To highlight duplicate items, select the 'Mark duplicate rows' option. Each duplicate item will have a duplicate icon (with ‘x2’ written on it) displayed in its row. If you hover over that icon, you'll see how many instances of this item are shown in the structure.
Once you highlight duplicate items, the highlighting stays even if you close the Duplicates Panel. To remove the highlighting, open the panel and clear the 'Mark duplicate rows' checkbox.
Navigating Between Duplicates
Clicking the “Up” and “Down” arrow buttons moves the focus to the next/previous duplicate row.
When you navigate to a duplicate row that is in a collapsed part of a structure, this part of the structure will be expanded so the duplicate is visible.
Filtering by Duplicates
Clicking the Filter button hides all structure elements that are not duplicates, leaving only duplicate items and their parents.
When the duplicates panel is closed, the duplicates filter is disabled automatically.
You can view only a part of a structure that is related to a specific item, by pinning that item. Unlike filtering it will show all child issues as well as its parents (filtering will only keep parents).
If you click the 'x2' icon next to a duplicate, the corresponding item and all its duplicates will be pinned - only parts of the structure related to these items will be shown.
To pin an item, you can also use the pin button in the duplicates panel or in the structure panel toolbar (clicking either of them will pin the item currently in focus).
You can both filter and pin duplicates at the same time.