summaryrefslogtreecommitdiffstats
path: root/extensions/Needinfo
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-09-17 19:35:41 +0200
committerDave Lawrence <dlawrence@mozilla.com>2012-09-17 19:35:41 +0200
commitdc987268a6971eef1c17b4cadd2b61ad1ecc8d1a (patch)
treec6c3e15ec76c187ccf905216a264f2e167af3cc3 /extensions/Needinfo
parent40a4bbb0e6a57e7f8f2b0bc5a59235ab33392f91 (diff)
downloadbugzilla-dc987268a6971eef1c17b4cadd2b61ad1ecc8d1a.tar.gz
bugzilla-dc987268a6971eef1c17b4cadd2b61ad1ecc8d1a.tar.xz
Bug 778731 - Add email flag to NEEDINFO state
- Minor update
Diffstat (limited to 'extensions/Needinfo')
-rw-r--r--extensions/Needinfo/Extension.pm16
1 files changed, 8 insertions, 8 deletions
diff --git a/extensions/Needinfo/Extension.pm b/extensions/Needinfo/Extension.pm
index 4ffabcb55..e47b3ed02 100644
--- a/extensions/Needinfo/Extension.pm
+++ b/extensions/Needinfo/Extension.pm
@@ -142,18 +142,18 @@ sub bug_end_of_update {
my ($removed, $added) = Bugzilla::Flag->update_flags($bug, $old_bug, $timestamp);
if ($removed || $added) {
my $field = 'flagtypes.name';
- $removed ||= '';
- $added ||= '';
+ $removed = defined $removed ? $removed : '';
+ $added = defined $added ? $added : '';
LogActivityEntry($bug->id, $field, $removed, $added, $user->id, $timestamp);
# Do not overwrite other flag changes
if ($changes->{$field}) {
- if ($changes->{$field}->[0]) {
- $removed = $changes->{$field}->[0] . ",$removed";
- }
- if ($changes->{$field}->[1]) {
- $added = $changes->{$field}->[1] . ",$added";
- }
+ $removed = defined $changes->{$field}->[0]
+ ? $changes->{$field}->[0] . ", $removed"
+ : $removed;
+ $added = defined $changes->{$field}->[1]
+ ? $changes->{$field}->[1] . ", $added"
+ : $added;
}
$changes->{$field} = [$removed, $added];
}