diff options
author | Byron Jones <glob@mozilla.com> | 2015-06-02 07:27:59 +0200 |
---|---|---|
committer | Byron Jones <glob@mozilla.com> | 2015-06-02 07:27:59 +0200 |
commit | 00b57b53faec42b68b257ee3ad9f8cecbd0aff02 (patch) | |
tree | ad50002d3f80746165852e39c02ee16d05875b6e /extensions | |
parent | 646d6199a644a1e6d65706c400163d00fa310bfe (diff) | |
download | bugzilla-00b57b53faec42b68b257ee3ad9f8cecbd0aff02.tar.gz bugzilla-00b57b53faec42b68b257ee3ad9f8cecbd0aff02.tar.xz |
Bug 1168824: stop nagging about massively overdue requests
Diffstat (limited to 'extensions')
-rwxr-xr-x | extensions/RequestNagger/bin/send-request-nags.pl | 4 | ||||
-rw-r--r-- | extensions/RequestNagger/lib/Constants.pm | 12 |
2 files changed, 12 insertions, 4 deletions
diff --git a/extensions/RequestNagger/bin/send-request-nags.pl b/extensions/RequestNagger/bin/send-request-nags.pl index e621a8bdc..885a82ff1 100755 --- a/extensions/RequestNagger/bin/send-request-nags.pl +++ b/extensions/RequestNagger/bin/send-request-nags.pl @@ -13,10 +13,6 @@ use warnings; use FindBin qw($RealBin); use lib "$RealBin/../../.."; -# if there are more than this many requests that a user is waiting on, show a -# summary and a link instead. -use constant MAX_SETTER_COUNT => 7; - use Bugzilla; BEGIN { Bugzilla->extensions() } diff --git a/extensions/RequestNagger/lib/Constants.pm b/extensions/RequestNagger/lib/Constants.pm index 66780ad63..9f1b0ba98 100644 --- a/extensions/RequestNagger/lib/Constants.pm +++ b/extensions/RequestNagger/lib/Constants.pm @@ -11,6 +11,8 @@ use strict; use base qw(Exporter); our @EXPORT = qw( + MAX_SETTER_COUNT + MAX_REQUEST_AGE FLAG_TYPES REQUESTEE_NAG_SQL SETTER_NAG_SQL @@ -18,6 +20,14 @@ our @EXPORT = qw( WATCHING_SETTER_NAG_SQL ); +# if there are more than this many requests that a user is waiting on, show a +# summary and a link instead +use constant MAX_SETTER_COUNT => 7; + +# ignore any request older than this many days in the requestee emails +# massively overdue requests will still be included in the 'watching' emails +use constant MAX_REQUEST_AGE => 90; # about three months + # the order of this array determines the order used in email use constant FLAG_TYPES => ( { @@ -69,6 +79,7 @@ sub REQUESTEE_NAG_SQL { AND flags.status = '?' AND products.nag_interval != 0 AND TIMESTAMPDIFF(HOUR, flags.modification_date, CURRENT_DATE()) >= products.nag_interval + AND TIMESTAMPDIFF(DAY, flags.modification_date, CURRENT_DATE()) <= " . MAX_REQUEST_AGE . " AND (profile_setting.setting_value IS NULL OR profile_setting.setting_value = 'on') AND requestee.disable_mail = 0 AND nag_defer.id IS NULL @@ -110,6 +121,7 @@ sub SETTER_NAG_SQL { AND flags.status = '?' AND products.nag_interval != 0 AND TIMESTAMPDIFF(HOUR, flags.modification_date, CURRENT_DATE()) >= products.nag_interval + AND TIMESTAMPDIFF(DAY, flags.modification_date, CURRENT_DATE()) <= " . MAX_REQUEST_AGE . " AND (profile_setting.setting_value IS NULL OR profile_setting.setting_value = 'on') AND setter.disable_mail = 0 AND nag_defer.id IS NULL |