Closed Bug 984438 Opened 7 years ago Closed 6 years ago

Don't send 'Your Overdue Requests' reminder emails on weekends


( :: Extensions, defect)

Not set





(Reporter: keeler, Assigned: glob)




(1 file)

It would be nice if there were the option to have the "outstanding requests" reminder not be sent on weekends.
Tweaking summary since I had trouble finding this.

A needinfo was requested of me at 1am local on Saturday, I then received overdue request emails on Sunday (8am local) and Monday (8am local) - the latter being a bank holiday. I don't expect us to keep track of public holidays, but an option to suppress over weekends (and also maybe when 'away' is in the person's bugzilla nick) would be great :-)
Summary: outstanding requests reminder: don't nag me on weekends → [RequestWhiner] Don't send 'Overdue Requests' reminder emails on weekends
Summary: [RequestWhiner] Don't send 'Overdue Requests' reminder emails on weekends → [RequestWhiner] Don't send 'Your Overdue Requests' reminder emails on weekends
Meant to add: Part of the reason for this ask is that managers can opt into these emails, so whilst I can just ignore them myself, unless they cross reference dates/timezones/holidays, it makes it appear like people are not responding to requests in a timely manner.
See Also: → 1169893
Duplicate of this bug: 1169893
timezones complicates this seemingly trivial request.  we'd need to determine the day of the week from the user's configured timezone and skip users where the current date falls on a weekend.  skipping holidays isn't possible because we don't capture the user's location.
Component: Extensions: Other → Extensions: RequestNagger
Summary: [RequestWhiner] Don't send 'Your Overdue Requests' reminder emails on weekends → Don't send 'Your Overdue Requests' reminder emails on weekends
I would argue that weekend exemption would already be a big improvement.
just not _sending_ emails on weekends isn't that hard.  timezone math tells me that adjusting the crontab to execute only on weekdays wouldn't cause weird overlaps with even the most far flung timezone.  (ie. ignore that part of my pre-coffee ramblings in comment 4).

however that would not address the core issue outlined in comment 1 .. a request raised friday night would still be considered overdue on sunday even if the reminder email wasn't sent.

we'll have to adjust each request after fetching them from the database to subtract weekdays and then skip requests that are no longer overdue after this adjustment.  (doing this in mysql appears to be painful, and mysql's date math when it comes to dst changes is problematic).
Assignee: nobody → glob
Attached patch 984438_1.patch β€” β€” Splinter Review
i explored trying to calculate the number of weekdays between two dates but it looks like the only truly accurate way to do this is to iterate over the dates.  thankfully performance isn't critical for this code.
Attachment #8630341 - Flags: review?(dylan)
Comment on attachment 8630341 [details] [diff] [review]

Review of attachment 8630341 [details] [diff] [review]:

Attachment #8630341 - Flags: review?(dylan) → review+
To ssh://
   77f0501..43740a1  master -> master
Closed: 6 years ago
Resolution: --- → FIXED
Component: Extensions: RequestNagger → Extensions
You need to log in before you can comment on or make changes to this bug.