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

Item3525: FormQueryPlugin sort by field documentation is incorrect

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension FormQueryPlugin 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 could not get the sort by form field to work for %TABLEFORMAT%. I noticed it was sorting by topic name when I was doing sort="name". Eventually I got it working by doing sort="MyForm.MyField". But then I noticed that numeric sorting and probably reverse sorting are broken anyway. So I came up with a workaround in TableFormat.pm but it probably breaks other kind of sorting. I have a feeling that this should really be fixed in DBCacheContrib/Map.pm get sub.

Anyhow I change a few lines in the _compare function:

        if ( $field->{reverse} ) {
            # reverse sort this field
            $va = $b->get($b->get('form') . '.' . $field->{name} );
            $vb = $a->get($a->get('form') . '.' . $field->{name} );
        } else {
            $va = $a->get($a->get('form') . '.' . $field->{name} );
            $vb = $b->get($b->get('form') . '.' .  $field->{name} );
        }

All I did is adding the concatenation with the form name.

-- TWiki:Main/StephaneLenclud - 29 Jan 2007

Turns out that the whole thing is not broken at all. Only the documentation needs updating. Numeric sorting and I assume reverse sorting work fine when doing something like sort=#MyForm.MyTopic.

-- TWiki:Main.StephaneLenclud - 29 Jan 2007

Item3537 also require FormQueryPlugin documentation update.

-- TWiki:Main.StephaneLenclud - 30 Jan 2007

ItemTemplate
Summary FormQueryPlugin sort by field documentation is incorrect
ReportedBy TWiki:Main.StephaneLenclud
Codebase 4.1.0
SVN Range TWiki-4.1.0, Mon, 22 Jan 2007, build 12595
AppliesTo Extension
Component FormQueryPlugin
Priority Normal
CurrentState New
WaitingFor

Checkins TWikirev:13527
TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r4 - 2007-01-30 - StephaneLenclud
 
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