TL;DR: It occurs that Field value changed trigger does not work with some for some fields like attachments, time tracking or log work when you add it via comments. I created a workaround based on Automations. Below you can find how it is possible.
I'm building an integration between Jira and external (non-Atlassian) tool based on webhooks. I used for that built-in webhook feature and it works almost for every action in Jira. Almost... It find out that, for attachments added to tickets, webhook is send to external system but it contains info about attachment without small detail about jira ticket. In other words it inform external system that new attachment is added to Jira but it don't say in what ticket.
As a workaround I create an automation rule like below:
Rule trigger - Field value changed
Create variable to get attachment ID
{{fieldChange.to}}
It is working great but during test I found that for attachments added directly in a comment automation rule is not triggered.
I asked Atlassian support about that and they informed me about this bug - https://jira.atlassian.com/browse/AUTO-382
Based on above I decided to create next workaround with Automation rules. My solution:
Rule trigger - Issue commented
Condition - Smart Values Condition
First value - {{triggerIssue.comment.last.body}}
Condition - contains regular expression
Regular expression - \.(txt|jpg|pdf|gif|png|csv|docx|pptx|jpeg)
Create variable to get attachments filename
Now I need to thanks @Bill Sheboy about his valuable tips here and his awesome article.
Hope that this will help some of you :)
Sebastian Krzewiński
Certified Atlassian Expert/Senior Application Engineer
199 accepted answers
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
1 comment