-
Bug
-
Resolution: Unresolved
-
Low (View bug fix roadmap)
-
None
-
7.2.9, 7.4.2
-
7.02
-
1
-
Severity 3 - Minor
-
0
-
Summary
JIRA project import creates duplicate entries in the label table of the SQL database
Environment
JIRA 7.x
Steps to Reproduce
- 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:
select * from label where label='special';
- 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:
select * from label where label='special';
Expected Results
We expect to only find the single entry in this table for that single issue with that special label
Actual Results
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.
Notes
- 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.
Workaround
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.
[JRASERVER-65870] JIRA project import creates duplicate entries in the label table of the SQL database
UIS | Original: 1 | New: 0 |
UIS | New: 1 |
Minimum Version | New: 7.02 |
Workflow | Original: JAC Bug Workflow v2 [ 2840234 ] | New: JAC Bug Workflow v3 [ 2930454 ] |
Symptom Severity | Original: Minor [ 14432 ] | New: Severity 3 - Minor [ 15832 ] |
Workflow | Original: JIRA Bug Workflow w Kanban v7 - Restricted [ 2591990 ] | New: JAC Bug Workflow v2 [ 2840234 ] |
Status | Original: Verified [ 10005 ] | New: Gathering Impact [ 12072 ] |
Workflow | Original: JIRA Bug Workflow w Kanban v6 - Restricted [ 2429292 ] | New: JIRA Bug Workflow w Kanban v7 - Restricted [ 2591990 ] |
Support reference count | New: 1 |
Description |
Original:
h3. Summary
JIRA project import creates duplicate entries in the label table of the SQL database h3. Environment JIRA 7.x h3. Steps to Reproduce # 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: {code:java} select * from label where label='special'; {code} - This will return a single entry for this one issue with this label # Now generate an [XML backup|https://confluence.atlassian.com/jira/backing-up-data-185729581.html#BackingUpData-UsingJIRA%27sXMLbackuputility] # 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: {code:java} select * from label where label='special'; {code} h3. Expected Results We expect to only find the single entry in this table for that single issue with that special label h3. Actual Results 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. h3. Notes * 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. h3. Workaround 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. |
New:
h3. Summary
JIRA project import creates duplicate entries in the label table of the SQL database h3. Environment JIRA 7.x h3. Steps to Reproduce # 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: {code:java} select * from label where label='special'; {code} - This will return a single entry for this one issue with this label # Now generate an [XML backup|https://confluence.atlassian.com/jira/backing-up-data-185729581.html#BackingUpData-UsingJIRA%27sXMLbackuputility] # 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: {code:java} select * from label where label='special'; {code} h3. Expected Results We expect to only find the single entry in this table for that single issue with that special label h3. Actual Results 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. h3. Notes * 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. h3. Workaround 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. |
Occurrence Factor | New: 10% [ 12830 ] |