Auto comment JQL Query for 2w old status?

Hi.
I need to make JQL query to find issues in status for 14 days (2w) and make a auto comment. I have two options but they don't work as I need.
This one finds issues and comments but at the same time checks issue updates and that leads leads to postponed comments.
project = PROJ AND status in ("Waiting For Customer") AND type in ("Change Request") and updated < -14d

This option finds issues don't check the updates of issues but makes auto comment every day.

project = PROJ AND status in ("Waiting For Customer") AND type in ("Change Request") not status changed after -2w

I need that only one reminder comment be added 2 weeks after status is changed to Waiting on customer and is still in that status after 2 weeks. Any other updates should not be taken into consideration.

1 answer

1 accepted

If you have scriptrunner installed you could use in addition the 'commented' jql function

project = PROJ AND status in ("Waiting For Customer") AND type in ("Change Request") not status changed after -2w and not issuefunction in commented("after-2w")

So you would only find issue that haven't changed their status in the last 2 weeks and have not been commented in that period as well (you can refine the commented subquery like "after -2w by <USER>"

For details see: https://jamieechlin.atlassian.net/wiki/display/GRV/Scripted+JQL+Functions#ScriptedJQLFunctions-commented(commentquery)

THX this worked for me smile

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,774 views 11 18
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot