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

Item6449: $dollarpercnt not working as expected in SEARCH

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine SEARCH Normal No Action Required   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

Requirement: for each X:
search for topics where a specified form field has value X
for each hit, print the mod date (without the time component).

We tried

%FOREACH{"release" in="8, 19"}%

---++ $release

$percntSEARCH{
 topic="*Projects20.*" type="regex" nonoise="off"
 search="META:FIELD.*?Release.*?value=\"$release\""
 format="[$formfield(ProjectName) $percntCALC{$FORMATTIME($TIME($date),$day $mon $year)}$percnt "}$percnt

%NEXT{"release"}%

which doesn't work (as expected) because the CALC is evaluated too soon (before $date has a value).

But when we changed to

$dollarpercntCALC{ $FORMATTIME($TIME($date),$day $mon $year) }$dollarpercnt

which should work (as documented), we see

$percntCALC{ $FORMATTIME($TIME($date),$day $mon $year) }$percnt

printed on the screen!

It turns out that

 $percnt$nopCALC{$FORMATTIME($TIME($date),$day $mon $year)}$nop$percnt

works.

So we have a solution. But the failure of $dollarpercnt to work as documented feels like a bug.

-- TWiki:Main/VickiBrown - 06 May 2010

The bug is in an unfortunate spec of TWiki:Plugins/ForEachPlugin: It expands $pernct anywhere within FOREACH and NEXT. You can lobby the maintainer of the ForEachPlugin to change the spec.

-- TWiki:Main.PeterThoeny - 08 May 2010

ItemTemplate
Summary $dollarpercnt not working as expected in SEARCH
ReportedBy TWiki:Main.VickiBrown
Codebase 4.2.4
SVN Range TWiki-5.0.0-rc1, Mon, 03 May 2010, build 18580
AppliesTo Engine
Component SEARCH
Priority Normal
CurrentState No Action Required
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2010-05-08 - PeterThoeny
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback