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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,456,738
Community Members
 
Community Events
176
Community Groups

How to search a string in comments.

I have implemented automatic commenting on tickets after they are open more than 1 hour.

  • I need to check if the comments are not already existing to make sure there are no duplicates.
  • I need to check a string value in comments of the ticket so that duplicate comments can be avoided.

2 answers

1 vote

Instead of checking the text of the last comment, I'd address it differently:

  1. Use a datetime type custom field called "Last time auto-commented" or something
  2. Then update it when you add that auto comment
  3. And verify if the last comment's creation timestamp equals to the value of this custom field, it means that the last comment is an auto-comment (and there is no need another one)

@Aron Gombas _Midori_ 

Thanks for the reply, but i have three auto comments to be checked so ,

 

my thought was to check a specific string in the comments.

@sai siva

the approach of @Aron Gombas _Midori_ is the best from my point of view.

If you have 3 different autocomments you can create some check that will be actived after the comment added (in the automation that create the comment).

Normally, it's a good practice when you add a comment update a "notified Date Field" in order to avoid to do the same comment again in the future. (Obviously checking this "nofitied Date Field" before adding a new one.

 

If you have 3 different comment, check it 3 times I think so.

 

Best regards!

0 votes

Hi @sai siva !

The first thing that comes to mind is the following:

... and comment ~ "your text here"

@Grigory Salnikov 

Thanks for the quick reply.

comment ~ "open for 1 hour"
  • comment no 1 = this incident is sorted and to be forwarded.

  • comment no 2 = this incident is open for 1 hour please respont.

 

so if i use comment ~ "open for 1 hour " this checks for all the comments in the ticket ?

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events