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
e614c881
Commit
e614c881
authored
Aug 12, 2001
by
zach%zachlipton.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
patch for bug 26194: Header explaining reason d'etre for email in New email notification scheme.
Patch by MattyT <matty@chariot.net.au>, r=zach@zachlipton.com.
parent
f12bfa36
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
10 deletions
+48
-10
defparams.pl
defparams.pl
+4
-1
processmail
processmail
+44
-9
No files found.
defparams.pl
View file @
e614c881
...
...
@@ -382,10 +382,13 @@ page).},
"From: bugzilla-daemon
To: %to%
Subject: [Bug %bugid%] %neworchanged%%summary%
X-Bugzilla-Reason: %reasonsheader%
%urlbase%show_bug.cgi?id=%bugid%
%diffs%"
);
%diffs%
%reasonsbody%"
);
...
...
processmail
View file @
e614c881
...
...
@@ -23,7 +23,7 @@
# Dan Mosedale <dmose@mozilla.org>
# Alan Raetz <al_raetz@yahoo.com>
# Jacob Steenhagen <jake@actex.net>
#
#
Matthew Tuck <matty@chariot.net.au>
use
diagnostics
;
use
strict
;
...
...
@@ -118,11 +118,11 @@ sub ProcessOneBug {
$ccSet
->
mergeFromDB
(
"SELECT who FROM cc WHERE bug_id = $id"
);
$values
{
'cc'
}
=
$ccSet
->
toString
();
my
@voter
l
ist
;
my
@voter
L
ist
;
SendSQL
(
"SELECT profiles.login_name FROM votes, profiles "
.
"WHERE votes.bug_id = $id AND profiles.userid = votes.who"
);
while
(
MoreSQLData
())
{
push
(
@voter
l
ist
,
FetchOneColumn
());
push
(
@voter
L
ist
,
FetchOneColumn
());
}
$values
{
'assigned_to'
}
=
DBID_to_name
(
$values
{
'assigned_to'
});
...
...
@@ -247,11 +247,11 @@ sub ProcessOneBug {
@ccList
=
filterEmailGroup
(
'CClist'
,
\
@currentEmailAttributes
,
$values
{
'cc'
});
@voter
l
ist
=
filterEmailGroup
(
'Voter'
,
\
@currentEmailAttributes
,
join
(
','
,
@voter
l
ist
));
@voter
L
ist
=
filterEmailGroup
(
'Voter'
,
\
@currentEmailAttributes
,
join
(
','
,
@voter
L
ist
));
my
@emailList
=
(
@assigned_toList
,
@reporterList
,
@qa_contactList
,
@ccList
,
@voter
l
ist
);
@qa_contactList
,
@ccList
,
@voter
L
ist
);
# only need one entry per person
my
@allEmail
=
();
...
...
@@ -271,9 +271,19 @@ sub ProcessOneBug {
# print LOG "excluded: " . join(',',@excludedAddresses) . "\n\n";
foreach
my
$person
(
@allEmail
)
{
my
@reasons
;
$count
++
;
push
(
@reasons
,
'AssignedTo'
)
if
lsearch
(
\
@assigned_toList
,
$person
)
!=
-
1
;
push
(
@reasons
,
'Reporter'
)
if
lsearch
(
\
@reporterList
,
$person
)
!=
-
1
;
push
(
@reasons
,
'QAContact'
)
if
lsearch
(
\
@qa_contactList
,
$person
)
!=
-
1
;
push
(
@reasons
,
'CC'
)
if
lsearch
(
\
@ccList
,
$person
)
!=
-
1
;
push
(
@reasons
,
'Voter'
)
if
lsearch
(
\
@voterList
,
$person
)
!=
-
1
;
if
(
!
defined
(
NewProcessOnePerson
(
$person
,
$count
,
\
@headerlist
,
\%
values
,
\%
defmailhead
,
\
@reasons
,
\%
values
,
\%
defmailhead
,
\%
fielddescription
,
$difftext
,
$newcomments
,
$start
,
$id
)))
{
...
...
@@ -613,12 +623,13 @@ sub filterEmailGroup ($$$) {
return
@filteredList
;
}
sub
NewProcessOnePerson
($$$$$$$$$$)
{
my
(
$person
,
$count
,
$hlRef
,
$valueRef
,
$dmhRef
,
$fdRef
,
$difftext
,
sub
NewProcessOnePerson
($$$$$$$$$$
$
)
{
my
(
$person
,
$count
,
$hlRef
,
$
reasonsRef
,
$
valueRef
,
$dmhRef
,
$fdRef
,
$difftext
,
$newcomments
,
$start
,
$id
)
=
@_
;
my
%
values
=
%
$valueRef
;
my
@headerlist
=
@$hlRef
;
my
@reasons
=
@$reasonsRef
;
my
%
defmailhead
=
%
$dmhRef
;
my
%
fielddescription
=
%
$fdRef
;
...
...
@@ -676,6 +687,28 @@ sub NewProcessOnePerson ($$$$$$$$$$) {
return
;
}
my
$reasonsbody
=
"You are receiving this mail because:\n"
;
if
(
scalar
(
@reasons
)
==
0
)
{
$reasonsbody
.=
"Whoops! I have no idea!\n"
;
}
else
{
foreach
my
$reason
(
@reasons
)
{
if
(
$reason
eq
'AssignedTo'
)
{
$reasonsbody
.=
"You are the assignee for the bug, or are watching the assignee.\n"
;
}
elsif
(
$reason
eq
'Reporter'
)
{
$reasonsbody
.=
"You reported the bug, or are watching the reporter.\n"
;
}
elsif
(
$reason
eq
'QAContact'
)
{
$reasonsbody
.=
"You are the QA contact for the bug, or are watching the QA contact.\n"
;
}
elsif
(
$reason
eq
'CC'
)
{
$reasonsbody
.=
"You are on the CC list for the bug, or are watching someone who is.\n"
;
}
elsif
(
$reason
eq
'Voter'
)
{
$reasonsbody
.=
"You are a voter for the bug, or are watching someone who is.\n"
;
}
else
{
$reasonsbody
.=
"Whoops! There is an unknown reason!\n"
;
}
}
}
my
$isnew
=
(
$start
!~
m/[1-9]/
);
my
%
substs
;
...
...
@@ -696,6 +729,8 @@ sub NewProcessOnePerson ($$$$$$$$$$) {
$substs
{
"diffs"
}
=
$difftext
.
"\n\n"
.
$newcomments
;
}
$substs
{
"summary"
}
=
$values
{
'short_desc'
};
$substs
{
"reasonsheader"
}
=
join
(
" "
,
@reasons
);
$substs
{
"reasonsbody"
}
=
$reasonsbody
;
my
$template
=
Param
(
"newchangedmail"
);
...
...
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