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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
04824af9
Commit
04824af9
authored
Jan 23, 2000
by
terry%mozilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New email code wasn't notifying people of changes in state of
dependent bugs.
parent
c2491654
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
15 deletions
+85
-15
defparams.pl
defparams.pl
+13
-0
globals.pl
globals.pl
+13
-0
processmail
processmail
+59
-15
No files found.
defparams.pl
View file @
04824af9
...
@@ -255,6 +255,19 @@ has to then turn on the "New email tech" preference.},
...
@@ -255,6 +255,19 @@ has to then turn on the "New email tech" preference.},
0
);
0
);
DefParam
(
"newchangedmail"
,
q{The same as 'changedmail', but used for the newemailtech stuff.}
,
"l"
,
"From: bugzilla-daemon
To: %to%
Cc: %cc%
Subject: [Bug %bugid%] %neworchanged% - %summary%
%urlbase%show_bug.cgi?id=%bugid%
%diffs%"
);
DefParam
(
"whinedays"
,
DefParam
(
"whinedays"
,
"The number of days that we'll let a bug sit untouched in a NEW state before our cronjob will whine at the owner."
,
"The number of days that we'll let a bug sit untouched in a NEW state before our cronjob will whine at the owner."
,
...
...
globals.pl
View file @
04824af9
...
@@ -600,6 +600,19 @@ sub UserInGroup {
...
@@ -600,6 +600,19 @@ sub UserInGroup {
}
}
# Determines if the given bug_status string represents an "Opened" bug. This
# routine ought to be paramaterizable somehow, as people tend to introduce
# new states into Bugzilla.
sub
IsOpenedState
{
my
(
$state
)
=
(
@_
);
if
(
$state
=~
/^(NEW|REOPENED|ASSIGNED)$/
)
{
return
1
;
}
return
0
;
}
sub
RemoveVotes
{
sub
RemoveVotes
{
my
(
$id
,
$reason
)
=
(
@_
);
my
(
$id
,
$reason
)
=
(
@_
);
ConnectToDatabase
();
ConnectToDatabase
();
...
...
processmail
View file @
04824af9
...
@@ -400,6 +400,54 @@ sub NewProcessOneBug {
...
@@ -400,6 +400,54 @@ sub NewProcessOneBug {
$difftext
=
trim
(
$difftext
);
$difftext
=
trim
(
$difftext
);
my
$deptext
=
""
;
my
$resid
=
SendSQL
(
"SELECT bugs_activity.bug_id, fielddefs.name, "
.
" oldvalue, newvalue "
.
"FROM bugs_activity, dependencies, fielddefs "
.
"WHERE bugs_activity.bug_id = dependencies.dependson "
.
" AND dependencies.blocked = $id "
.
" AND fielddefs.fieldid = bugs_activity.fieldid"
.
" AND (fielddefs.name = 'bug_status' "
.
" OR fielddefs.name = 'resolution') "
.
" AND bug_when > '$start' "
.
" AND bug_when <= '$end' "
.
"ORDER BY bug_when, bug_id"
);
my
$thisdiff
=
""
;
my
$lastbug
=
""
;
my
$interestingchange
=
0
;
while
(
MoreSQLData
())
{
my
(
$bug
,
$what
,
$old
,
$new
)
=
(
FetchSQLData
());
if
(
$bug
ne
$lastbug
)
{
if
(
$interestingchange
)
{
$deptext
.=
$thisdiff
;
}
$lastbug
=
$bug
;
$thisdiff
=
"\nThis bug depends on bug $bug, which changed state:\n\n"
;
$thisdiff
.=
FormatTriple
(
"What "
,
"Old Value"
,
"New Value"
);
$thisdiff
.=
(
'-'
x
76
)
.
"\n"
;
$interestingchange
=
0
;
}
$thisdiff
.=
FormatTriple
(
$fielddescription
{
$what
},
$old
,
$new
);
if
(
$what
eq
'bug_status'
&&
IsOpenedState
(
$old
)
ne
IsOpenedState
(
$new
))
{
$interestingchange
=
1
;
}
}
if
(
$interestingchange
)
{
$deptext
.=
$thisdiff
;
}
$deptext
=
trim
(
$deptext
);
if
(
$deptext
)
{
$difftext
=
trim
(
$difftext
.
"\n\n"
.
$deptext
);
}
my
$newcomments
=
GetLongDescription
(
$id
,
$start
,
$end
);
my
$newcomments
=
GetLongDescription
(
$id
,
$start
,
$end
);
my
$count
=
0
;
my
$count
=
0
;
...
@@ -451,6 +499,7 @@ sub NewProcessOneBug {
...
@@ -451,6 +499,7 @@ sub NewProcessOneBug {
# }
# }
# }
# }
my
$head
=
""
;
my
$head
=
""
;
foreach
my
$f
(
@headerlist
)
{
foreach
my
$f
(
@headerlist
)
{
...
@@ -484,6 +533,9 @@ sub NewProcessOneBug {
...
@@ -484,6 +533,9 @@ sub NewProcessOneBug {
# }
# }
}
}
}
}
if
(
$difftext
eq
""
&&
$newcomments
eq
""
)
{
if
(
$difftext
eq
""
&&
$newcomments
eq
""
)
{
# Whoops, no differences!
# Whoops, no differences!
next
;
next
;
...
@@ -503,21 +555,13 @@ sub NewProcessOneBug {
...
@@ -503,21 +555,13 @@ sub NewProcessOneBug {
}
}
$substs
{
"summary"
}
=
$values
{
'short_desc'
};
$substs
{
"summary"
}
=
$values
{
'short_desc'
};
# my $template = Param("changedmail");
my
$template
=
Param
(
"newchangedmail"
);
my
$template
=
"From: bugzilla-daemon
To: %to%
Cc: %cc%
Subject: [Bug %bugid%] %neworchanged% - %summary%
%urlbase%show_bug.cgi?id=%bugid%
%diffs%"
;
my
$msg
=
PerformSubsts
(
$template
,
\%
substs
);
my
$msg
=
PerformSubsts
(
Param
(
"changedmail"
),
\%
substs
);
open
(
SENDMAIL
,
"|/usr/lib/sendmail -t"
)
||
open
(
SENDMAIL
,
"|/usr/lib/sendmail -t"
)
||
die
"Can't open sendmail"
;
die
"Can't open sendmail"
;
print
SENDMAIL
trim
(
$msg
);
print
SENDMAIL
trim
(
$msg
)
.
"\n"
;
close
SENDMAIL
;
close
SENDMAIL
;
push
(
@sentlist
,
$person
);
push
(
@sentlist
,
$person
);
}
}
...
@@ -598,16 +642,16 @@ sub ProcessOneBug {
...
@@ -598,16 +642,16 @@ sub ProcessOneBug {
$logstr
=
"$logstr; mail sent to $tolist, $cclist"
;
$logstr
=
"$logstr; mail sent to $tolist, $cclist"
;
}
}
}
unlink
(
$diffs
);
Log
(
$logstr
);
}
if
(
@sentlist
)
{
if
(
@sentlist
)
{
print
"<B>Email sent to:</B> "
.
join
(
", "
,
@sentlist
)
.
"\n"
;
print
"<B>Email sent to:</B> "
.
join
(
", "
,
@sentlist
)
.
"\n"
;
if
(
$didexclude
)
{
if
(
$didexclude
)
{
print
"<B>Excluding:</B> $nametoexclude (<a href=changepassword.cgi>change your preferences</a> if you wish not to be excluded)\n"
;
print
"<B>Excluding:</B> $nametoexclude (<a href=changepassword.cgi>change your preferences</a> if you wish not to be excluded)\n"
;
}
}
}
}
}
unlink
(
$diffs
);
Log
(
$logstr
);
}
rename
(
$new
,
$old
)
||
die
"Can't rename $new to $old"
;
rename
(
$new
,
$old
)
||
die
"Can't rename $new to $old"
;
chmod
0666
,
$old
;
chmod
0666
,
$old
;
if
(
$regenerate
)
{
if
(
$regenerate
)
{
...
...
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