You are here: Foswiki>Tasks Web>Item13995 (31 Jan 2018, GeorgeClark)Edit Attach

Item13995: Search $changes renders a simple summary.

Priority: Urgent
Current State: Closed
Released In: 2.1.1
Target Release: patch
Applies To: Engine
Component: SEARCH
Branches: master Release02x01 Item13897 Item14033 Item14380 Item14537
Reported By: GeorgeClark
Waiting For:
Last Change By: GeorgeClark
The bug is down in
-            $out =~ s/\$changes(?:\(([^\)]*)\))?/
-              $item->summariseChanges(Foswiki::Store::cleanUpRevID($1), $revNum)/ges;

If $changes is used, without a requested revision, the $1 is undefined. cleanUpRevID(undef) returns zero, and summariseChanges becomes a simple summary.

The fix is relatively easy, but this is going to break any search using $changes inside a table. The $summary renders without newlines, where as $changes generates a diff, and any newlines break the table.

There are multiple tasks dealing with the rather ineffective $changes option.
  • No way to get a simple text summary, equivalent to $summary, except for the differences between the revisions See Item1390
  • No way to ask for just the prior rev. See Item9464 $changes(n) asks for differences since rev n, which is hard to predict in a search.

-- GeorgeClark - 27 Feb 2016

Topic revision: r9 - 31 Jan 2018, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy