Skip to content

Commit 6871038

Browse files
committed
Fix the reopen timing and notification
Because the reminder, sent after 5 days (for example) makes a fake transition (from WfF to WfF) we need to account separately for issues without changes: - Since sent to WfT (7 days, for example) for issues that weren't reminded (notification = 2) - Since remind happened (2 days, for example) for issues that were reminded (notification = 3)
1 parent 74f95b0 commit 6871038

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tracker_automations/manage_waiting_for_feedback/manage_waiting_for_feedback.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ fi
7272
# some hours before they should. So, using hours (days * 24) to get more accurate results.
7373
hourstoreopen=$((24*$daystoreopen))
7474
hourstoremind=$((24*$daystoremind))
75+
hoursafterremind=$((hourstoreopen-hourstoremind))
7576

7677
# Note this could be done by one unique "runFromIssueList" action, but we are splitting
7778
# the search and the update in order to log all the reopenend issues within jenkins ($logfile)
@@ -114,11 +115,18 @@ done
114115
# that have spent more than ${hourstoreopen} awaiting for feedback.
115116
# - Note that the transition, automatically, will clear the "Waiting for Feedback Notifications"
116117
# field. It has been defined in the Workflow as a post action.
118+
# - As far as the reminder (C) notification performs a fake transition, we need to, separately
119+
# look for issues which status did not change:
120+
# - Since the beginning (hourstoreopen) is they were not reminded. (aka, 7 days, for example).
121+
# - Since the reminder (hoursafterremind) if they were reminded. (aka, 2 days, for example).
117122
${basereq} --action getIssueList \
118123
--jql "project = 'Moodle' \
119124
AND status IN ('Waiting for feedback', 'Waiting for feedback (CLR)') \
120-
AND NOT status CHANGED AFTER -${hourstoreopen}h \
121-
AND 'Waiting for Feedback Notifications' IN (2,3)" \
125+
AND ( \
126+
(NOT status CHANGED AFTER -${hourstoreopen}h AND 'Waiting for Feedback Notifications' = 2) \
127+
OR \
128+
(NOT status CHANGED AFTER -${hoursafterremind}h AND 'Waiting for Feedback Notifications' = 3) \
129+
)" \
122130
--file "${resultfile}"
123131

124132
# Iterate over found issues, adding the comment ('Waiting for Feedback Notifications' will be cleaned by the workflow).

0 commit comments

Comments
 (0)