diff options
author | Simon Green <sgreen@redhat.com> | 2013-07-09 04:48:49 +0200 |
---|---|---|
committer | Simon Green <sgreen@redhat.com> | 2013-07-09 04:48:49 +0200 |
commit | 8a2ac0569e86483b6825d8b71bca4adbac345a1c (patch) | |
tree | 5c601a279d8bdceaa915060105fc40a16b26373d /Bugzilla/Bug.pm | |
parent | 9c8b03aa9c8f01da284d39e2726ce609d25866fc (diff) | |
download | bugzilla-8a2ac0569e86483b6825d8b71bca4adbac345a1c.tar.gz bugzilla-8a2ac0569e86483b6825d8b71bca4adbac345a1c.tar.xz |
Bug 885646: Bugzilla::BugMail::_get_diff should rejoin split activity entries
r=glob, a=justdave
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r-- | Bugzilla/Bug.pm | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index fc704df5e..40acca871 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -3942,8 +3942,8 @@ sub get_activity { && ($attachid || 0) == ($operation->{'attachid'} || 0)) { my $old_change = pop @$changes; - $removed = _join_activity_entries($fieldname, $old_change->{'removed'}, $removed); - $added = _join_activity_entries($fieldname, $old_change->{'added'}, $added); + $removed = join_activity_entries($fieldname, $old_change->{'removed'}, $removed); + $added = join_activity_entries($fieldname, $old_change->{'added'}, $added); } $operation->{'who'} = $who; $operation->{'when'} = $when; @@ -3968,35 +3968,6 @@ sub get_activity { return(\@operations, $incomplete_data); } -sub _join_activity_entries { - my ($field, $current_change, $new_change) = @_; - # We need to insert characters as these were removed by old - # LogActivityEntry code. - - return $new_change if $current_change eq ''; - - # Buglists and see_also need the comma restored - if ($field eq 'dependson' || $field eq 'blocked' || $field eq 'see_also') { - if (substr($new_change, 0, 1) eq ',' || substr($new_change, 0, 1) eq ' ') { - return $current_change . $new_change; - } else { - return $current_change . ', ' . $new_change; - } - } - - # Assume bug_file_loc contain a single url, don't insert a delimiter - if ($field eq 'bug_file_loc') { - return $current_change . $new_change; - } - - # All other fields get a space - if (substr($new_change, 0, 1) eq ' ') { - return $current_change . $new_change; - } else { - return $current_change . ' ' . $new_change; - } -} - # Update the bugs_activity table to reflect changes made in bugs. sub LogActivityEntry { my ($i, $col, $removed, $added, $whoid, $timestamp, $comment_id) = @_; |