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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Automation rule doesn't work with the keywords

Hello guys,

 

I really really really need your help here.

Imagine this:

The project Recruitment has an active collector and when they send a recommendation with a candidate to person X (and to the address set for the collector to create the task), their email sounds like this: "If you agree/disagree with this recommendation, please reply with Approved or Rejected"

These 2 keywords were designed for an automation rule that automatically transits the status of the task depending on the answer (in Rejected if the answer is Rejected and in Next Step if the answer is Approved"

 

Now... when the person X replies, both the text of the recruiter and the answer of person X are added to the ticket and my automation rule doesn't know how to differentiate the main answer from what the recruiter wrote ("If you agree with this recommendation, please reply with Approved and if not, with Rejected"). So there are chances that the answer will be Rejected, but the status will go in approved because he sees in the comment what the recruiter initially wrote.

 

I've tried many options with the automation rule, including:

- 2 different rules - one for the keyword Approved and one for Rejected

- the same rule that includes both words

- all of the above with "advanced compared conditions" and it works I comment separately with one of the words

 

My question is:

How can I make an automation rule take into account only the word "Rejected" if in the same comment with it is also "Please reply with Approved or Rejected"?

It would help me a lot to tell me exactly how to make the automation rule work and to be able to differentiate the keyword from what the recruiter writes in the email.

 

Everything I wrote may not be clear, but I am here if you need more information!

Thank you,

Miruna

 

 

 

 

 

 

2 answers

Hi @mirunadriana 

When asking a question about automation rules, it can help to post an image of the rule.  That gives the community some context to go with your explanation/question.

I suggest that you map out the flow/scenarios you expect could happen with the messaging.  (Perhaps with a state transition diagram.)  Once you have that, you may be able to see a pattern you can use with a regular expression to parse the conditions you want in the comments. 

And as needed, perhaps use the current status, change log, or custom fields to use the prior state and so prevent the looping you note.

Best regards,

Bill

Hi @Bill Sheboy ,

Yes, you are right, I should have attached the rule as well.

I will show you the rule for understanding exactly where I get stuck:

 

  • My automation rule:

test 2.PNG

 

 

  • The comment where you can see two emails (one from the recruiter and another one from..John)

test 1.PNG

 

  • Normally, the status should move to approved, but it is rejected

 

test 3.PNG

 

Do you have any idea how I could make my rule ignore the first "Approved or Declined" and take into account only John's answer?

Now regardless of the answer, they go directly into rejected status.

 

Thank you!

Hi @mirunadriana 

Thanks for the image of the rule and for your explanation.

Please try using this to access only the most recent comment: {{issue.comments.last.body}}

And, I recommend that you force the values to a specific case, such as lower, to ensure no typos cause mismatches: {{issue.comments.last.body.toLowerCase}}

Finally, you can modify your condition tests to exclude the instructions before testing for a match (using Add Conditions).  For an example please see below.

Best regards,

Bill

testing for comment text.png

0 votes

Hi @mirunadriana 

You can always check for keywords in the comment body using smart values.

{{comment.body}}

There is an option in the Advanced compare condition to use "contains" condition of regular expression for doing a bit more advanced searching.

I made a video on this topic recently to demonstrate how it works.

I hope it helps.

Ravi

Hi @Ravi Sagar _Adaptavist_ ,

Your video is really very useful!

I will show you how it worked for me snd you will surely understand exactly where I get stuck:

 

  • My automation rule:

test 2.PNG

 

 

  • The comment where you can see two emails (one from the recruiter and another one from..John)

test 1.PNG

 

  • Normally, the status should move to approved, but it is rejected

 

test 3.PNG

 

Do you have any idea how I could make my rule ignore the first "Approved or Declined" and take into account only John's answer?

Now regardless of the answer, they go directly into rejected status.

 

Thank you!

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you