Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
76c90bb4
Commit
76c90bb4
authored
Mar 22, 2012
by
Byron Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 731526: Adds an email event for product and/or component notifications
r=LpSolit, a=LpSolit
parent
84a46547
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
7 deletions
+16
-7
Constants.pm
Bugzilla/Constants.pm
+4
-2
DB.pm
Bugzilla/Install/DB.pm
+6
-3
User.pm
Bugzilla/User.pm
+4
-2
email.html.tmpl
template/en/default/account/prefs/email.html.tmpl
+2
-0
No files found.
Bugzilla/Constants.pm
View file @
76c90bb4
...
...
@@ -81,7 +81,7 @@ use Memoize;
POS_EVENTS
EVT_OTHER EVT_ADDED_REMOVED EVT_COMMENT EVT_ATTACHMENT EVT_ATTACHMENT_DATA
EVT_PROJ_MANAGEMENT EVT_OPENED_CLOSED EVT_KEYWORD EVT_CC EVT_DEPEND_BLOCK
EVT_BUG_CREATED
EVT_BUG_CREATED
EVT_COMPONENT
NEG_EVENTS
EVT_UNCONFIRMED EVT_CHANGED_BY_ME
...
...
@@ -332,11 +332,13 @@ use constant EVT_KEYWORD => 7;
use
constant
EVT_CC
=>
8
;
use
constant
EVT_DEPEND_BLOCK
=>
9
;
use
constant
EVT_BUG_CREATED
=>
10
;
use
constant
EVT_COMPONENT
=>
11
;
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
,
EVT_DEPEND_BLOCK
,
EVT_BUG_CREATED
;
EVT_CC
,
EVT_DEPEND_BLOCK
,
EVT_BUG_CREATED
,
EVT_COMPONENT
;
use
constant
EVT_UNCONFIRMED
=>
50
;
use
constant
EVT_CHANGED_BY_ME
=>
51
;
...
...
Bugzilla/Install/DB.pm
View file @
76c90bb4
...
...
@@ -388,7 +388,7 @@ sub update_table_definitions {
"WHERE initialqacontact = 0"
);
_migrate_email_prefs_to_new_table
();
_initialize_
dependency_tree_changes_email_pref
();
_initialize_
new_email_prefs
();
_change_all_mysql_booleans_to_tinyint
();
# make classification_id field type be consistent with DB:Schema
...
...
@@ -2393,13 +2393,16 @@ sub _migrate_email_prefs_to_new_table {
}
}
sub
_initialize_
dependency_tree_changes_email_pref
{
sub
_initialize_
new_email_prefs
{
my
$dbh
=
Bugzilla
->
dbh
;
# Check for any "new" email settings that wouldn't have been ported over
# during the block above. Since these settings would have otherwise
# fallen under EVT_OTHER, we'll just clone those settings. That way if
# folks have already disabled all of that mail, there won't be any change.
my
%
events
=
(
"Dependency Tree Changes"
=>
EVT_DEPEND_BLOCK
);
my
%
events
=
(
"Dependency Tree Changes"
=>
EVT_DEPEND_BLOCK
,
"Product/Component Changes"
=>
EVT_COMPONENT
,
);
foreach
my
$desc
(
keys
%
events
)
{
my
$event
=
$events
{
$desc
};
...
...
Bugzilla/User.pm
View file @
76c90bb4
...
...
@@ -1620,7 +1620,9 @@ our %names_to_events = (
'attachments.mimetype'
=>
EVT_ATTACHMENT_DATA
,
'attachments.ispatch'
=>
EVT_ATTACHMENT_DATA
,
'dependson'
=>
EVT_DEPEND_BLOCK
,
'blocked'
=>
EVT_DEPEND_BLOCK
);
'blocked'
=>
EVT_DEPEND_BLOCK
,
'product'
=>
EVT_COMPONENT
,
'component'
=>
EVT_COMPONENT
);
# Returns true if the user wants mail for a given bug change.
# Note: the "+" signs before the constants suppress bareword quoting.
...
...
@@ -1639,7 +1641,7 @@ sub wants_bug_mail {
}
else
{
# Catch-all for any change not caught by a more specific event
$events
{
+
EVT_OTHER
}
=
1
;
$events
{
+
EVT_OTHER
}
=
1
;
}
# If the user is in a particular role and the value of that role
...
...
template/en/default/account/prefs/email.html.tmpl
View file @
76c90bb4
...
...
@@ -103,6 +103,8 @@ document.write('<input type="button" value="Disable All Mail" onclick="SetCheckb
description = "A new $terms.bug is created" },
{ id = constants.EVT_OPENED_CLOSED,
description = "The $terms.bug is resolved or reopened" },
{ id = constants.EVT_COMPONENT,
description = "The product or component changes" },
{ id = constants.EVT_PROJ_MANAGEMENT,
description = "The priority, status, severity, or milestone changes" },
{ id = constants.EVT_COMMENT,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment