If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Bugzilla::BugMail::_get_diff should rejoin split activity entries

RESOLVED FIXED in Bugzilla 4.4

Status

()

Bugzilla
Email Notifications
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Simon Green, Assigned: Simon Green)

Tracking

Bugzilla 4.4
Bug Flags:
approval +
approval4.4 +

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
With bugs_actvity we split long changes of a field over 255 characters into multiple rows. Bugzilla::Bug->get_activity has some code that reconstructs this into a single value again (by calling _join_activity_entries). However, when sending Bug e-mails we don't join the two bug_activities row back into a single row.

This broke an extension that brc have. While I can work around it, I think the best solution is rejoin the multiple bugs_activities rows into a single record.

This would mean moving _join_activity_entries from Bugzilla::Bug to Bugzilla::Util. The sub that determines where to split the row (find_wrap_point) is already in Bugzilla::Util.

Patch coming on Monday unless someone wants to write it over the weekend.

  -- simon
(Assignee)

Comment 1

4 years ago
I've written the patch, but need to test it on Monday.
Assignee: email-notifications → sgreen
Status: NEW → ASSIGNED
(Assignee)

Comment 2

4 years ago
Created attachment 766508 [details] [diff] [review]
v1 patch
Attachment #766508 - Flags: review?(glob)
Comment on attachment 766508 [details] [diff] [review]
v1 patch

r=glob, nicely done sir
Attachment #766508 - Flags: review?(glob) → review+
Flags: approval?
Flags: approval4.4?
Flags: approval?
Flags: approval4.4?
Flags: approval4.4+
Flags: approval+
(Assignee)

Comment 4

4 years ago
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/4.4/                         
modified Bugzilla/Bug.pm
modified Bugzilla/BugMail.pm
modified Bugzilla/Util.pm
Committed revision 8574.                                                       

Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/                       
modified Bugzilla/Bug.pm
modified Bugzilla/BugMail.pm
modified Bugzilla/Util.pm
Committed revision 8645.
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED

Comment 5

4 years ago
Comment on attachment 766508 [details] [diff] [review]
v1 patch

>=== modified file 'Bugzilla/BugMail.pm'

>+            && ($diff->{attach_id} // 0)  == ($changes[-1]->{attach_id} // 0)
>+            && ($diff->{comment_id} // 0) == ($changes[-1]->{comment_id} // 0)

You cannot use the Defined-Or operator // in Bugzilla 4.x, because this operator doesn't exist in Perl 5.8.x. This caused several QA tests to fail. For 4.4, I replaced them by ||.

Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.4/
modified Bugzilla/BugMail.pm
Committed revision 8575.

Updated

4 years ago
Duplicate of this bug: 913479
You need to log in before you can comment on or make changes to this bug.