Please help - I could not find information on how to do it.
I create ExternalIssue class and fill all needed fields in my importer client class. During the process I create several ExternalAttachment classes using the following constructor:
ExternalAttachment(String name, File file, Date date)
The file contains the full path name of the attachment file, somewhere on the local disk.
and put them into list, then calling issue.setAttachments(list);
After process is finished, the imported issue has no attachments. The log also shows no signs of any attachments.
What am I missing?
Another strange thing is that JIRA deletes attachment files from their source location for unknown reasons.
Seems like the DefaultJiraDataImporter.CreateIssue pays no attention on the contents of the ExternalIssue attachments field and requests attachments from the DataBean. The default implementation of the getAttachmentsForIssue method just returns empty collection. The "real" implementation should return attachments for the issue, like this:
@Override public Collection<ExternalAttachment> getAttachmentsForIssue(ExternalIssue externalIssue, ImportLogger log) { return externalIssue.getAttachments(); }
This is really a strange behavior.
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.