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 30 May 2020 - 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 777 30 May 2020 - 00:59 -- AdminUser }%
- May 2020 326712 67 4 35734 WebCreateNewTopic 955 We...
+ May 2020 334141 69 4 36463 WebCreateNewTopic 986 We...
Apr 2020 252135 17 2 13523 WebCreateNewTopic 924 We...
Since rev(775): 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 2020 334141 69 4 36463 WebCreateNewTopic 986 We...
+ Apr 2020 252135 17 2 13523 WebCreateNewTopic 924 We...
+ Mar 2020 231917 8 0 14755 WebCreateNewTopic 950 Web...
+ Feb 2020 203346 19 0 9593 WebCreateNewTopic 973 Web...
Item14909 r 5 29 May 2020 - 10:09 -- TimothyLegge %META:FIELD{name="Priority" title=" Priority " value="Normal"}%
-%META:FIELD{name="CurrentState" title="CurrentState" value="New"}%
+%META:FIELD{name="CurrentState" title="CurrentState" value="No Action...
%META:FIELD{name="WaitingFor" title="WaitingFor" value=""}%
Since rev(3): Tasks.Item14909 Another one FormattingTests::test_ampersand_querystring * Failed to use FoswikiPmFunctionsTests: couldn't find diagnostic data in /usr/sh... Since rev(5):
Item14912 r 2 28 May 2020 - 22:53 -- TimothyLegge QueryTests::verify_constants_BruteForceQuery
+likely a duplicate of Item14906
+


+ %USERSWEB%.TimothyLegge 28 May 2020
%COMMENT%
Since rev(0): Tasks.Item14912 Main.TimothyLegge 28 May 2020 QueryTests::verify_versions_on_other_topic_fail_BruteForceQuery * Item10121: OP_ref does'nt play nice ... Since rev(5): Tasks.Item14912 Main.TimothyLegge 28 May 2020 QueryTests::verify_versions_on_other_topic_fail_BruteForceQuery * Item10121: OP_ref does'nt play nice ...
Item14902 r 2 28 May 2020 - 22:45 -- TimothyLegge %META:FIELD{name="ReportedBy" title="ReportedBy" value="Main.TimValen
-%META:FIELD{name="Codebase" title=" Codebase " value=""}%
+%META:FIELD{name="Codebase" title=" Codebase " value="2.1.6"}%
%META:FIELD{name="SVNRange" title="SVN Range" value=""}%
-%META:FIELD{name="AppliesTo" title="AppliesTo" value="Web Site"}%
+%META:FIELD{name="AppliesTo" title="AppliesTo" value="Engine"}%
Since rev(0): Tasks.Item14902 Main.TimValenzuela 25 Apr 2020 On https://foswiki.org/System.SystemRequirements#Server_Requirements Under Ubuntu, for 20.04, there is an addi... Since rev(5): Tasks.Item14902 Main.TimValenzuela 25 Apr 2020 On https://foswiki.org/System.SystemRequirements#Server_Requirements Under Ubuntu, for 20.04, there is an addi...
Item14917 r 1 28 May 2020 - 21:43 -- TimothyLegge Tasks.Item14917 Main.TimothyLegge 28 May 2020 UnitTestContribTests::test_FOSWIKI_ASSERTS * Assertion failed! at /home/tim/foswiki/core/lib/AssertOn... Since rev(-1): Tasks.Item14917 Main.TimothyLegge 28 May 2020 UnitTestContribTests::test_FOSWIKI_ASSERTS * Assertion failed! at /home/tim/foswiki/core/lib/AssertOn... Since rev(5): Tasks.Item14917 Main.TimothyLegge 28 May 2020 UnitTestContribTests::test_FOSWIKI_ASSERTS * Assertion failed! at /home/tim/foswiki/core/lib/AssertOn...
Item14916 r 1 28 May 2020 - 21:41 -- TimothyLegge Tasks.Item14916 Main.TimothyLegge 28 May 2020 RCSHandlerTests::verify_RevInfo_RcsLite * Expected:'0' But got:'3155760000' at /home/tim/foswiki/co... Since rev(-1): Tasks.Item14916 Main.TimothyLegge 28 May 2020 RCSHandlerTests::verify_RevInfo_RcsLite * Expected:'0' But got:'3155760000' at /home/tim/foswiki/co... Since rev(5): Tasks.Item14916 Main.TimothyLegge 28 May 2020 RCSHandlerTests::verify_RevInfo_RcsLite * Expected:'0' But got:'3155760000' at /home/tim/foswiki/co...
Item14915 r 1 28 May 2020 - 21:40 -- TimothyLegge Tasks.Item14915 Main.TimothyLegge 28 May 2020 RCSHandlerTests::verify_RevAtTime_RcsLite * Expected:'1' But got null at /home/tim/foswiki/core/lib/Unit/Te... Since rev(-1): Tasks.Item14915 Main.TimothyLegge 28 May 2020 RCSHandlerTests::verify_RevAtTime_RcsLite * Expected:'1' But got null at /home/tim/foswiki/core/lib/Unit/Te... Since rev(5): Tasks.Item14915 Main.TimothyLegge 28 May 2020 RCSHandlerTests::verify_RevAtTime_RcsLite * Expected:'1' But got null at /home/tim/foswiki/core/lib/Unit/Te...
Item14914 r 1 28 May 2020 - 21:38 -- TimothyLegge Tasks.Item14914 Main.TimothyLegge 28 May 2020 RCSHandlerTests::verify_OutOfDate_RevInfo_RcsLite * Expected:'0' But got:'3155760000' at /home/tim/... Since rev(-1): Tasks.Item14914 Main.TimothyLegge 28 May 2020 RCSHandlerTests::verify_OutOfDate_RevInfo_RcsLite * Expected:'0' But got:'3155760000' at /home/tim/... Since rev(5): Tasks.Item14914 Main.TimothyLegge 28 May 2020 RCSHandlerTests::verify_OutOfDate_RevInfo_RcsLite * Expected:'0' But got:'3155760000' at /home/tim/...
Item14913 r 1 28 May 2020 - 21:35 -- TimothyLegge Tasks.Item14913 Main.TimothyLegge 28 May 2020 RequestTests::test_forwarded_for * Wrong BASE url with Forwarded Host single header forceDefaultUrlH... Since rev(-1): Tasks.Item14913 Main.TimothyLegge 28 May 2020 RequestTests::test_forwarded_for * Wrong BASE url with Forwarded Host single header forceDefaultUrlH... Since rev(5): Tasks.Item14913 Main.TimothyLegge 28 May 2020 RequestTests::test_forwarded_for * Wrong BASE url with Forwarded Host single header forceDefaultUrlH...
Item11555 r 6 28 May 2020 - 21:34 -- TimothyLegge %USERSWEB%.GeorgeClark 19 Jun 2014
+



+Still an issue
+


+ %USERSWEB%.TimothyLegge 28 May 2020
%COMMENT%
Since rev(4): Tasks.Item11555 This was picked up from http://develop.twiki.org/~twiki4/cgi bin/view/Bugs/Item6842 and confirmed that it fails here as well. Added unit test, m... Since rev(5): %USERSWEB%.GeorgeClark 19 Jun 2014
+



+Still an issue
+


+ %USERSWEB%.TimothyLegge 28 May 2020
%COMMENT%
Item14911 r 1 28 May 2020 - 21:28 -- TimothyLegge Tasks.Item14911 Main.TimothyLegge 28 May 2020 MetaTests::test_undef_attach * Assertion (not a valid attachment name) failed! at /home/tim/foswiki/c... Since rev(-1): Tasks.Item14911 Main.TimothyLegge 28 May 2020 MetaTests::test_undef_attach * Assertion (not a valid attachment name) failed! at /home/tim/foswiki/c... Since rev(5): Tasks.Item14911 Main.TimothyLegge 28 May 2020 MetaTests::test_undef_attach * Assertion (not a valid attachment name) failed! at /home/tim/foswiki/c...
Item14910 r 2 28 May 2020 - 15:33 -- MichaelDaum Main.TimothyLegge 28 May 2020
+The tainted string is created within File::Copy::Recursive, line 375
+



+my $starting_point = Cwd::cwd();
+



+This string is tainted. And we can't do anything about it. My advice ...
Since rev(0): Tasks.Item14910 Another test error FuncTests::test_moveTopic * Insecure dependency in chdir while running with T switch at /usr/share/perl5/vendor_perl/... Since rev(5): Tasks.Item14910 Another test error FuncTests::test_moveTopic * Insecure dependency in chdir while running with T switch at /usr/share/perl5/vendor_perl/...
Item14908 r 1 28 May 2020 - 13:19 -- MichaelDaum Tasks.Item14908 Main.MichaelDaum 28 May 2020 Might need to reopen in case unit tests have to be addressed. But for now ... meh... .MichaelDaum 28 May 202... Since rev(-1): Tasks.Item14908 Main.MichaelDaum 28 May 2020 Might need to reopen in case unit tests have to be addressed. But for now ... meh... .MichaelDaum 28 May 202... Since rev(5): Tasks.Item14908 Main.MichaelDaum 28 May 2020 Might need to reopen in case unit tests have to be addressed. But for now ... meh... .MichaelDaum 28 May 202...
Item14907 r 2 28 May 2020 - 06:53 -- MichaelDaum Tasks.Item14907
- Main.TimothyLegge 28 May 2020
-


Running the tests on AlpineLinux Perl 5.30.2
AddressTests::test_meta4
+ Main.TimothyLegge 28 May 2020
Since rev(0): Tasks.Item14907 Running the tests on AlpineLinux Perl 5.30.2 AddressTests::test_meta_myform * Parsed 'TemporaryAddressTestsTestWeb.Topic'/META:FIELD na... Since rev(5): Tasks.Item14907 Running the tests on AlpineLinux Perl 5.30.2 AddressTests::test_meta_myform * Parsed 'TemporaryAddressTestsTestWeb.Topic'/META:FIELD na...
Item14906 r 1 25 May 2020 - 16:23 -- MichaelDaum Tasks.Item14906 Adjust the code to function as documented. A query expression such as has to read data relative to the topic being queried ... and not relative ... Since rev(-1): Tasks.Item14906 Adjust the code to function as documented. A query expression such as has to read data relative to the topic being queried ... and not relative ... Since rev(5): Tasks.Item14906 Adjust the code to function as documented. A query expression such as has to read data relative to the topic being queried ... and not relative ...
Item14904 r 2 25 May 2020 - 16:06 -- MichaelDaum %META:FIELD{name="SVNRange" title="SVN Range" value=""}%
-%META:FIELD{name="AppliesTo" title="AppliesTo" value="Engine"}%
+%META:FIELD{name="AppliesTo" title="AppliesTo" value="Extension"}%
-%META:FIELD{name="Component" title="Component" value=""}%
+%META:FIELD{name="Component" title="Component" value="UnitTestContrib...
%META:FIELD{name="Priority" title=" Priority " value="Urgent"}%
Since rev(0): Tasks.Item14904 Unit tests won't run on perl 5.30. The current code tries to work around perl 5.10. Removing the problematic lines as 5.10 is not supported anywa... Since rev(5): Tasks.Item14904 Unit tests won't run on perl 5.30. The current code tries to work around perl 5.10. Removing the problematic lines as 5.10 is not supported anywa...
Item14884 r 3 25 May 2020 - 15:28 -- MichaelDaum %META:FIELD{name="Priority" title=" Priority " value="Urgent"}%
-%META:FIELD{name="CurrentState" title="CurrentState" value="Being Wor...
+%META:FIELD{name="CurrentState" title="CurrentState" value="Waiting f...
%META:FIELD{name="WaitingFor" title="WaitingFor" value=""}%
-%META:FIELD{name="Checkins" title="Checkins" value="%25GITREF%7bdistr...
+%META:FIELD{name="Checkins" title="Checkins" value="%25GITREF%7bdistr...
Since rev(1): 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...
Item13134 r 11 25 May 2020 - 15:25 -- MichaelDaum %META:FIELD{name="Priority" title=" Priority " value="Urgent"}%
-%META:FIELD{name="CurrentState" title="CurrentState" value="Confirmed...
+%META:FIELD{name="CurrentState" title="CurrentState" value="Closed"}%
%META:FIELD{name="WaitingFor" title="WaitingFor" value=""}%
-%META:FIELD{name="Checkins" title="Checkins" value="%25GITREF%7bdistr...
+%META:FIELD{name="Checkins" title="Checkins" value="%25GITREF%7bdistr...
Since rev(9): Tasks.Item13134 HTMLValtidation tests currently fail mostly due to HTML::Tidy's incapability to deal with HTML5. Example: ... produces line 5 column 19 Warnin... Since rev(5): %USERSWEB%.MichaelDaum 13 Dec 2014
+



+Task::HTML5 could be an option
+


+ %USERSWEB%.MichaelDaum 26 Feb 2016
+

Item14527 r 2 15 May 2020 - 02:22 -- BramVanOosterhout Main.BramVanOosterhout 09 Nov 2017
+




+It's been a while, but I have finally worked out that the observed be...
+To modify the behavior, I propose to add a switch: replace to the par...
+


+Questions
Since rev(0): Tasks.Item14527 TopicStubAgent Line 85 establishes a topic object. When the topic exixsts, it will have $text. This should be cleared because the topic is replac... Since rev(5): Tasks.Item14527 TopicStubAgent Line 85 establishes a topic object. When the topic exixsts, it will have $text. This should be cleared because the topic is replac...

Rev test

775

-- 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 30 May 2020 - 21:00.

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