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 177 30 Nov 2024 - 23:05 -- UnknownUser * BobKrzaczek: Item614
- * BramVanOosterhout: Item1087 Item1099 Item12553 Item12554 It...
+ * BramVanOosterhout: Item1087 Item1099 Item12553 Item12554 It...
* BrendanB: Item8533
* ChipsInChief: Item13873
+ * ChrUllrich: Item15167
Since rev(10): * BobKrzaczek: Item614
- * BramVanOosterhout: Item1087 Item1099 Item12553 Item12554 It...
+ * BramVanOosterhout: Item1087 Item1099 Item12553 Item12554 It...
* BrendanB: Item8533
* ChipsInChief: Item13873
+ * ChrUllrich: Item15167
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 2398 30 Nov 2024 - 01:58 -- AdminUser }%
- Nov 2024 264767 107 0 6257 AllOutStandingItems 5910 ...
+ Nov 2024 282425 107 0 6877 WebCreateNewTopic 6327 A...
Oct 2024 412360 86 0 15834 WebCreateNewTopic 11460 ...
Since rev(10): 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 2024 282425 107 0 6877 WebCreateNewTopic 6327 A...
+ Oct 2024 412360 86 0 15834 WebCreateNewTopic 11460 ...
+ Sep 2024 340981 123 1 12019 AllOutStandingItems 2944 ...
+ Aug 2024 405671 4 1 13091 AllOutStandingItems 3149 ...
Item15356 r 1 25 Nov 2024 - 17:20 -- MichaelDaum Tasks.Item15356 These topics are pretty outdated and unused and will not be shipped by default anymore * Main.UserList * Main.UserListByDateJoined * Mai... Since rev(-1): Tasks.Item15356 These topics are pretty outdated and unused and will not be shipped by default anymore * Main.UserList * Main.UserListByDateJoined * Mai... Since rev(5): Tasks.Item15356 These topics are pretty outdated and unused and will not be shipped by default anymore * Main.UserList * Main.UserListByDateJoined * Mai...
Item13883 r 244 25 Nov 2024 - 17:10 -- MichaelDaum %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="trunkCheckins" title="trunkCheckins" value=""}%
-%META:FIELD{name="masterCheckins" value="%25GITREF%7bdistro:c994933c2...
Since rev(10): Tasks.Item13883 Since rev(5): Tasks.Item13883
- Main.GeorgeClark 03 Dec 2015
-


%COMMENT%
%META:FIELD{name="WaitingFor" title="WaitingFor" value=""}%
-%META:FIELD{name="Checkins" value="%25GITREF%7bdistro:a628fb3a133f%7d...
Item15355 r 1 25 Nov 2024 - 17:07 -- MichaelDaum Tasks.Item15355 This will render a label pointing to an input element rather than a link. Main.MichaelDaum 25 Nov 2024 Since rev(-1): Tasks.Item15355 This will render a label pointing to an input element rather than a link. Main.MichaelDaum 25 Nov 2024 Since rev(5): Tasks.Item15355 This will render a label pointing to an input element rather than a link. Main.MichaelDaum 25 Nov 2024
Item15354 r 1 15 Nov 2024 - 09:09 -- MichaelDaum Tasks.Item15354 It had a repo if its own already anyway. Main.MichaelDaum 15 Nov 2024 Since rev(-1): Tasks.Item15354 It had a repo if its own already anyway. Main.MichaelDaum 15 Nov 2024 Since rev(5): Tasks.Item15354 It had a repo if its own already anyway. Main.MichaelDaum 15 Nov 2024
Item12511 r 38 15 Nov 2024 - 08:42 -- MichaelDaum %META:FIELD{name="Priority" title=" Priority " value="Normal"}%
-%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="MichaelDaum"}...
-%META:FIELD{name="Checkins" title="Checkins" value="Foswikirev:16749 ...
+%META:FIELD{name="Checkins" title="Checkins" value="Foswikirev:16749 ...
Since rev(10): Tasks.Item12511 This is a tough one. There are lots of wiki apps out there depending on plugin params being embedded into the class attribute. As per xhml there'... Since rev(5): %USERSWEB%.MichaelDaum 29 May 2014
+



+Push to 2.1
+


+ %USERSWEB%.GeorgeClark 06 Jul 2015
+


WebAdmin r 4 08 Nov 2024 - 09:15 -- MichaelDaum Tasks.WebAdmin
- Tasks Configuration
+ WebAdmin
- * WebPreferences
-

Bug Item Topic creation Templates
Since rev(2): Tasks.WebAdmin WebAdmin Bug Item Topic creation Templates * ItemTemplate * WebTopicEditTemplate Bug Field definitions * Summary * ReportedBy ... Since rev(5): Tasks.WebAdmin WebAdmin Bug Item Topic creation Templates * ItemTemplate * WebTopicEditTemplate Bug Field definitions * Summary * ReportedBy ...
WebHome r 65 08 Nov 2024 - 09:14 -- MichaelDaum * Foswiki GitHub Repository
- * Foswiki/Trunk Test System
-

* Developers Bible
* Statistics
-
Since rev(10): Tasks.WebHome Task Tracker TWISTYBUTTON{id="newtask" link=" %TWISTYTOGGLE{ id="newtask" mode="div" }% INCLUDE{"CreateNewTask"} Search %IF{"'' = 'Wik... Since rev(5): Tasks.WebHome
- Report new issue
+ Task Tracker TWISTYBUTTON{id="newtask" link="%BUTTON{"Create a new ...
+
+%TWISTYTOGGLE{
+ id="newtask"
Item15231 r 3 08 Nov 2024 - 09:12 -- MichaelDaum %META:FIELD{name="Priority" title=" Priority " value="Normal"}%
-%META:FIELD{name="CurrentState" title="CurrentState" value="New"}%
+%META:FIELD{name="CurrentState" title="CurrentState" value="Being Wor...
-%META:FIELD{name="WaitingFor" title="WaitingFor" value=""}%
+%META:FIELD{name="WaitingFor" title="WaitingFor" value="MichaelDaum"}...
-%META:FIELD{name="Checkins" value="%25GITREF%7bdistro:6c93667441ca%7d...
Since rev(1): Tasks.Item15231 What a mess. Main.MichaelDaum 27 Nov 2023 Since rev(5): Tasks.Item15231 What a mess. Main.MichaelDaum 27 Nov 2023
Item2392 r 4 08 Nov 2024 - 09:09 -- MichaelDaum %USERSWEB%.MichaelDaum 12 Dec 2017
+



+wkhtml is discontinued upstream.
+


+ %USERSWEB%.MichaelDaum 08 Nov 2024
%COMMENT%
Since rev(2): Tasks.Item2392 I'm having problems generating a correct PDF (Foswiki on windows) wkhtml2pdf 0.8.3.exe works perfectly (I'm able to convert a existing html file... Since rev(5): Tasks.Item2392 I'm having problems generating a correct PDF (Foswiki on windows) wkhtml2pdf 0.8.3.exe works perfectly (I'm able to convert a existing html file...
Item9987 r 2 08 Nov 2024 - 09:09 -- MichaelDaum Main.SaschaVetter 10 Nov 2010
+




+Webkithtml is discontinued upstream, the related plugin as well.
+ %USERSWEB%.MichaelDaum 08 Nov 2024
%COMMENT%
%META:FORM{name="Tasks.ItemTemplate"}%
-%META:FIELD{name="Summary" attributes="M" title="Summary" value="Unkn...
Since rev(0): Tasks.Item9987 Call a topic by using "?contenttype=application/pdf" creates the warning "unknown parameter name META{"form"} at /.../lib/Foswiki/Sandbox.pm line ... Since rev(5): Tasks.Item9987 Call a topic by using "?contenttype=application/pdf" creates the warning "unknown parameter name META{"form"} at /.../lib/Foswiki/Sandbox.pm line ...
Item10631 r 2 08 Nov 2024 - 09:06 -- MichaelDaum Main.StefanosKouzof 12 Apr 2011
+




+No activity on this old plugin.
+ %USERSWEB%.MichaelDaum 08 Nov 2024
%COMMENT%
%META:FORM{name="ItemTemplate"}%
-%META:FIELD{name="Summary" attributes="M" title="Summary" value="RTFC...
Since rev(0): Tasks.Item10631 The RTFContrib plugin when given wiki pages that contain non english letters, just copies them to the created rtf document, but the document can... Since rev(5): Tasks.Item10631 The RTFContrib plugin when given wiki pages that contain non english letters, just copies them to the created rtf document, but the document can...
Item13722 r 4 08 Nov 2024 - 08:57 -- MichaelDaum %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...
%META:FIELD{name="TargetRelease" title="TargetRelease" value="patch"}...
%META:FIELD{name="trunkCheckins" title="trunkCheckins" value=""}%
-%META:FIELD{name="masterCheckins" title="masterCheckins" value="%25GI...
Since rev(2): Tasks.Item13722 Remove old versions of JQuery that are not really usable. Need to keep a few back versions, maybe major version released with Foswiki 1.1.9? C... Since rev(5): Tasks.Item13722 Remove old versions of JQuery that are not really usable. Need to keep a few back versions, maybe major version released with Foswiki 1.1.9? C...
Item610 r 32 05 Nov 2024 - 12:09 -- MichaelDaum Main.GeorgeClark 02 Jan 2015
+




+Best option is to use XSendFileContrib for fast access to acl protect...
+ %USERSWEB%.MichaelDaum 05 Nov 2024
+%COMMENT%
+

Since rev(10): Tasks.Item610 The default pub htaccess.txt file makes the pub directory public. Where TWiki is being used as a firm's knowledge base this is quite inappropriate:... Since rev(5): Tasks.Item610
+The default pub htaccess.txt file makes the pub directory public. Whe...
+


+I'd venture that use of viewfile should be default in Dakar.
+


+In Edinburgh it could be controlled by configure.
Item2114 r 6 05 Nov 2024 - 12:07 -- MichaelDaum %META:FIELD{name="Priority" title=" Priority " value="Enhancement"}
-%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="ItemBranchCheckins" title="ItemBranchCheckins" valu
+%META:FIELD{name="Release02x01Checkins" title="Release02x01Checkins" ...
Since rev(4): Tasks.Item2114 I find missing: * Link to Quiet Save * Link to Checkpoint * Link to signature This could be a block of "Editing help" where the access ke... Since rev(5): %META:FIELD{name="Priority" title=" Priority " value="Enhancement"}
-%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="ItemBranchCheckins" title="ItemBranchCheckins" valu
+%META:FIELD{name="Release02x01Checkins" title="Release02x01Checkins" ...
Item2400 r 6 05 Nov 2024 - 12:06 -- MichaelDaum Main.GeorgeClark 04 Jan 2015 20:58
+




+Standard for a long time. Not sure since when.
+ %USERSWEB%.MichaelDaum 05 Nov 2024
+%COMMENT%
+

Since rev(4): Tasks.Item2400 For my TWiki:Codev/TWikiAjaxFrameworkShowcase it would be really nice (essential actually) to pass a section as url parameter. For instance: http:... Since rev(5): Main.GeorgeClark 04 Jan 2015 20:58
+




+Standard for a long time. Not sure since when.
+ %USERSWEB%.MichaelDaum 05 Nov 2024
+%COMMENT%
+

Item12164 r 4 05 Nov 2024 - 12:04 -- MichaelDaum %META:FORM{name="Tasks.ItemTemplate"}%
-%META:FIELD{name="Summary" attributes="M" title="Summary" value="remo...
+%META:FIELD{name="Summary" title="Summary" value="remove $Rev$ from s...
-%META:FIELD{name="ReportedBy" attributes="M" title="ReportedBy" value...
+%META:FIELD{name="ReportedBy" title="ReportedBy" value="Main.MichaelD...
-%META:FIELD{name="Codebase" attributes="" title=" Codebase " value=...
Since rev(2): Tasks.Item12164 This is a catch all item for all plugins out there that still have a $Rev$ in their META:TOPICINFO ... rendering it invalid. Main.MichaelDaum ... Since rev(5): Tasks.Item12164 This is a catch all item for all plugins out there that still have a $Rev$ in their META:TOPICINFO ... rendering it invalid. Main.MichaelDaum ...
Item11102 r 9 05 Nov 2024 - 12:04 -- MichaelDaum %USERSWEB%.SvenDowideit 26 Dec 2011
+



+HTML5 is default nowadays
+


+ %USERSWEB%.MichaelDaum 05 Nov 2024
%COMMENT%
Since rev(7): Tasks.Item11102 Quite some html markup that is emitted by core code is invalid in html5. For instance, anchor links do not have a name attribute, list items do n... Since rev(5): if ( $Foswiki::cfg{RenderedHtmlVersion} = 5 ) {
-   $html .
CGI::a(
+ # some code
- {
-

- id = $this addUnique( $extra, 1 ),
Item1651 r 4 05 Nov 2024 - 12:03 -- MichaelDaum Main.SvenDowideit 21 May 2009
+




+nightly builds system is out of order for some time now
+ %USERSWEB%.MichaelDaum 05 Nov 2024
+%COMMENT%
+

Since rev(2): Tasks.Item1651 Monitor could be used with a fuzzy check to make sure the numbers don't go up un noticed Main.SvenDowideit 21 May 2009 nightly builds system i... Since rev(5): Tasks.Item1651 Monitor could be used with a fuzzy check to make sure the numbers don't go up un noticed Main.SvenDowideit 21 May 2009 nightly builds system i...

Rev test

10

-- 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
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