How to change order in which issues issues and workitems are fetched during Initial Synchronization.

Usage: Due to the nature of how TFS4JIRA is handling Epic link creation whenever Epic is created after its children, this relation might not come across during initial synchronization.

Fix: We added a mechanism of sorting fetching workitems and issues during initial synchronization. It is done by editing web.config file located in the root folder of the TFS4JIRA Synchronizer installation.

In order to use this feature, you need a version not lower than 7.10.18. If you have an older version of synchronizer than that, you can always get a new one here: https://spartez-software.com/products/tfs4jira

All you will need to do is to add few lines in the web.config file. There are two keys here that can be added

sortTfsItemTypeDuringInitial and sortJiraIssueTypeDuringInitial. Their values and order of those values translate to the order of fetching issues/workitems.

  1. If only one value is present, it will be the first to be fetched.

  2. We can use wildcards to represent all mapped issue types/workitem types.

  3. sortTfsItemTypeDuringInitial - sets the order of fetching workitem types from Azure DevOps, sortJiraIssueTypeDuringInitial - sets the order of fetching issue types from Jira,

Example:

<add key="sortTfsItemTypeDuringInitial" value="Epic" /> <add key="sortJiraIssueTypeDuringInitial" value="Epic ,*,sub-task" />

 

With given values set:

Initial Synchronization from TFS to Jira

Epics are fetched as first workitem types, and all others are fetched in order of their respective creation date.

Initial Synchronization from Jira to TFS

Epics are fetched as first issue types, then all others according to their creation date without sub-tasks, then at the end, sub-tasks.