Forums

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

Notify Assignee or Transition Issue when customer is adding Attachment(s)

Dimitrios Danampasis
Contributor
September 27, 2021

In a Jira Service Management project, I need to make a transition when a customer is adding an attachment to the issue from within the portal.

I tried to create an automation rule in Automation for Jira using the Value Field Change trigger (Fields to monitor for changes: Attachment) the but it doesn't get triggered from the Customer Portal. It's triggered only from the Jira UI. 

Is there any way to make this transition happen? Or is there any other way to notify the assignee that this ticket has been updated with an attachment?

Best

Dimitris

1 answer

1 accepted

3 votes
Answer accepted
Alex Koxaras _Relational_
Community Champion
September 27, 2021

Geia sou Dimitri!

Attachments are placed on comments. So what you need to do is actually monitor the comments. If you run an automation and log the way an attachment appears, then you will get something like the following:

log attachment.png

As you see, xlm/pdf/doc files etc are represented between square brackets, where as images are placed between "!" and have a different format. With that said, and after experimented for a while, the only solution/workaround I can propose is to play with regex. Since I'm not that familiar with it, with a simple OR regex, I got the result I wanted. However, it's not 100% accurate, since it searches for specific strings:

Notify Assignee on attachment.png

So you search for the last comment, if it contains any values like ".pdf", ".jpg", ".png". If it does, the it pass the if statement and proceeds with the rest of the tasks.

The problem is that a user can write for example on a sentence "Hey Dimitri, did you read that .pdf I've sent you?". If that's the case, then the rule will still run and transition the issue. To overcome that problem you could modify the regex and instead you could write (.pdf]|.jpg|.xlm]|.png) and so on and so forth. You just have to see (by using the log action) for every possible file extension, how this is represented within Jira.

Hope that helps!

Dimitrios Danampasis
Contributor
September 27, 2021

Hi Alex,

Your suggestion looks promising! I'll test it out and make a comment as soon as possible.

Efcharistw!!

Dimitris

Alex Koxaras _Relational_
Community Champion
September 27, 2021

Sure thing! Glad to know that it's promising :D

Dimitrios Danampasis
Contributor
September 28, 2021

Awesome solution! Thanks again! Have a great day.

Alex Koxaras _Relational_
Community Champion
September 28, 2021

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
4.15.1
TAGS
AUG Leaders

Atlassian Community Events