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 21 Jan 2020 - 03:05 -- UnknownUser * AnnBrady: Item1976
+ * AnnaSchmidt: Item14893
* AntelmoAguilar: Item13901
* BeS: Item10883
- * BeatDoebeli: Item11190 Item12672
+ * BeatDoebeli: Item11190 Item12672 Item14831
Since rev(173): * AnnBrady: Item1976
+ * AnnaSchmidt: Item14893
* AntelmoAguilar: Item13901
* BeS: Item10883
- * BeatDoebeli: Item11190 Item12672
+ * BeatDoebeli: Item11190 Item12672 Item14831
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 650 21 Jan 2020 - 01:59 -- AdminUser }%
- Jan 2020 250316 10 0 29051 WebCreateNewTopic 1856 W...
+ Jan 2020 257221 14 0 29081 WebCreateNewTopic 1964 W...
Dec 2019 208100 21 1 9197 WebCreateNewTopic 2955 We...
Since rev(648): 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...
+ Jan 2020 257221 14 0 29081 WebCreateNewTopic 1964 W...
+ Dec 2019 208100 21 1 9197 WebCreateNewTopic 2955 We...
+ Nov 2019 315954 104 4 24983 WebCreateNewTopic 3475 ...
+ Oct 2019 301593 33 0 28526 WebCreateNewTopic 4021 W...
Item14884 r 2 20 Jan 2020 - 18:21 -- MichaelDaum Main.MichaelDaum 19 Nov 2019
+




+Latest change introduced a unit test error when running in tainted mo...
+ %USERSWEB%.MichaelDaum 20 Jan 2020
%COMMENT%
%META:FIELD{name="Priority" title=" Priority " value="Urgent"}%
-%META:FIELD{name="CurrentState" title="CurrentState" value="Waiting f...
Since rev(0): Tasks.Item14884 To get the list of available webs all stores have a severe performance problem: they iterate over all topics in all webs to find those subdirecto... Since rev(5): Tasks.Item14884 To get the list of available webs all stores have a severe performance problem: they iterate over all topics in all webs to find those subdirecto...
Item14689 r 10 20 Jan 2020 - 18:00 -- MichaelDaum %META:FIELD{name="WaitingFor" title="WaitingFor" value="MichaelDaum"}
-%META:FIELD{name="Checkins" title="Checkins" value=""}%
+%META:FIELD{name="Checkins" value="%25GITREF%7bdistro:ac45f860ba78%7d...
%META:FIELD{name="TargetRelease" title="TargetRelease" value="patch"}...
%META:FIELD{name="ReleasedIn" title="ReleasedIn" value="2.1.7"}%
-%META:FIELD{name="CheckinsOnBranches" title="CheckinsOnBranches" valu...
Since rev(8): Tasks.Item14689 See https://github.com/foswiki/distro/pull/20 This is a big issue for us. Some distributions (Debian, FreeBSD) are dropping CPAN:Email::Address i... Since rev(5): %USERSWEB%.VadimBelman 09 May 2018
+



+The CVE (https://cve.mitre.org/cgi bin/cvename.cgi?name=CVE 2015 7686...
+


+The issue, or what has changed, is that the Email::Address Perl modul...
+

Item14629 r 8 20 Jan 2020 - 17:23 -- MichaelDaum -Tasks.Item14629
+Tasks.Item14629
+The TopicUserMappingContrib attempts to load the UserRegistration pag...
+


+The exposure is that the Users web is typically not write protected f...
+

Since rev(6): Tasks.Item14629 The TopicUserMappingContrib attempts to load the UserRegistration page from the Users web (typically Main web), and if that fails, it loads the S... Since rev(5): -Tasks.Item14629
+Tasks.Item14629
+The TopicUserMappingContrib attempts to load the UserRegistration pag...
+


+The exposure is that the Users web is typically not write protected f...
+

Item14639 r 6 20 Jan 2020 - 17:23 -- MichaelDaum -Tasks.Item14639
+Tasks.Item14639
+On sites with open registration, newly registered users are free to d...
+



+$ grep L ALLOWTOPICCHANGE *
+AdminUserLeftBar.txt
Since rev(4): Tasks.Item14639 On sites with open registration, newly registered users are free to deface any of these topics. It is probably a reasonable change to add an A... Since rev(5): -Tasks.Item14639
+Tasks.Item14639
+On sites with open registration, newly registered users are free to d...
+



+$ grep L ALLOWTOPICCHANGE *
+AdminUserLeftBar.txt
Item14893 r 2 14 Jan 2020 - 08:33 -- MichaelDaum Tasks.Item14893
+%MARKEDFORDELETION%
+


TEst
Since rev(0): Tasks.Item14893 TEst Since rev(5): Tasks.Item14893 TEst
Item14891 r 11 10 Jan 2020 - 17:35 -- MichaelDaum %USERSWEB%.OliverKrueger 10 Jan 2020
+




+@Oliver, this is indeed unrelated to the initial report. Could you co...
+ %USERSWEB%.MichaelDaum 10 Jan 2020
%COMMENT%
Since rev(9): Tasks.Item14891 The latest ImagePlugin adds dependencies that knocked my site down. And they are not available in Ubuntu's repository, so they had to be built ... Since rev(5): %USERSWEB%.MichaelDaum 02 Dec 2019
+



+Lack of support on many older perl modules is the issue. Net::SAML2 ...
+


+ %USERSWEB%.TimothyLegge 02 Dec 2019
+


Item14892 r 2 05 Dec 2019 - 16:02 -- MichaelDaum %META:FIELD{name="AppliesTo" title="AppliesTo" value="Extension"}%
-%META:FIELD{name="Component" title="Component" value=""}%
+%META:FIELD{name="Component" title="Component" value="WorkflowPlugin"...
%META:FIELD{name="Priority" title=" Priority " value="Normal"}%
%META:FIELD{name="Release01x01Checkins" title="Release01x01Checkins"
-%META:WORKFLOW{name="ENTFERNT" LASTTIME_ENTFERNT="23 May 2019 15:14...
Since rev(0): Tasks.Item14892 The plugin seems to return wrong dates: Topic Content: * Set WORKFLOW = FmeSchnittstelleWorkflow Status geändert von am WORKFLOWHISTOR... Since rev(5): Tasks.Item14892 The plugin seems to return wrong dates: Topic Content: * Set WORKFLOW = FmeSchnittstelleWorkflow Status geändert von am WORKFLOWHISTOR...
Item14890 r 1 29 Nov 2019 - 07:54 -- MichaelDaum Tasks.Item14890 ... reported by Cieska. IMAGE{"Screenshot 20191129 072107.jpg" size="200"} Hot fix: diff git a/PatternSkin/pub/System/PatternSkinTheme/style_src... Since rev(-1): Tasks.Item14890 ... reported by Cieska. IMAGE{"Screenshot 20191129 072107.jpg" size="200"} Hot fix: diff git a/PatternSkin/pub/System/PatternSkinTheme/style_src... Since rev(5): Tasks.Item14890 ... reported by Cieska. IMAGE{"Screenshot 20191129 072107.jpg" size="200"} Hot fix: diff git a/PatternSkin/pub/System/PatternSkinTheme/style_src...
Item14889 r 1 27 Nov 2019 - 16:29 -- MichaelDaum Tasks.Item14889 diff.js needs jquery as a dependency adding the assets to the page. Main.MichaelDaum 27 Nov 2019 Since rev(-1): Tasks.Item14889 diff.js needs jquery as a dependency adding the assets to the page. Main.MichaelDaum 27 Nov 2019 Since rev(5): Tasks.Item14889 diff.js needs jquery as a dependency adding the assets to the page. Main.MichaelDaum 27 Nov 2019
Item14888 r 1 27 Nov 2019 - 09:47 -- MichaelDaum Tasks.Item14888 The use of jquery.loader was a tad too convoluted. Attached a new version of WebHome.txt. Main.MichaelDaum 27 Nov 2019 Since rev(-1): Tasks.Item14888 The use of jquery.loader was a tad too convoluted. Attached a new version of WebHome.txt. Main.MichaelDaum 27 Nov 2019 Since rev(5): Tasks.Item14888 The use of jquery.loader was a tad too convoluted. Attached a new version of WebHome.txt. Main.MichaelDaum 27 Nov 2019
Item14887 r 1 26 Nov 2019 - 09:14 -- MichaelDaum Tasks.Item14887 also: * add "delete all", "mark all", "approve all" feature moderating comments in bunches * improve SolrPlugin integration Main.MichaelD... Since rev(-1): Tasks.Item14887 also: * add "delete all", "mark all", "approve all" feature moderating comments in bunches * improve SolrPlugin integration Main.MichaelD... Since rev(5): Tasks.Item14887 also: * add "delete all", "mark all", "approve all" feature moderating comments in bunches * improve SolrPlugin integration Main.MichaelD...
Item14886 r 1 19 Nov 2019 - 13:08 -- MichaelDaum Tasks.Item14886 Main.MichaelDaum 19 Nov 2019 Since rev(-1): Tasks.Item14886 Main.MichaelDaum 19 Nov 2019 Since rev(5): Tasks.Item14886 Main.MichaelDaum 19 Nov 2019
LimitedSessionsPlugin r 1 19 Nov 2019 - 13:04 -- MichaelDaum Tasks.LimitedSessionsPlugin INCLUDE{"Component"} Since rev(-1): Tasks.LimitedSessionsPlugin INCLUDE{"Component"} Since rev(5): Tasks.LimitedSessionsPlugin INCLUDE{"Component"}
Item14885 r 1 19 Nov 2019 - 13:04 -- MichaelDaum Tasks.Item14885 Main.MichaelDaum 19 Nov 2019 Since rev(-1): Tasks.Item14885 Main.MichaelDaum 19 Nov 2019 Since rev(5): Tasks.Item14885 Main.MichaelDaum 19 Nov 2019
PixabayPlugin r 1 19 Nov 2019 - 12:37 -- MichaelDaum Tasks.PixabayPlugin INCLUDE{"Component"} Since rev(-1): Tasks.PixabayPlugin INCLUDE{"Component"} Since rev(5): Tasks.PixabayPlugin INCLUDE{"Component"}
Item14873 r 3 18 Nov 2019 - 14:28 -- MichaelDaum %META:FIELD{name="Priority" title=" Priority " value="Normal"}%
-%META:FIELD{name="CurrentState" title="CurrentState" value="Waiting f...
+%META:FIELD{name="CurrentState" title="CurrentState" value="Being Wor...
%META:FIELD{name="WaitingFor" title="WaitingFor" value=""}%
-%META:FIELD{name="Checkins" title="Checkins" value="%25GITREF%7bdistr...
+%META:FIELD{name="Checkins" value="%25GITREF%7bdistro:01ff952e24cc%7d...
Since rev(1): Tasks.Item14873 ... to be less error prone Uploaded to Extensions.Testing.UpdatesPlugin Main.MichaelDaum 12 Nov 2019 Installed on foswiki.org and blog.fo... Since rev(5): Tasks.Item14873 ... to be less error prone Uploaded to Extensions.Testing.UpdatesPlugin Main.MichaelDaum 12 Nov 2019 Installed on foswiki.org and blog.fo...
Item14883 r 1 18 Nov 2019 - 13:59 -- MichaelDaum Tasks.Item14883 Main.MichaelDaum 18 Nov 2019 Since rev(-1): Tasks.Item14883 Main.MichaelDaum 18 Nov 2019 Since rev(5): Tasks.Item14883 Main.MichaelDaum 18 Nov 2019
Item14882 r 1 18 Nov 2019 - 13:53 -- MichaelDaum Tasks.Item14882 ... which finally removes support for things like flash and sliverlight Main.MichaelDaum 18 Nov 2019 Since rev(-1): Tasks.Item14882 ... which finally removes support for things like flash and sliverlight Main.MichaelDaum 18 Nov 2019 Since rev(5): Tasks.Item14882 ... which finally removes support for things like flash and sliverlight Main.MichaelDaum 18 Nov 2019

Rev test

648

-- 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 21 Jan 2020 - 05:44.

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