Aklapper has uploaded a new change for review. https://gerrit.wikimedia.org/r/91362
Change subject: Fix InlineHistory's "marked as a duplicate" detection being too eager ...................................................................... Fix InlineHistory's "marked as a duplicate" detection being too eager Backported from http://bzr.mozilla.org/bmo/4.2/revision/9091 Bug: 55373 Change-Id: I54ecc20eced83d7d8851769d056c03329c162f62 --- M extensions/InlineHistory/Extension.pm 1 file changed, 9 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/bugzilla/modifications refs/changes/62/91362/1 diff --git a/extensions/InlineHistory/Extension.pm b/extensions/InlineHistory/Extension.pm index f761a9f..60050e0 100644 --- a/extensions/InlineHistory/Extension.pm +++ b/extensions/InlineHistory/Extension.pm @@ -157,28 +157,25 @@ my ($bug_id, $activity) = @_; + # we're ignoring pre-bugzilla 3.0 ".. has been marked as a duplicate .." + # comments because searching each comment's text is expensive. these + # legacy comments will not be visible at all in the bug's comment/activity + # stream. bug 928786 deals with migrating those comments to be stored as + # CMT_HAS_DUPE instead. + my $dbh = Bugzilla->dbh; my $sth = $dbh->prepare(" SELECT profiles.login_name, " . $dbh->sql_date_format('bug_when', '%Y.%m.%d %H:%i:%s') . ", - extra_data, - thetext + extra_data FROM longdescs INNER JOIN profiles ON profiles.userid = longdescs.who - WHERE bug_id = ? - AND ( - type = ? - OR thetext LIKE '%has been marked as a duplicate of this%' - ) + WHERE bug_id = ? AND type = ? ORDER BY bug_when "); $sth->execute($bug_id, CMT_HAS_DUPE); - while (my($who, $when, $dupe_id, $the_text) = $sth->fetchrow_array) { - if (!$dupe_id) { - next unless $the_text =~ / (\d+) has been marked as a duplicate of this/; - $dupe_id = $1; - } + while (my($who, $when, $dupe_id) = $sth->fetchrow_array) { my $entry = { 'when' => $when, 'who' => $who, -- To view, visit https://gerrit.wikimedia.org/r/91362 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I54ecc20eced83d7d8851769d056c03329c162f62 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/bugzilla/modifications Gerrit-Branch: master Gerrit-Owner: Aklapper <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
