diff options
Diffstat (limited to 'Bugzilla/Constants.pm')
-rw-r--r-- | Bugzilla/Constants.pm | 129 |
1 files changed, 60 insertions, 69 deletions
diff --git a/Bugzilla/Constants.pm b/Bugzilla/Constants.pm index 45897a332..9946be3f3 100644 --- a/Bugzilla/Constants.pm +++ b/Bugzilla/Constants.pm @@ -51,9 +51,6 @@ use base qw(Exporter); LOGOUT_CURRENT LOGOUT_KEEP_CURRENT - DEFAULT_FLAG_EMAIL_SETTINGS - DEFAULT_EMAIL_SETTINGS - GRANT_DIRECT GRANT_DERIVED GRANT_REGEXP @@ -71,6 +68,20 @@ use base qw(Exporter); COMMENT_COLS UNLOCK_ABORT + + RELATIONSHIPS + REL_ASSIGNEE REL_QA REL_REPORTER REL_CC REL_VOTER + REL_ANY + + POS_EVENTS + EVT_OTHER EVT_ADDED_REMOVED EVT_COMMENT EVT_ATTACHMENT EVT_ATTACHMENT_DATA + EVT_PROJ_MANAGEMENT EVT_OPENED_CLOSED EVT_KEYWORD EVT_CC + + NEG_EVENTS + EVT_UNCONFIRMED EVT_CHANGED_BY_ME + + GLOBAL_EVENTS + EVT_FLAG_REQUESTED EVT_REQUESTED_FLAG ); @Bugzilla::Constants::EXPORT_OK = qw(contenttypes); @@ -136,72 +147,6 @@ use constant contenttypes => "ics" => "text/calendar" , }; -use constant DEFAULT_FLAG_EMAIL_SETTINGS => - "~FlagRequestee~on" . - "~FlagRequester~on"; - -# By default, almost all bugmail is turned on, with the exception -# of CC list additions for anyone except the Assignee/Owner. -# If you want to customize the default settings for new users at -# your own site, ensure that each of the lines ends with either -# "~on" or just "~" (for off). - -use constant DEFAULT_EMAIL_SETTINGS => - "ExcludeSelf~on" . - - "~FlagRequestee~on" . - "~FlagRequester~on" . - - "~emailOwnerRemoveme~on" . - "~emailOwnerComments~on" . - "~emailOwnerAttachments~on" . - "~emailOwnerStatus~on" . - "~emailOwnerResolved~on" . - "~emailOwnerKeywords~on" . - "~emailOwnerCC~on" . - "~emailOwnerOther~on" . - "~emailOwnerUnconfirmed~on" . - - "~emailReporterRemoveme~on" . - "~emailReporterComments~on" . - "~emailReporterAttachments~on" . - "~emailReporterStatus~on" . - "~emailReporterResolved~on" . - "~emailReporterKeywords~on" . - "~emailReporterCC~" . - "~emailReporterOther~on" . - "~emailReporterUnconfirmed~on" . - - "~emailQAcontactRemoveme~on" . - "~emailQAcontactComments~on" . - "~emailQAcontactAttachments~on" . - "~emailQAcontactStatus~on" . - "~emailQAcontactResolved~on" . - "~emailQAcontactKeywords~on" . - "~emailQAcontactCC~" . - "~emailQAcontactOther~on" . - "~emailQAcontactUnconfirmed~on" . - - "~emailCClistRemoveme~on" . - "~emailCClistComments~on" . - "~emailCClistAttachments~on" . - "~emailCClistStatus~on" . - "~emailCClistResolved~on" . - "~emailCClistKeywords~on" . - "~emailCClistCC~" . - "~emailCClistOther~on" . - "~emailCClistUnconfirmed~on" . - - "~emailVoterRemoveme~on" . - "~emailVoterComments~" . - "~emailVoterAttachments~" . - "~emailVoterStatus~" . - "~emailVoterResolved~on" . - "~emailVoterKeywords~" . - "~emailVoterCC~" . - "~emailVoterOther~" . - "~emailVoterUnconfirmed~"; - use constant GRANT_DIRECT => 0; use constant GRANT_DERIVED => 1; use constant GRANT_REGEXP => 2; @@ -230,4 +175,50 @@ use constant COMMENT_COLS => 80; # because of error use constant UNLOCK_ABORT => 1; +use constant REL_ASSIGNEE => 0; +use constant REL_QA => 1; +use constant REL_REPORTER => 2; +use constant REL_CC => 3; +use constant REL_VOTER => 4; + +use constant RELATIONSHIPS => REL_ASSIGNEE, REL_QA, REL_REPORTER, REL_CC, + REL_VOTER; + +# Used for global events like EVT_FLAG_REQUESTED +use constant REL_ANY => 100; + +# There are two sorts of event - positive and negative. Positive events are +# those for which the user says "I want mail if this happens." Negative events +# are those for which the user says "I don't want mail if this happens." +# +# Exactly when each event fires is defined in wants_bug_mail() in User.pm; I'm +# not commenting them here in case the comments and the code get out of sync. +use constant EVT_OTHER => 0; +use constant EVT_ADDED_REMOVED => 1; +use constant EVT_COMMENT => 2; +use constant EVT_ATTACHMENT => 3; +use constant EVT_ATTACHMENT_DATA => 4; +use constant EVT_PROJ_MANAGEMENT => 5; +use constant EVT_OPENED_CLOSED => 6; +use constant EVT_KEYWORD => 7; +use constant EVT_CC => 8; + +use constant POS_EVENTS => EVT_OTHER, EVT_ADDED_REMOVED, EVT_COMMENT, + EVT_ATTACHMENT, EVT_ATTACHMENT_DATA, + EVT_PROJ_MANAGEMENT, EVT_OPENED_CLOSED, EVT_KEYWORD, + EVT_CC; + +use constant EVT_UNCONFIRMED => 50; +use constant EVT_CHANGED_BY_ME => 51; + +use constant NEG_EVENTS => EVT_UNCONFIRMED, EVT_CHANGED_BY_ME; + +# These are the "global" flags, which aren't tied to a particular relationship. +# and so use REL_ANY. +use constant EVT_FLAG_REQUESTED => 100; # Flag has been requested of me +use constant EVT_REQUESTED_FLAG => 101; # I have requested a flag + +use constant GLOBAL_EVENTS => EVT_FLAG_REQUESTED, EVT_REQUESTED_FLAG; + + 1; |