JIRA Project Import warns that there are more than twenty attachment entries that do not exist
Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.
When attempting to run a project import, the pre-import validation shows the following error message:
There are more than twenty attachment entries that do not exist in the attachment directory. See your logs for full details.
The following appears in the
2016-05-25 07:53:07,478 JiraTaskExectionThread-70 WARN xxxxxxx 473x1692930x2 mi449q xxxx,xxxx /secure/admin/ProjectImportSelectProject.jspa [imports.project.handler.AttachmentFileValidatorHandler] The attachment 'ATTACHMENT_FILE_NAME.extension' does not exist at '/jira/atlassian/application-data/jira/import/attachments/PROJECT_KEY/PROJECT_KEY-xxx/xxxxx'. It will not be imported.
Based on the error message in the atlassian-jira.log:
The attachment 'ATTACHMENT_FILE_NAME.extension' does not exist at '/jira/atlassian/application-data/jira/import/attachments/PROJECT_KEY/PROJECT_KEY-xxx/xxxxx'. It will not be imported.
PROJECT_KEYvalue in the log entry does not actually match the import's target project key.
For example, the target project to import into has key JSP, while the error message in the log shows some other project key, such as GHS.
- In the target instance, the target project's key has been renamed to match the key of the source project.
See Editing A Project Key for information on changing a project's key.
To identify if the target project's key has been renamed, the following SQL can be used:
SELECT pkey, ORIGINALKEY FROM project;
pkeycolumn is the project's current key, while
ORIGINALKEYis the project's previous key.
- The importer tool is not able to import the attachments properly due to the target project key being renamed.
Delete the target project and re-create it with the correct project key, instead of renaming it.
- As the target project has to be empty for project import to be valid, deleting and re-creating should be fast.
- Note that all schemes will have to be re-associated to the newly created project.
See Restoring Project from Backup for full details.