Foswiki on GitHub is open for business! Next release meeting: Monday September 29, 1300Z

Item8829: Integer index doesn't work for queries

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Urgent Closed Engine    
Using a constant integer index in a query doesn't work. For example, in a topic with more than 2 attachments, then

%QUERY{"attachments[1].name"}%

should return the name of the second attachment. Instead it returns a list of all the attachments.

-- CrawfordCurrie - 03 Apr 2010

0-based or 1-based indexing system?

-- WillNorris - 03 Apr 2010

Zero based; and I let it support negative indices in the perl way too (one of the few things I really like in perl wink )

-- CrawfordCurrie - 04 Apr 2010

This fix "broke" a miscoded test (Fn_QUERY)

-- CrawfordCurrie - 08 Apr 2010

 

ItemTemplate edit

Summary Integer index doesn't work for queries
ReportedBy CrawfordCurrie
Codebase
SVN Range
AppliesTo Engine
Component
Priority Urgent
CurrentState Closed
WaitingFor
Checkins Foswikirev:7067 Foswikirev:7069 Foswikirev:7125
TargetRelease minor
ReleasedIn 1.1.0
Topic revision: r9 - 04 Oct 2010, KennethLavrsen
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License