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

Item6458: d2n not working as expected (Query Search)

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal New   n/a  

Edit Form Data

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

Detail

I have this code

%~~ SEARCH{
~~~ "
~~~  name ~ 'OperabilityReview*' AND
~~~  form.name ~ '*OperabilityReviewForm' AND
~~~  ProjName ~ '%URLPARAM{"qPrj"}%*' AND
~~~  ( d2n(ReviewDate) >= d2n('%URLPARAM{"qDate1" default="1969-12-31"}%') AND 
~~~    d2n(ReviewDate) <= d2n('%URLPARAM{"qDate2" default="2020-12-31"}%') ) AND
~~~  ReviewStatus ~ '%URLPARAM{"qStat"}%*' 
~~~ "
~~~ type="query" 
~~~ format="|
~~~ $formfield(ProjName) | 
~~~ $formfield(ReviewDate) | 
~~~ $formfield(ReviewStatus)  | 
~~~ " }%

I expected that if ReviewDate was blank, then d2n(ReviewDate) would return 0 and match

>= d2n('%URLPARAM{"qDate1" default="1969-12-31"}%')

but it did not.

d2n of an empty string (unset field) is not documented.

I think

  1. it should be documented
  2. it should be 0

-- TWiki:Main/VickiBrown - 11 May 2010

ItemTemplate
Summary d2n not working as expected (Query Search)
ReportedBy TWiki:Main.VickiBrown
Codebase 4.2.4
SVN Range TWiki-5.0.0-rc2, Sat, 08 May 2010, build 18615
AppliesTo Engine
Component

Priority Normal
CurrentState New
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Topic revision: r1 - 2010-05-11 - VickiBrown
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback