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 Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Amir Kazemi
Posted 5 hours ago in Jira

We want to know what Jira Service Desk apps you're using!

Hi Community! My name is Amir and I’m on the Jira Service Desk product marketing team at Atlassian. Our team would love to understand how you’re leveraging our ecosystem for Jira Service Desk. Wha...

22 views 0 4
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