Copy Attachments from Incident to JIRA Issue using flow designer Spoke.

Ravi Srikanth
Tera Contributor

Hi,

I have a requirement to Copy attachments from an Incident record to JIRA Issue using the flow designer spoke. I have built below flow and I am able to copy the attachment, but for scenarios like when I have multiple attachments my flow is copying only the first attachment. 

Scenario 1: For each single attachment added to the Incident, I want only that file to be copied into JIRA issue. 

Scenario 2 : Assume a scenario when the incident record already has 2 attachments and when I attach the third attachment, I want only the third attachment to be copied into JIRA assuming the first two attachments are already copied into JIRA Issue.

Below are Options which I tried with no success. Please suggest any better approach to address this Issue. Thanks

Option 1 : Step 1. Lookup Attachment is always returning the first attachment, so always only the first attached file is getting copied into JIRA Issue. I tried For Each Loop condition also, when I use this it always copies all the attachments to JIRA, which will create duplicate copies. 

 

Option 1 tried : Trigger when Attachment is added onto Incident record.

find_real_file.png

 

Option 2:

I also tried triggering the subflow from an On-Insert Business Rule on the sys_attachment table, but here also Lookup Attachment is always taking the first attachment on the Incident record, even-though I am passing the sysId of the second or third attachment file.

 

Option 2 tried : Trigger Subflow from an On-insert Business Rule on sys_attachment table.find_real_file.png

find_real_file.png

 

6 REPLIES 6

Hi im stuck on the same issue and was wondering if anyone had figured it out.

Thanks

Aman Gulati
Giga Guru

Hi

When we use the Copy Attachment method from the JIRA Spoke we get the following error

Request not sent to uri= https://.....jira.xxxx.com/rest/api/2/issue/xxxxx/attachments : java.net.SocketException: Connection reset

 

Create Issue method works perfectly.

Has anyone seem the same issue and any suggestions on how to resolve?

 

Thanks

Aman