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
b29f60f6
Commit
b29f60f6
authored
Jul 28, 2010
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 396558: Dependency change e-mails should only include status changes that happened right now
r/a=mkanat
parent
457f46da
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
8 deletions
+15
-8
Bug.pm
Bugzilla/Bug.pm
+12
-5
BugMail.pm
Bugzilla/BugMail.pm
+0
-0
User.pm
Bugzilla/User.pm
+2
-2
newchangedmail.txt.tmpl
template/en/default/email/newchangedmail.txt.tmpl
+1
-1
No files found.
Bugzilla/Bug.pm
View file @
b29f60f6
...
...
@@ -1154,14 +1154,22 @@ sub send_changes {
# If there were changes in dependencies, we need to notify those
# dependencies.
my
%
notify_deps
;
if
(
$changes
->
{
'bug_status'
})
{
my
(
$old_status
,
$new_status
)
=
@
{
$changes
->
{
'bug_status'
}
};
# If this bug has changed from opened to closed or vice-versa,
# then all of the bugs we block need to be notified.
if
(
is_open_state
(
$old_status
)
ne
is_open_state
(
$new_status
))
{
$notify_deps
{
$_
}
=
1
foreach
(
@
{
$self
->
blocked
});
my
$params
=
{
forced
=>
{
changer
=>
$user
},
type
=>
'dep'
,
dep_only
=>
1
,
blocker
=>
$self
,
changes
=>
$changes
};
foreach
my
$id
(
@
{
$self
->
blocked
})
{
$params
->
{
id
}
=
$id
;
_send_bugmail
(
$params
,
$vars
);
}
}
}
...
...
@@ -1177,8 +1185,7 @@ sub send_changes {
# an error later.
delete
$changed_deps
{
''
};
my
%
all_dep_changes
=
(
%
notify_deps
,
%
changed_deps
);
foreach
my
$id
(
sort
{
$a
<=>
$b
}
(
keys
%
all_dep_changes
))
{
foreach
my
$id
(
sort
{
$a
<=>
$b
}
(
keys
%
changed_deps
))
{
_send_bugmail
({
forced
=>
{
changer
=>
$user
},
type
=>
"dep"
,
id
=>
$id
},
$vars
);
}
...
...
@@ -1188,7 +1195,7 @@ sub _send_bugmail {
my
(
$params
,
$vars
)
=
@_
;
my
$results
=
Bugzilla::BugMail::
Send
(
$params
->
{
'id'
},
$params
->
{
'forced'
});
Bugzilla::BugMail::
Send
(
$params
->
{
'id'
},
$params
->
{
'forced'
}
,
$params
);
if
(
Bugzilla
->
usage_mode
==
USAGE_MODE_BROWSER
)
{
my
$template
=
Bugzilla
->
template
;
...
...
Bugzilla/BugMail.pm
View file @
b29f60f6
This diff is collapsed.
Click to expand it.
Bugzilla/User.pm
View file @
b29f60f6
...
...
@@ -1513,7 +1513,7 @@ our %names_to_events = (
# Note: the "+" signs before the constants suppress bareword quoting.
sub
wants_bug_mail
{
my
$self
=
shift
;
my
(
$bug_id
,
$relationship
,
$fieldDiffs
,
$comments
,
$dep
endencyText
,
my
(
$bug_id
,
$relationship
,
$fieldDiffs
,
$comments
,
$dep
_mail
,
$changer
,
$bug_is_new
)
=
@_
;
# Make a list of the events which have happened during this bug change,
...
...
@@ -1572,7 +1572,7 @@ sub wants_bug_mail {
# Dependent changed bugmails must have an event to ensure the bugmail is
# emailed.
if
(
$dep
endencyText
ne
''
)
{
if
(
$dep
_mail
)
{
$events
{
+
EVT_DEPEND_BLOCK
}
=
1
;
}
...
...
template/en/default/email/newchangedmail.txt.tmpl
View file @
b29f60f6
...
...
@@ -24,7 +24,7 @@
From: [% Param('mailfrom') %]
To: [% to_user.email %]
Subject: [[% terms.Bug %] [%+ bug.id %]] [% 'New: ' IF isnew %][%+ bug.short_desc %]
Date: [% bug.delta_ts FILTER time("%a, %d %b %Y %T %z", to_user.timezone) %]
Date: [%
delta_ts ||
bug.delta_ts FILTER time("%a, %d %b %Y %T %z", to_user.timezone) %]
X-Bugzilla-Reason: [% reasonsheader %]
X-Bugzilla-Type: [% isnew ? 'new' : 'changed' %]
X-Bugzilla-Watch-Reason: [% reasonswatchheader %]
...
...
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