Hello,
We are trying to migrate from JIRA 6.4.1 to JIRA Core 7.2.3 and we have a problem with attachments.
In JIRA's configuration page, attachments path is : /data/jira/data/attachments
We can create attachments in JIRA GUI ... but attachments are stored in /data/jira/data/attachments/PROJECT_KEY/x0000/ISSUE_KEY/ID instead of /data/jira/data/attachments/PROJECT_KEY/ISSUE_KEY/ID
x0000 : 10000 for project 1
x0000 : 20000 for project 2
In Groovy :
filePath = PathUtils.joinPaths(pathManager.attachmentPath, event.issue.projectObject.key, event.issue.key, attachment.id.toString())
Filepath is : /data/jira/data/attachments/PROJECT_KEY/ISSUE_KEY/ID
but after ...
atFile = new File(filePath) if (atFile.exists()) ...
atFile doesn't exist (normal) ...
This JIRA 7.2.3 plateform is a test migration plateform (not our production) so i am not sure if it's a migration 6.4 to 7.2 issue.
Does anyone have an explanation why the path is .../x0000/ ... on my filesystem ?
Thanks
Same problem here : https://answers.atlassian.com/questions/39995607
Community moderators have prevented the ability to post new answers.
From Atlassian Support :
"The directory x0000 is created with every increment of 10,000 issues."
Explanation here :
That's right, it has changed. It's because project keys are now mutable, so you can't rely on a project retaining the same key. The x0000 is the id of the project, which is immutable.
You can simply rename the directories when you migrate/move, but if you upgrade in place, it'll handle it for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The x0000 is the id of the project, which is immutable.
Thanks for your reply but ... are you sure ?
Project Id in database (and in groovy with : issue.projectObject.id) is 10001
The attachment path is : /data/jira/data/attachments/PROJECT_KEY/20000/ISSUE_KEY/xxx
I don't have a project with id = 20000.
I use a groovy script in post function "Create Issue" to duplicate and rename attachments with :
attachmentManager.createAttachmentCopySourceFile(...)
so i need to know the correct attachment path.
An example here : https://answers.atlassian.com/questions/139428
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.