-
Type:
Bug
-
Resolution: Timed out
-
Priority:
Low
-
Component/s: Backup & Restore - Import From JIRA Server
-
3
-
Severity 3 - Minor
Issue Summary
On Jira Server, the attachments file names might have appended to the file ID the original file name of the file(from when the file was uploaded).
For example when I attach a file named "picture.png" to a Jira issue, in the Jira Server's file system the file is stored with the ID of the file it gets in the database, like "12345", but on some cases the name of the original file might be appended to the file ID like "12345_pincture.png".
Depending on the size of the name of the original file, this name might exceed the 255 characters limit and the import will fail silently.
Environment
Jira Server importing into Jira Cloud
Steps to Reproduce
- Have a file with more than 255 characters in its name
- Import this file into Jira Cloud using the "Import attachments" option.
Expected Results
The file is imported
Actual Results
The importer fails silently in the browser (it just reloads the page).
Notes
In the micros_zipper logs we can see this message:
Callback to notify failure, details: Unable create file from a buffer. Failure: Failure{cause=null, reason=BAD_STATUS, message='{"error":{"code":"BadRequestError","title":"Request failed to validate against RAML definition: invalid query (maxLength, 255) for parameter name"}}', httpStatusCode=400}
Workaround
Identify which file has this big name and rename it to just the file ID.
Re-zip maintaining the folder structure and retry the import.
This is also valid for the "thumbs" file within the "thumbs" folder, so make sure to update the file name of the thumbs as well (or simply remove the "thumbs" folder).