-
Type:
Bug
-
Resolution: Timed out
-
Priority:
Low
-
None
-
Affects Version/s: None
-
Component/s: Jira - Import - From External System
-
1
-
Minor
Issue Summary
You can import attachments when creating issues via JSON by using the same existent workaround for CSV: Importing attachments into JIRA Cloud using CSV External System Importer.
One of the keys in the attachment's section in the JSON file is called "name", which will define the name displayed in the issue view:
"attachments": [ { "created": "2018-06-07T15:46:01.805-0300", "name": "doc.docx", "description": "", "uri": "https://email%40domain:<API token>@unlimitedjiraworks.atlassian.net/secure/attachment/10292/doc.docx", "attacher": "" } ]
If the importer runs into one or more attachments with the very same value in the key "name" (in the same issue), the importer will fail to import that attachment and the next ones in that issue.
Steps to Reproduce
- Set up a JSON file to import an issue with an attachment stored on a different Jira instance;
- Here's an example file: importAttachments.json

- Replace the information inside the tags <> with the information that will match your scenario;
- Create two attachment entries in the same issue, making sure they have the very same value for the key "name".
- Here's an example file: importAttachments.json
- Import the JSON file via the External System import (https://<yourURL>.atlassian.net/secure/admin/ExternalImport1.jspa).
Expected Results
The importer should either handle the names, or give a clear message about the error.
Actual Results
The issues are imported, but for the attachments that fail, an error message will be displayed:
Failed to attach attachments to issue XXX-00: com.atlassian.jira.web.util.AttachmentException: Got error while saving attachment: Got exception while saving attachment in attachment store. Exception: /opt/micros/serviceVolume/jiratmp/jira-importers-plugin-downloader-8942796679721331572.tmp (No such file or directory)
Workaround
Edit the keys "name" for each attachment entry inside each issue entry so there won't be keys with the same value.
- mentioned in
-
Page Loading...