cross
Foswiki General Assembly will be held on 28th November 2019, 1200 UTC on Freenode IRC channel #foswiki-association. See AgendaTenthGeneralAssembly
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 12 Nov 2019 - 15: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
Item14873 r 1 12 Nov 2019 - 12:55 -- MichaelDaum Tasks.Item14873 ... to be less error prone Uploaded to Extensions.Testing.UpdatesPlugin Main.MichaelDaum 12 Nov 2019 Since rev(-1): Tasks.Item14873 ... to be less error prone Uploaded to Extensions.Testing.UpdatesPlugin Main.MichaelDaum 12 Nov 2019 Since rev(5): Tasks.Item14873 ... to be less error prone Uploaded to Extensions.Testing.UpdatesPlugin Main.MichaelDaum 12 Nov 2019
Item14872 r 1 12 Nov 2019 - 11:51 -- MichaelDaum Tasks.Item14872 "pinging" an image is expensive, yet required to get its geometry. so we cache these efforts as possible. Main.MichaelDaum 12 Nov 2019 Since rev(-1): Tasks.Item14872 "pinging" an image is expensive, yet required to get its geometry. so we cache these efforts as possible. Main.MichaelDaum 12 Nov 2019 Since rev(5): Tasks.Item14872 "pinging" an image is expensive, yet required to get its geometry. so we cache these efforts as possible. Main.MichaelDaum 12 Nov 2019
Item14765 r 6 12 Nov 2019 - 11:47 -- ChristianKern %USERSWEB%.MichaelDaum 05 Oct 2018
+



+I'm so sorry, I forgot to answer! No, it didn't help.
+


+ %USERSWEB%.ChristianKern 12 Nov 2019
%COMMENT%
Since rev(4): Tasks.Item14765 If a topic contains an empty heading, e.g. or then in all subsequent sections, the "edit section" buttons (which become visible on mouseover) ... Since rev(5): %USERSWEB%.MichaelDaum 05 Oct 2018
+



+I'm so sorry, I forgot to answer! No, it didn't help.
+


+ %USERSWEB%.ChristianKern 12 Nov 2019
%COMMENT%
Item14871 r 1 12 Nov 2019 - 11:41 -- MichaelDaum Tasks.Item14871 also: add strikeone to harvest ui Main.MichaelDaum 12 Nov 2019 Since rev(-1): Tasks.Item14871 also: add strikeone to harvest ui Main.MichaelDaum 12 Nov 2019 Since rev(5): Tasks.Item14871 also: add strikeone to harvest ui Main.MichaelDaum 12 Nov 2019
Item14870 r 1 12 Nov 2019 - 11:36 -- MichaelDaum Tasks.Item14870 ... as otherwise nothing can float left or right of it Main.MichaelDaum 12 Nov 2019 Since rev(-1): Tasks.Item14870 ... as otherwise nothing can float left or right of it Main.MichaelDaum 12 Nov 2019 Since rev(5): Tasks.Item14870 ... as otherwise nothing can float left or right of it Main.MichaelDaum 12 Nov 2019
Item14869 r 1 12 Nov 2019 - 11:31 -- MichaelDaum Tasks.Item14869 Main.MichaelDaum 12 Nov 2019 Since rev(-1): Tasks.Item14869 Main.MichaelDaum 12 Nov 2019 Since rev(5): Tasks.Item14869 Main.MichaelDaum 12 Nov 2019
Item14868 r 1 12 Nov 2019 - 11:27 -- MichaelDaum Tasks.Item14868 ... to ease installation Main.MichaelDaum 12 Nov 2019 Since rev(-1): Tasks.Item14868 ... to ease installation Main.MichaelDaum 12 Nov 2019 Since rev(5): Tasks.Item14868 ... to ease installation Main.MichaelDaum 12 Nov 2019
Item14867 r 1 12 Nov 2019 - 11:22 -- MichaelDaum Tasks.Item14867 The script needs to null the return value of completePageHandler as the complete html page is appended to the pdf output otherwise. Main.Michae... Since rev(-1): Tasks.Item14867 The script needs to null the return value of completePageHandler as the complete html page is appended to the pdf output otherwise. Main.Michae... Since rev(5): Tasks.Item14867 The script needs to null the return value of completePageHandler as the complete html page is appended to the pdf output otherwise. Main.Michae...
Item14866 r 1 12 Nov 2019 - 11:05 -- MichaelDaum Tasks.Item14866 Main.MichaelDaum 12 Nov 2019 Since rev(-1): Tasks.Item14866 Main.MichaelDaum 12 Nov 2019 Since rev(5): Tasks.Item14866 Main.MichaelDaum 12 Nov 2019
Item14865 r 1 12 Nov 2019 - 11:01 -- MichaelDaum Tasks.Item14865 Files may be accessed with any dummy password. Also, several perlcrit issues when opening files. Main.MichaelDaum 12 Nov 2019 Since rev(-1): Tasks.Item14865 Files may be accessed with any dummy password. Also, several perlcrit issues when opening files. Main.MichaelDaum 12 Nov 2019 Since rev(5): Tasks.Item14865 Files may be accessed with any dummy password. Also, several perlcrit issues when opening files. Main.MichaelDaum 12 Nov 2019
Item14864 r 1 12 Nov 2019 - 10:46 -- MichaelDaum Tasks.Item14864 Main.MichaelDaum 12 Nov 2019 Since rev(-1): Tasks.Item14864 Main.MichaelDaum 12 Nov 2019 Since rev(5): Tasks.Item14864 Main.MichaelDaum 12 Nov 2019
Item14863 r 1 12 Nov 2019 - 09:28 -- MichaelDaum Tasks.Item14863 * log diff event * add exclude parameter Main.MichaelDaum 12 Nov 2019 Since rev(-1): Tasks.Item14863 * log diff event * add exclude parameter Main.MichaelDaum 12 Nov 2019 Since rev(5): Tasks.Item14863 * log diff event * add exclude parameter Main.MichaelDaum 12 Nov 2019
Item14862 r 1 12 Nov 2019 - 08:44 -- MichaelDaum Tasks.Item14862 Main.MichaelDaum 12 Nov 2019 Since rev(-1): Tasks.Item14862 Main.MichaelDaum 12 Nov 2019 Since rev(5): Tasks.Item14862 Main.MichaelDaum 12 Nov 2019
Item14861 r 1 12 Nov 2019 - 08:25 -- MichaelDaum Tasks.Item14861 Never noticed the cgi script was broken as we are using FastCGI nowadays most of the time. Also address perl critiques on the code. Main.Michae... Since rev(-1): Tasks.Item14861 Never noticed the cgi script was broken as we are using FastCGI nowadays most of the time. Also address perl critiques on the code. Main.Michae... Since rev(5): Tasks.Item14861 Never noticed the cgi script was broken as we are using FastCGI nowadays most of the time. Also address perl critiques on the code. Main.Michae...
Item14860 r 1 12 Nov 2019 - 08:17 -- MichaelDaum Tasks.Item14860 Main.MichaelDaum 12 Nov 2019 Since rev(-1): Tasks.Item14860 Main.MichaelDaum 12 Nov 2019 Since rev(5): Tasks.Item14860 Main.MichaelDaum 12 Nov 2019
Item14859 r 1 12 Nov 2019 - 08:11 -- MichaelDaum Tasks.Item14859 Main.MichaelDaum 12 Nov 2019 Since rev(-1): Tasks.Item14859 Main.MichaelDaum 12 Nov 2019 Since rev(5): Tasks.Item14859 Main.MichaelDaum 12 Nov 2019
WebStatistics r 581 12 Nov 2019 - 01:58 -- AdminUser }%
- Nov 2019 86503 4 0 7983 WebCreateNewTopic 1192 WebH...
+ Nov 2019 94546 4 0 8977 WebCreateNewTopic 1306 WebH...
Oct 2019 301593 33 0 28526 WebCreateNewTopic 4021 W...
Since rev(579): 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...
+ Nov 2019 94546 4 0 8977 WebCreateNewTopic 1306 WebH...
+ Oct 2019 301593 33 0 28526 WebCreateNewTopic 4021 W...
+ Sep 2019 328503 5 0 21616 WebCreateNewTopic 6727 We...
+ Aug 2019 218301 17 0 11217 WebCreateNewTopic 4731 W...
Item14858 r 1 08 Nov 2019 - 18:39 -- LynnwoodBrown Tasks.Item14858 produces something like HASH(0xd1a0718). The other formatting tags seem to work correctly. Main.LynnwoodBrown 08 Nov 2019 Since rev(-1): Tasks.Item14858 produces something like HASH(0xd1a0718). The other formatting tags seem to work correctly. Main.LynnwoodBrown 08 Nov 2019 Since rev(5): Tasks.Item14858 produces something like HASH(0xd1a0718). The other formatting tags seem to work correctly. Main.LynnwoodBrown 08 Nov 2019
Item11314 r 4 01 Nov 2019 - 14:50 -- MichaelDaum %META:FORM{name="ItemTemplate"}%
-%META:FIELD{name="Summary" attributes="M" title="Summary" value="Temp...
+%META:FIELD{name="Summary" title="Summary" value="Template comment ta...
-%META:FIELD{name="ReportedBy" attributes="M" title="ReportedBy" value...
+%META:FIELD{name="ReportedBy" title="ReportedBy" value="Main.SvenDowi...
-%META:FIELD{name="Codebase" attributes="" title=" Codebase " value=...
Since rev(2): Tasks.Item11314 %{ user topic has a formfield of the form '' I wonder if the widgets should be in their own web? STARTSECTION{"widget title"}Dashboard Contrib He... Since rev(5): Tasks.Item11314 %{ user topic has a formfield of the form '' I wonder if the widgets should be in their own web? STARTSECTION{"widget title"}Dashboard Contrib He...

Rev test

579

-- 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 12 Nov 2019 - 16:27.

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