On this page

Use case

Add a comment to the current issue with links to the attachments that were recently added. The time between the transition and the moment when the attachments are added will define if the issue was added recently. The length of this time span can be modified in the expression.

Configuration

Target issue*

Choose Current issue

Comment text*

Use the following expression with the expression editor set to Jira expression:

"Attachments added: " + issue.attachments.filter(attachment => attachment.created > new Date().minusMinutes(2)).map(attachment => "\n[" + attachment.filename+ "|https://jwtcum.atlassian.net/secure/attachment/"+attachment.id+"/"+attachment.filename+"]").reduce((myString, current) => myString + current, "")

Add a comment with the links of the attachments that were added two minutes before the transition.

Replacing the number 2 with another number will allow you to modify the length of the time span established in the expression, increasing or decreasing it in minutes.

Comment author*

Select Current user.

Comment visibility*

Choose Unrestricted (all users).


Related use cases


If you still have questions, feel free to refer to our support team.