• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Assume today is 2005-11-07 (it is).

Create two ACTIONs, one due 2005-11-01, the other 2005-11-15.

Use an ACTIONSEARCH to query against these actions:

%ACTIONSEARCH{ state="open" within="14" }%

  • Only the 2005-11-15 item should show up. Instead, both appear.
  • Change 14 to -14. Only the 2005-11-01 item should show up. Instead both appear.

B0rked.

-- JST


More info. In your dox you say: "Works in both directions, so you can use this to search for actions which are going to fall due within a certain number of days, or a negative number for actions that fell due between a time in the past and now."

What you do right now is: "...search for actions which fall due prior to a certain number of days in the future, or a negative number for actions that fell due after a certain time in the past."

In other words, you never check that a date is on the "wrong" side of now, based on the sign of the within parameter.

From IRC, where I pasted a fix for the problem:

File lib/TWiki/Plugins/ActionTrackerPlugin/Action.pm
sub _matchField_within {
     my ( $this, $val ) = @_;
     my $secs = $this->secsToGo();
     my $slack = $secs - $val * 60 * 60 * 24;

     if ($val > 0) {
         return ($slack <= 0) if ($secs > 0);
     } else {
         return ($slack >= 0) if ($secs < 0);
     }
}

I'd check it in, but it's not my code. wink

-- JST


Spoke to CC, and he approved the checkin. Note I have NOT added testcases to confirm this feature does not regress, so I'm not closing the issue - but I am downgrading it to "Low".

Committed revision 7376.

-- JST


SVN 7540 CC

ItemTemplate
Summary ActionTrackerPlugin: ACTIONSEARCH "within" argument does not work as advertised (needs testcases)
ReportedBy JoanTouzet
AppliesTo Extension
Component ActionTrackerPlugin
Priority Low
CurrentState Closed
WaitingFor

Checkins 7376 7540
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r5 - 2005-11-18 - CrawfordCurrie
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback