When the customer creates a version, either in JIRA or JIRA Agile board, after deleting this version, all issues using it as fix or affected version will still have a reference to it in the database.
This results in some incorrect JQL searches for Fix Versions or Affected Versions. For example, if an issue ABC-123 had only the 'version1' as its fix version and this one is deleted (doesn't have a fix version anymore), this search won't return the issue when it should:
Since that was the only fix version the issue had, now it should be null or empty, but the search fails as there's still a reference to the old version in the database.
This is also happening to affected versions.
- Have a project in JIRA
- Create a version (either in the board in case of Agile or not) and an issue
- Add the version as the issue's fixVersion (or affectedVersion)
- Delete the version without removing it as the fixVersion (or affectedVersion) in the issue itself:
- Go to the versions page in the project
- Click '...' >> 'Delete' >> 'Delete'
- This JQL search should return the issue, as it was the only fixVersion:
Though the fixVersion is no longer visible in the issue, the following JQL won't return it even if it was the only fixVersion and it should:
When deleting the version, even though the warning says the links will be removed, they're not completely.
Though the fixVersion/affectedVersion is not shown, there's still an entry in the 'nodeassociation' table to the non-existing version. They can all be found with these searches:
This was replicated in JIRA Cloud instances, but there are reports in JIRA Server instances as well.
JIRA Server instances
- Search for the orphan links as per above and copy their IDs
- Remove it directly from the database using the IDs found in the search above
- Fix Versions:
- Affected Versions:
- Reindex JIRA to be sure the changes are applied
- To avoid this in the future, bulk edit issues to remove the fix/affected versions before deleting versions.
- Open a support request at Atlassian Support to have this workaround be applied