JIRA Project Import warns that there are more than twenty attachment entries that do not exist
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
問題
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.
atlassian-jira.log
に次のメッセージが表示される。
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.
診断
Diagnostic Steps
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.
The
PROJECT_KEY
value 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;
The
pkey
column is the project's current key, whileORIGINALKEY
is 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.