Forums

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

Automation - how to check issue comments?

Chasovskikh Kirill
Contributor
February 13, 2023

Hi community! 

 

In Jira smart values there is an example to get author and date of comments

{{#issue.comments}} Comment by: {{author.displayName}} at: {{created}} {{body}} {{/}}

is there any way to mark issue in automation rule with manual start, if there is comment by specific user added in specific dates? 

2 answers

0 votes
Tony Langlet
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 13, 2023

Hello @Chasovskikh Kirill

I haven't tried this out but it could potentially work. It's a combination of itarating through a list and doing an if check on author,displayname and created date. 

 


{{#issue.comments}}

{{if(and((equals(issue.author.displayName, "<Username>"),(equals(issue.created,"<Date>"))))}} 

Comment by: {{issue.author.displayName}} at: {{issue.created}} {{issue.body}}

{{/}}

{{/}}

 https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/

0 votes
Mark Segall
Community Champion
February 13, 2023

Hi @Chasovskikh Kirill - I'd need a bit more context on the rule, but yes this should be possible:

  • TRIGGER: Issue Commented
  • CONDITION (Advanced):
    • {{comment.author.displayName}}
      Equals
      Your Author
  • CONDITION (Advanced):
    • {{comment.created}}
      whatever you're trying to do with date
Chasovskikh Kirill
Contributor
February 13, 2023

Hi @Mark Segall !

Thank you for reply. 

I mean - I need to create a rule, that have manual start.

For example at friday I need to mark all issues, which i have commented for previous week

Mark Segall
Community Champion
February 13, 2023

I don't think you'll be able to do this in that way.  You probably want to do something like this:

Create a custom date field with a name like "Last Comment Date"

Then set up an automation rule to populate it whenever you make a comment.  Something like this:

  • TRIGGER: Issue Commented
  • CONDITION (Advanced):
    • {{comment.author.displayName}}
      Equals
      Your Author
  • ACTION: Edit Issue (Last Comment Date)
    • {{now}}

From here, you can set up a filter/subscription to see all issues with comments for the past week:

"Last Comment Date" >= -7d

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events