Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Any way to search for last comment made by customer in a automation

Rosana Casilli January 10, 2023

Hi all!! 

I have this question.

An user needs an automation in a service management proyect where one of the conditions is that the last comment from customer is greater than 24hs

I do not have any addon, and the company doesn't approve any.

Is there any way to achieve this?

Thanks in advance

Ro

1 answer

1 accepted

0 votes
Answer accepted
Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 11, 2023

Hi @Rosana Casilli 

Could you provide the logic for the full rule? It can help to try and replicate the rule sometimes, rather than just one condition of it.

It might be possible - just to confirm though, the comment must have been from the customer, not just any public comment?

Ste

Rosana Casilli January 12, 2023

Hi @Stephen Wright _Elabor8_  thanks for your answer

 

The logic would be like this..

If  the issue status is different from "Waiting from customer" or " Resolved" or "Done" 

and the custom field "Es cliente crítico" = Si

and the last comment has been from a customer in the last 24hs

Then send a message to a slack channel stating that "The ticket needs your attention"

 

The key is that I need to include in the conditions that the last comment has been from a customer, not public, not internal. 

 

Thanks in advance,

Ro

Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 12, 2023

Hi @Rosana Casilli 

I think I've found a way to do this - although it does required two rules, and an extra custom field.

Effectively, the logic is:

  • Rule 1: Set the last date/time a customer made a comment
  • Rule 2: Check for customers who have not commented on their tickets within 24 hours

This is how I did it.

---

Custom Field

I created a new Custom Field - type: Date/Time Picker.

This field will capture when a customer makes a comment - for this example, I've called the field "Last Customer Comment"

---

Rule 1

Rule 1 will set the "Last Customer Comment" field - this is the rule:

  • Trigger: Issue Commented
  • Condition: Advanced Compare Condition
    • First Value = {{issue.comments.last.author}}
    • Condition = equals
    • Second Value = {{issue.Reporter}}
  • Action: Edit Issue
    • Field = Last Customer Comment
      • Value = {{now}}

---

Rule 2

Rule 2 then checks for the parameters you require in the main rule:

  • Trigger: Scheduled
    • Run Rule every = <Timeframe here>
    • Run a JQL Search = check box to TRUE
    • JQL =
      • status not in ("Waiting for Customer", Resolved, Done) AND  "Es cliente crítico" = Si 
  • Condition: Issue Fields Condition
    • Field = Last Customer Comment
    • Condition = is before
    • Value = 24 hours ago
  • Action: Send Slack Message

---

A few notes on these rules:

  • I've assumed the Reporter field is where your customer is listed, but another user field could be referenced if necessary.
  • I've used a Scheduled Trigger for Rule 2. Just remember that if you make the timeframe short (eg. every 1 hour), you could end up with repeated Slack notifications, depending on the Trigger's settings
  • Because I've used Scheduledthe parameters in relation to Status and the Client Criticality field can be used in the JQL there
  • Based on how I've set up Rule 1, this will only work for Issues customers comment on in future, or where you manually populate the "Last Customer Comment" date field. I did not find a consistent way to populate this field based on previous data (although it would be ideal if you could do this!)
    • Setting the Date/Time manually would also let you test this rule without a real-life scenario

---

Let us know what you think!

Ste

Rosana Casilli January 17, 2023

Hi @Stephen Wright _Elabor8_ 

I am testing the rule right now... 

but I don't know why the condition for the Last comment is not working... 

It shows that the condition is not matching, so  I have added an email to see which values are not matching. 

The reporter and the last comment auther are the same, here an example of what I get:

Reporter:  5b48e5cad68487679779c2dd

Last comment author: 5b48e5cad68487679779c2dd

they are the same. 

Has something to do that the customer is a in fact a jira user also?

 

Thanks in advance,

Ro

Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 17, 2023

Hi @Rosana Casilli 

It shouldn't do.

Can you provide a screenshot of the Condition itself, and what is displayed in the Audit Log?

Ste

Rosana Casilli January 18, 2023

Hi @Stephen Wright _Elabor8_  the problem was the condition I have change it and it passed (I have run it manually)

 

Thank you so much for your help!!

 

Ro

Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 18, 2023

Awesome, glad it works!

If this answer helped resolve your question, could you accept it? This helps others who find the question in future know this answer can help them too :)

Ste

Suggest an answer

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

Atlassian Community Events