Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira server new bug report

Brian Doyle
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 7, 2019

Hi,

 

I don't have permission to create a ticket in the Jira bug reporter, so I'll post it here:

 

Summary: JIRA backup to XML creates <table> entries out of order, which causes import to fail

Component: Backup & Restore: Import from JIRA Server

Affected version: 7.13.0

Description:

I exported my JIRA 7.13.0 instance to an XML backup.  When I tried to import it the import failed with an exception that the MySQL Jira user did not have the REFERENCES privilege.  This is a red herring.

Unzipping the backup file and looking at activeobjects.xml shows a <table> entry that contains this data:

<table name="AO_563AEE_ACTIVITY_ENTITY">

...

 <foreignKey fromTable="AO_563AEE_ACTIVITY_ENTITY" fromColumn="ACTOR_ID" toTable="AO_563AEE_ACTOR_ENTITY" toColumn="ID"/>
<foreignKey fromTable="AO_563AEE_ACTIVITY_ENTITY" fromColumn="ICON_ID" toTable="AO_563AEE_MEDIA_LINK_ENTITY" toColumn="ID"/>
<foreignKey fromTable="AO_563AEE_ACTIVITY_ENTITY" fromColumn="OBJECT_ID" toTable="AO_563AEE_OBJECT_ENTITY" toColumn="ID"/>
<foreignKey fromTable="AO_563AEE_ACTIVITY_ENTITY" fromColumn="TARGET_ID" toTable="AO_563AEE_TARGET_ENTITY" toColumn="ID"/>

</table>

 

In the xml file however, the <table> (creation) entries for AO_563AEE_ACTOR_ENTITY, AO_563AEE_MEDIA_LINK_ENTITY, etc. follow the entry to create the AO_563AEE_ACTIVITY_ENTITY table, so the foreign key reference to these non-existent tables fails.

 

I fixed this in my xml file by moving the AO_563AEE_ACTIVITY_ENTITY <table> element to after the <table> entries for the four references tables.  Then the import works fine.

 

So the fix in the backup generation code is to make sure any referenced foreign table elements appear before the creation of the table(s) that reference them.

1 answer

0 votes
Vishnukumar Vasudevan
Community Champion
January 7, 2019

I think you should report this via https://support.atlassian.com/contact/#/ so that support team can move it to developers. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events