Unable to download attachment if project key was changed

Description

To replicate:

Create a project, "ABC"
Create an issue and upload an attachment, "ABC-1"
Rename the project key to "DEF"
Archive the issue DEF-1
Expected outcome:

Backup the issue with attachment stored in <Jira-home>/data/attachments/ABC/10000/ABC-1/{Attachment ID}
Actual Outcome:

The plugin will display error where DEF-1 cannot be found in file directory.
This is because the attachment structure are built based on original project key hence any new issue or old issue created will be using old project key.

Environment

None

Assignee

Ferry Chia [Akeles]

Reporter

Ferry Chia [Akeles]

Labels

None

Fix versions

Affects versions

Priority

Major
Configure