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

Item9464: Improve capabilities of SEARCH $changes parameter

pencil
Priority: Enhancement
Current State: Being Worked On
Released In: 2.2.0
Target Release: minor
Applies To: Engine
Component: FoswikiUsability, SEARCH
Branches: master Item14288 Item14380 Item14537
Reported By: VickiBrown
Waiting For:
Last Change By: GeorgeClark
In Formatted Search
$changes(n)      Summary of changes between latest rev and rev n 

That's not as helpful as it might be. I rarely know what n should be. I'm more likely to want to see changes between latest and 2 back, or 3 back...

I'd like to see support added for this, perhaps
$changes(n)      Summary of changes between latest rev and rev n; 
                 if n is a negative number, show summary of changes between latest
                 rev and "n" revisions ago.

So if I say $changes(-2) and latest is rev 19, show changes between 19 and 17; if latest is 5, changes between 5 and 3, and so on.

That would let me do this:

%SEARCH{".*"  type="regex" nosearch="on" noheader="on" 
   newline="%BR%" order="modified" limit="20" reverse="on" 
   format="| [[$web.$topic][$topic]] | r $rev | $date -- $wikiname | $changes | $changes(-2) | "}%

-- VickiBrown - 12 Aug 2010

Excellent point. It seems like a trivial enhancement, but it probably needs a feature proposal.

Set as enhancement

For what it's worth, this horrible monster could be a work-around:

%STARTSECTION{"search"}%
%SEARCH{"1"
   type="query"
   nonoise="on"
   newline="%BR%"
   order="modified"
   limit="20"
   reverse="on" 
   format="| [[$web.$topic][$topic]] | r $rev | $date -- $wikiname | $changes | Since rev($percntINCLUDE{      \"%TOPIC%\"      section=\"rev\"      web=\"$web\"      topic=\"$topic\"      n=\"-2\"   }$percnt): $changes($percntINCLUDE{      \"%TOPIC%\"      section=\"rev\"      web=\"$web\"      topic=\"$topic\"      n=\"-2\"   }$percnt) | Since rev(5): $changes(5) |"}%
%ENDSECTION{"search"}%

%STARTSECTION{"rev"}%%CALC{"$SUM(%REVINFO{
   "$rev"
   web="%web%"
   topic="%topic%"
}% , %n%)"}%%ENDSECTION{"rev"}%

Test

WebNotify r 175 19 May 2019 - 18:05 -- UnknownUser * BeS: Item10883
- * BeatDoebeli: Item11190 Item12672
+ * BeatDoebeli: Item11190 Item12672 Item14831
* BenAveling: Item2205
* BobKrzaczek: Item614
- * BramVanOosterhout: Item1087 Item1099 Item12553 Item12554 It...
Since rev(173): * BeS: Item10883
- * BeatDoebeli: Item11190 Item12672
+ * BeatDoebeli: Item11190 Item12672 Item14831
* BenAveling: Item2205
* BobKrzaczek: Item614
- * BramVanOosterhout: Item1087 Item1099 Item12553 Item12554 It...
Since rev(5): Tasks.WebNotify
-MAKETEXT{"This is a subscription service to be automatically notified...
+This topic is automatically generated by a script running on the serv...
+script analyses all the 'WaitingFor' and 'ReportedBy' fields in repor...
+generates this WebNotify.
- * Main.TWikiGuest example #64;your.company
WebStatistics r 426 19 May 2019 - 01:22 -- AdminUser }%
- May 2019 183490 44 0 10888 WebCreateNewTopic 3595 W...
+ May 2019 191224 44 0 11212 WebCreateNewTopic 3783 W...
Apr 2019 266967 30 4 12510 WebCreateNewTopic 7522 W...
Since rev(424): Tasks.WebStatistics %IF{ "istopic '.Default'" then="$percentINCLUDE{$quot.Default$quot}$percent" else="$percentINCLUDE{$quot.Default$quot}$percent" }% ... Since rev(5): }%
- Jan 2018 94759 150 1 3149 WebHome 653 ItemSummaryQu...
+ May 2019 191224 44 0 11212 WebCreateNewTopic 3783 W...
+ Apr 2019 266967 30 4 12510 WebCreateNewTopic 7522 W...
+ Mar 2019 258343 22 0 16948 WebCreateNewTopic 4798 W...
+ Feb 2019 235045 52 0 9340 WebCreateNewTopic 3190 We...
Item14844 r 2 16 May 2019 - 04:58 -- GeorgeClark * Set USERSTYLEURL = %PUBURLPATH%/%SYSTEMWEB%/PatternSkinCssCookbo
+ That's the new "canonical" form attachment links. Concatenation of ...
+



+ Canonical: %PUBURLPATH{topic="%SYSTEMWEB%.PatternSkinCssCookbook...
+ Concatenated: %PUBURLPATH%/%SYSTEMWEB%/PatternSkinCssCookbookSide...
+

Since rev(0): Tasks.Item14844 In the current (v2.1.6) System.PatternSkinCssCookbookSidebarToggle, we read: This line loads the extra style definition: * Set USERSTYLEURL = ... Since rev(5): Tasks.Item14844 In the current (v2.1.6) System.PatternSkinCssCookbookSidebarToggle, we read: This line loads the extra style definition: * Set USERSTYLEURL = ...
Item000 r 147 14 May 2019 - 03:05 -- GeorgeClark %META:FIELD{name="WaitingFor" title="WaitingFor" value=""}%
-%META:FIELD{name="Checkins" value="Foswikirev:8785 Rev 8786 not found Fo...
+%META:FIELD{name="Checkins" value="Foswikirev:8785 Rev 8786 not found Fo...
%META:FIELD{name="TargetRelease" title="TargetRelease" value="n/a"}%
%META:FIELD{name="trunkCheckins" title="trunkCheckins" value=""}%
-%META:FIELD{name="masterCheckins" value="%25GITREF%7bdistro:ea31bebaa...
Since rev(145): Tasks.Item000 Since rev(5): Tasks.Item000
- Main.SvenDowideit 27 Aug 2010
-


-%COMMENT%
-


%META:FORM{name="ItemTemplate"}%
Item14841 r 4 14 May 2019 - 03:05 -- GeorgeClark %META:FIELD{name="WaitingFor" title="WaitingFor" value=""}%
-%META:FIELD{name="Checkins" value="%25GITREF%7bdistro:bd0b5c230e2b%7d...
+%META:FIELD{name="Checkins" value="%25GITREF%7bdistro:bd0b5c230e2b%7d...
%META:FIELD{name="TargetRelease" title="TargetRelease" value="n/a"}%
%META:FIELD{name="trunkCheckins" title="trunkCheckins" value=""}%
-%META:FIELD{name="masterCheckins" value="%25GITREF%7bdistro:bd0b5c230...
Since rev(2): Tasks.Item14841 Add a from address to the emails to stop the bounce errors. Main.GeorgeClark 08 May 2019 My fix didn't work. Rather than providing a From: h... Since rev(5): Tasks.Item14841 Add a from address to the emails to stop the bounce errors. Main.GeorgeClark 08 May 2019 My fix didn't work. Rather than providing a From: h...
Item14843 r 2 10 May 2019 - 23:25 -- MichaelDaum %META:FIELD{name="trunkCheckins" title="trunkCheckins" value=""}%
-%META:FIELD{name="masterCheckins" title="masterCheckins" value="%25GI...
+%META:FIELD{name="masterCheckins" value="%25GITREF%7bdistro:4b85943d1...
%META:FIELD{name="ItemBranchCheckins" title="ItemBranchCheckins" valu...
Since rev(0): Tasks.Item14843 no need to open() files with a special encoding() param. Main.MichaelDaum 10 May 2019 Since rev(5): Tasks.Item14843 no need to open() files with a special encoding() param. Main.MichaelDaum 10 May 2019
Item14739 r 5 10 May 2019 - 02:49 -- GeorgeClark %META:FIELD{name="ReportedBy" title="ReportedBy" value="Main.MichaelD
-%META:FIELD{name="Codebase" title=" Codebase " value=""}%
+%META:FIELD{name="Codebase" title=" Codebase " value="2.1.6, 2.1.5,...
%META:FIELD{name="SVNRange" title="SVN Range" value=""}%
%META:FIELD{name="Priority" title=" Priority " value="Urgent"}%
-%META:FIELD{name="CurrentState" title="CurrentState" value="Confirmed...
Since rev(3): Tasks.Item14739 Since the logger api was redesigned, i.e. by this checkin, the logger does not use the {Log}{Action} hash anymore to control the type of events ... Since rev(5):
Item14842 r 3 10 May 2019 - 02:48 -- GeorgeClark %META:FIELD{name="Component" title="Component" value="UnitTestContrib
-%META:FIELD{name="Priority" title=" Priority " value="Enhancement"}...
+%META:FIELD{name="Priority" title=" Priority " value="Low"}%
-%META:FIELD{name="CurrentState" title="CurrentState" value="Being Wor...
+%META:FIELD{name="CurrentState" title="CurrentState" value="Closed"}%
%META:FIELD{name="WaitingFor" title="WaitingFor" value=""}%
Since rev(1): Tasks.Item14842 Change the tests to use the foswiki.org site. Eliminate dependency on the twiki project. Main.GeorgeClark 08 May 2019 Since rev(5): Tasks.Item14842 Change the tests to use the foswiki.org site. Eliminate dependency on the twiki project. Main.GeorgeClark 08 May 2019
Item14741 r 2 10 May 2019 - 01:06 -- MichaelDaum %META:FIELD{name="trunkCheckins" title="trunkCheckins" value=""}%
-%META:FIELD{name="masterCheckins" title="masterCheckins" value="%25GI...
+%META:FIELD{name="masterCheckins" value="%25GITREF%7bdistro:4e0ff1c19...
%META:FIELD{name="ItemBranchCheckins" title="ItemBranchCheckins" valu...
Since rev(0): Tasks.Item14741 Test: = CALCULATE{"Foo$EVAL(0)Bar"} .... should be Foo0Bar Hotfix: diff git a/SpreadSheetPlugin/lib/Foswiki/Plugins/SpreadSheetPlugin/Calc.pm... Since rev(5): Tasks.Item14741 Test: = CALCULATE{"Foo$EVAL(0)Bar"} .... should be Foo0Bar Hotfix: diff git a/SpreadSheetPlugin/lib/Foswiki/Plugins/SpreadSheetPlugin/Calc.pm...
Item14762 r 3 10 May 2019 - 01:06 -- MichaelDaum %META:FIELD{name="trunkCheckins" title="trunkCheckins" value=""}%
-%META:FIELD{name="masterCheckins" title="masterCheckins" value="%25GI...
+%META:FIELD{name="masterCheckins" value="%25GITREF%7bdistro:81e62858a...
%META:FIELD{name="ItemBranchCheckins" title="ItemBranchCheckins" valu...
Since rev(1): Tasks.Item14762 Main.MichaelDaum 01 Oct 2018 Since rev(5): Tasks.Item14762 Main.MichaelDaum 01 Oct 2018
Item14767 r 3 10 May 2019 - 01:06 -- MichaelDaum %META:FIELD{name="trunkCheckins" title="trunkCheckins" value=""}%
-%META:FIELD{name="masterCheckins" title="masterCheckins" value="%25GI...
+%META:FIELD{name="masterCheckins" value="%25GITREF%7bdistro:81e62858a...
%META:FIELD{name="ItemBranchCheckins" title="ItemBranchCheckins" valu...
Since rev(1): Tasks.Item14767 * don't hard code fontawesome * allow to add more icon fonts and render them using %JQICON, e.g. material icons from WebFontsContrib * m... Since rev(5): Tasks.Item14767 * don't hard code fontawesome * allow to add more icon fonts and render them using %JQICON, e.g. material icons from WebFontsContrib * m...
Item14819 r 2 10 May 2019 - 01:06 -- MichaelDaum %META:FIELD{name="ReleasedIn" title="ReleasedIn" value="2.1.7"}%
-%META:FIELD{name="CheckinsOnBranches" title="CheckinsOnBranches" valu...
+%META:FIELD{name="CheckinsOnBranches" value="Release02x01 master"}%
%META:FIELD{name="trunkCheckins" title="trunkCheckins" value=""}%
-%META:FIELD{name="masterCheckins" title="masterCheckins" value=""}%
+%META:FIELD{name="masterCheckins" value="%25GITREF%7bdistro:78fcb97eb...
Since rev(0): Tasks.Item14819 How to reproduce: 1 edit a topic in wysiwyg mode 2 switch to raw mode 3 make a change 4 preview it 5 switch back to wysiwyg 6... Since rev(5): Tasks.Item14819 How to reproduce: 1 edit a topic in wysiwyg mode 2 switch to raw mode 3 make a change 4 preview it 5 switch back to wysiwyg 6...
Item14824 r 2 10 May 2019 - 01:06 -- MichaelDaum %META:FIELD{name="trunkCheckins" title="trunkCheckins" value=""}%
-%META:FIELD{name="masterCheckins" title="masterCheckins" value="%25GI...
+%META:FIELD{name="masterCheckins" value="%25GITREF%7bdistro:ac7c59ef5...
%META:FIELD{name="ItemBranchCheckins" title="ItemBranchCheckins" valu...
Since rev(0): Tasks.Item14824 Not guests are equal, however the first that gets a login page will have caused it to be cached. All other guests get the cached version instead ... Since rev(5): Tasks.Item14824 Not guests are equal, however the first that gets a login page will have caused it to be cached. All other guests get the cached version instead ...
Item14837 r 2 10 May 2019 - 01:06 -- MichaelDaum %META:FIELD{name="ReleasedIn" title="ReleasedIn" value="2.1.7"}%
-%META:FIELD{name="CheckinsOnBranches" title="CheckinsOnBranches" valu...
+%META:FIELD{name="CheckinsOnBranches" value="Release02x01 master"}%
%META:FIELD{name="trunkCheckins" title="trunkCheckins" value=""}%
-%META:FIELD{name="masterCheckins" title="masterCheckins" value=""}%
+%META:FIELD{name="masterCheckins" value="%25GITREF%7bdistro:97563ce9e...
Since rev(0): Tasks.Item14837 Main.MichaelDaum 02 May 2019 Since rev(5): Tasks.Item14837 Main.MichaelDaum 02 May 2019
Item14838 r 2 10 May 2019 - 01:06 -- MichaelDaum %META:FIELD{name="ReleasedIn" title="ReleasedIn" value="2.1.7"}%
-%META:FIELD{name="CheckinsOnBranches" title="CheckinsOnBranches" valu...
+%META:FIELD{name="CheckinsOnBranches" value="Release02x01 master"}%
%META:FIELD{name="trunkCheckins" title="trunkCheckins" value=""}%
-%META:FIELD{name="masterCheckins" title="masterCheckins" value=""}%
+%META:FIELD{name="masterCheckins" value="%25GITREF%7bdistro:97563ce9e...
Since rev(0): Tasks.Item14838 ... by recording a tab switch in the anchor of the url Main.MichaelDaum 02 May 2019 Since rev(5): Tasks.Item14838 ... by recording a tab switch in the anchor of the url Main.MichaelDaum 02 May 2019
Item14839 r 2 10 May 2019 - 01:06 -- MichaelDaum %META:FIELD{name="ReleasedIn" title="ReleasedIn" value="2.1.7"}%
-%META:FIELD{name="CheckinsOnBranches" title="CheckinsOnBranches" valu...
+%META:FIELD{name="CheckinsOnBranches" value="Release02x01 master"}%
%META:FIELD{name="trunkCheckins" title="trunkCheckins" value=""}%
-%META:FIELD{name="masterCheckins" title="masterCheckins" value=""}%
+%META:FIELD{name="masterCheckins" value="%25GITREF%7bdistro:97563ce9e...
Since rev(0): Tasks.Item14839 Main.MichaelDaum 02 May 2019 Since rev(5): Tasks.Item14839 Main.MichaelDaum 02 May 2019
Item14840 r 2 10 May 2019 - 01:06 -- MichaelDaum %META:FIELD{name="ReleasedIn" title="ReleasedIn" value="2.1.7"}%
-%META:FIELD{name="CheckinsOnBranches" title="CheckinsOnBranches" valu...
+%META:FIELD{name="CheckinsOnBranches" value="Release02x01 master"}%
%META:FIELD{name="trunkCheckins" title="trunkCheckins" value=""}%
-%META:FIELD{name="masterCheckins" title="masterCheckins" value=""}%
+%META:FIELD{name="masterCheckins" value="%25GITREF%7bdistro:97563ce9e...
Since rev(0): Tasks.Item14840 Main.MichaelDaum 02 May 2019 Since rev(5): Tasks.Item14840 Main.MichaelDaum 02 May 2019
Item13883 r 205 10 May 2019 - 01:06 -- MichaelDaum %META:FIELD{name="trunkCheckins" title="trunkCheckins" value=""}%
-%META:FIELD{name="masterCheckins" value="%25GITREF%7bdistro:c994933c2...
+%META:FIELD{name="masterCheckins" value="%25GITREF%7bdistro:c994933c2...
%META:FIELD{name="ItemBranchCheckins" value="%25GITREF%7bdistro:d37a6...
Since rev(203): Tasks.Item13883 Main.GeorgeClark 03 Dec 2015 Since rev(5): %META:FIELD{name="WaitingFor" title="WaitingFor" value=""}%
-%META:FIELD{name="Checkins" value="%25GITREF%7bdistro:a628fb3a133f%7d...
+%META:FIELD{name="Checkins" value="%25GITREF%7bdistro:a628fb3a133f%7d...
%META:FIELD{name="TargetRelease" title="TargetRelease" value="minor"}...
%META:FIELD{name="ReleasedIn" title="ReleasedIn" value="2.1.0"}%
-%META:FIELD{name="CheckinsOnBranches" value="Release02x00 master Item...
Item14720 r 5 10 May 2019 - 01:06 -- MichaelDaum %META:FIELD{name="trunkCheckins" title="trunkCheckins" value=""}%
-%META:FIELD{name="masterCheckins" title="masterCheckins" value="%25GI...
+%META:FIELD{name="masterCheckins" value="%25GITREF%7bdistro:2e1ef0e00...
%META:FIELD{name="ItemBranchCheckins" title="ItemBranchCheckins" valu...
Since rev(3): Tasks.Item14720 ... 3.6.0 atm Main.MichaelDaum 12 Jun 2018 Since rev(5):
Item14727 r 4 10 May 2019 - 01:06 -- MichaelDaum %META:FIELD{name="trunkCheckins" title="trunkCheckins" value=""}%
-%META:FIELD{name="masterCheckins" title="masterCheckins" value="%25GI...
+%META:FIELD{name="masterCheckins" value="%25GITREF%7bdistro:170e7b009...
%META:FIELD{name="ItemBranchCheckins" title="ItemBranchCheckins" valu...
Since rev(2): Tasks.Item14727 Leverage the support to edit and parse dates in different languages available in jquery ui datepicker. Main.MichaelDaum 12 Jun 2018 Since rev(5): Tasks.Item14727 Leverage the support to edit and parse dates in different languages available in jquery ui datepicker. Main.MichaelDaum 12 Jun 2018

Rev test

424

-- PaulHarvey - 13 Aug 2010

I'm not sure that "horrible monster" is doing what you think. The results are similar to what I got using CALC. No + or - anywhere in the output is suspicious. I don't think it's actually a diff.

-- VickiBrown - 13 Aug 2010

I don't quite agree - the $percentINCLUDE is correctly calculating the rev number -2 - however I would agree that the $changes() token isn't very useful in its output; probably, that's a bug

-- PaulHarvey - 14 Aug 2010

Okay, now it should be fixed (the example, that is)

-- PaulHarvey - 17 Aug 2010

I've raised Item9502 for the crash this example causes on 1.1 - separate from the issues that Vicki raises.

-- SvenDowideit - 19 Aug 2010
 
Topic revision: r12 - 31 Jan 2018, GeorgeClark - This page was cached on 19 May 2019 - 20:24.

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