Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue attachment using Linked Issue

Sanjay Dangi April 8, 2025

Hello,

Use Case Here : i am attempting to auto attach content to an Epic from its associated linked EPIC.  I implemented this in two ways :

1. Implementation 1 : Screenshot attached 

Trigger : Issue Link

Action : Edit Issue --> "from- Destination Issue"

this method is working as expected

2. Implementation 2 : Screenshot attached 

Trigger : Scheduled

Action : Edit Issue --> "from -_ _ _ _" (tried all options)

This method is not working at all. Attached the audit log as well. Audit log does say successful for one of option, however, attachment is not happening for the parent epic.Implementation 2.jpgImplementation 1.jpgaudit log.jpg 

 

Need some guidance in implementing method 2

Regards. 

1 answer

1 accepted

1 vote
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 8, 2025

Hi @Sanjay Dangi 

Unfortunately, the smart value and concept of "destination issue" only exists when the trigger is Issue Linked or Issue Link Deleted.  That is why the copy does not work with other trigger types.

For your scenario with the Scheduled Trigger using JQL, you could instead invert the JQL so the "trigger issue" is the one with the attachment, branch to the linked issue, and then copy attachments from the trigger one.

Kind regards,
Bill

Sanjay Dangi April 8, 2025

Hello @Bill Sheboy ,

Thank you for the quick turnaround, as always.

did not understand the part "you could instead invert the JQL so the "trigger issue" is the one with the attachment,". are you asking me to change JQL to look for Issues that has attachment (under the linked EPIC)? so that the child issue acts as a trigger?

i am currently using the JQL : issuetype = epic and issueFunction in hasLinks()

 

Thanks,

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 8, 2025

First, it appears you are doing this with the scheduled trigger to perform some type of bulk-updating for the attachments.  If that is not needed, I recommend staying the Issue Linked trigger.

Otherwise...

 

Your rule is trying to issues based on specific link types to copy the attachments from the issue they are linked to.  And so the key is making the trigger issues (from the Scheduled Trigger's JQL) be the source of those attachments.

For example:

  • scheduled trigger: with JQL to find the issues that have the attachments you want to copy from
  • branch: to linked issues of specific types for the issues to update
    • conditions: if needed... (e.g., check if they have no attachments, etc.)
    • action: edit issue, setting the attachments by copying from the trigger issue

 

I recommend first identifying example issues, and trying to write the JQL needed for the trigger, testing that standalone.

Then use those result to confirm the correct link direction (i.e., types) for your branch, and finally test those types in the rule.

Sanjay Dangi April 8, 2025

Thank you for the update. 

Yes, I intend to bulk update the attachment for the existing issues on jira. 

 

Regards, 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 9, 2025

Thanks for clarifying the need.  Please try the approach I suggested and let me know what happens.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events