Auto comment JQL Query for 2w old status?

Lauris Sestulis May 18, 2015

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

2 votes
Answer accepted
Udo Brand
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.
May 19, 2015

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)

Lauris Sestulis May 22, 2015

THX this worked for me smile

Suggest an answer

Log in or Sign up to answer