Status: Gathering Impact (View Workflow)
Affects Version/s: 7.2.9, 7.4.2
Fix Version/s: None
Component/s: Backup & Restore (non-migration)
Introduced in Version:7.02
Support reference count:1
Symptom Severity:Severity 3 - Minor
Bug Fix Policy:
JIRA project import creates duplicate entries in the label table of the SQL database
- create a project in JIRA with at least 1 issue
- Give this issue a label, in this case used example label called 'special'
- After this label has been confirmed, go into SQL and run command:
- This will return a single entry for this one issue with this label
- Now generate an XML backup
- Then go back to the JIRA issue, remove that label from the issue
- Re-run SQL query, you should have 0 results
- Then delete the entire project from this JIRA instance
- then create a new project with the same project name/key as the previously delete project
- Then use the project import tool to import that previously deleted project (using the XML backup you created)
- After this is complete, run the SQL query again:
We expect to only find the single entry in this table for that single issue with that special label
We actually find there are two entries in this table for that issue in regards to this single label. Not only that, but all labels that were imported as part of issues imported in this project import appear to have duplicate entries in the label table of the database. The ID column is incrementing and is unique, but there are multiple entries with the same issue value and the same label value that appear to be caused directly by this project import process.
- Note that the UI of JIRA only shows a single label for this issue. So there is not a problem that way.
- But in cases where users are running SQL queries or other external reporting on their databases for this table, this is a problem because the project import appears to be creating duplicate data that will mess with reporting.
- This was not the case in regards to project imports in JIRA 6.x versions. It appears that this is something new as of the 7.x line of project importing.
It might be possible to use some fancy SQL query to locate and remove the duplicates, but I'm not sure the specifics of how this could be done without risking data loss/integrity issues.