With Easy Integration's Issue Listeners, you can integrate your Jira with your internal/external systems by calling REST services accordingly. On this page, you will find out how to define a listener and configure the REST service.
...
- First, tick the Send Attachments checkbox.
- Write the name of the form-data parameter name that contains attachments. For instance, in Jira REST Api for attachments, this name must be "file" and in ServiceNow REST API, this name must be "uploadFile"
Write a groovy script that returns attachments. These attachments will be sent with the REST Call. If script is empty, then all attachments will be sent.
Code Block language groovy title Send Attachments linenumbers true import com.atlassian.jira.component.ComponentAccessor; import com.atlassian.jira.issue.AttachmentManager; AttachmentManager attachmentManager = ComponentAccessor.getAttachmentManager(); def attachments = attachmentManager.getAttachments(issue); return attachments;