Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Q&A
  • Jira
  • Questions
  • Automation Rule to add the attachment using Automation for Jira which are newly added to comment

Automation Rule to add the attachment using Automation for Jira which are newly added to comment

SaiSatya {Appfire} June 6, 2024

Hi Team,

 

I want an automation rule to add attachments as comments if we add any image to the comment, excluding already existing images.

Say, suppose I have four attachments in the ticket already, and I have uploaded a new image in a comment. I want only the newly added image comments again by excluding the older four attachments.

I'm using the below automation, which is adding existing attachments as well.

{{#attachment}}

!{{filename}}!

{{/}}

1 answer

0 votes
Duc Thang TRAN
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.
June 6, 2024

Hello @SaiSatya {Appfire} 

If I understand correctly, your need is:

When a new attachment is added, you are looking for a way to delete all old attachments except the new one.

Is this correct? If so, I can try to help you find a solution.

{{attachment.last.filename}}

2024-06-06 15_29_09-Automation - POC Jira.png

 

SaiSatya {Appfire} June 7, 2024

Hi @Duc Thang TRAN

My actual use case is when I add a new attachment added to a comment, I want the same attachment to be commented once again by Automation for Jira. For me If I add one attachment in comment Automation for Jira it's adding older attachments as well.

1.jpg2.jpg

Duc Thang TRAN
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.
June 10, 2024

Hello @SaiSatya {Appfire} 

If you want the automation comment the last attachement, can you try this smat value ? 

!{{attachment.last.filename}}|thumbnail!

You can try this one if in your last comment, is has only a attachement and now texte 

{{issue.comments.last.body}}

 

Hope this can help your need :)

Duc Thang TRAN
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.
June 10, 2024

* You can try this one if in your last comment, is has only a attachement and no  texte 

Suggest an answer

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

Atlassian Community Events