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

Item5568: ActionTracker enhancement: sortable columns

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension ActionTrackerPlugin Enhancement New   n/a  

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


*Sortable columns*: "action tracker generates HTML tables, not TWiki tables, so the tables are not sortable by TablesPlugin." (TWiki:Main.CrawfordCurrie - 22 Feb 2007). Understood. But users, after they get used that feature, expect to see it everywhere.

I have a work-around that can be used in implementation. Obviously it would be better if a solution was native in the plug-in, because this requires extra effort and perhaps some knowledge of HTML. One option: there are "Javascript table sorters to avoid the round-trip to the server." (TWiki:Main.CrawfordCurrie - 26 Apr 2008).

Here's the work-around:

  1. For the column headers that you are using, add your own hyperlink to set a URL parameter with the desired sort order, e.g.,:
    * Set ACTIONTRACKERPLUGIN_TABLEHEADER = |<a style="color:white;" href=%SCRIPTURL%/view/%WEB%/%TOPIC%?action_sort=$due>Due date</a>|<a  style="color:white;" href=%SCRIPTURL%/view/%WEB%/%TOPIC%?action_sort=$text>Description</a>|<a style="color:white;" href=%SCRIPTURL%/view/%WEB%/%TOPIC%?action_sort=$uid>(edit)</a>|
  2. Detect that parameter and assign it to a TWikiVariable (usually the default order is $due, but here it's changed to $uid).
    * Set ACTIONTRACKERPLUGIN_SORTORDER = %IF{"defined action_sort" then="%URLPARAM{action_sort}%" else="$uid"}% 
  3. Use the sort order:
     %ACTIONSEARCH{state="open" topic="%TOPIC%.*" sort="%ACTIONTRACKERPLUGIN_SORTORDER%"}% 


  • Step 1 should be done in the topic with the ACTIONSEARCH rather than defined globally. Otherwise all such column headers would show hyperlinks, but they only work if steps 2 and 3 are also done in the topic. In that case, Step 1 should be hidden in HTML comment tags.
  • Step 2 must be done in the topic with the ACTIONSEARCH. It should be hidden in HTML comment tags.
  • Steps 2 and 3 may be combined in one line.
  • If the topic contains more than one ACTIONSEARCH, as written, the same sort order is imposed on them all. You could use different parameters for each table if needed.

Aside: the work-around would be easier to roll-out if header formatting (Item4312) was implemented.

-- TWiki:Main/SeanCMorgan - 27 Apr 2008

P.S. Crawford, thanks for the suggestion to add enhancement requests here. I thought this web was just for ... you know ... Bugs! smile

Summary ActionTracker enhancement: sortable columns
ReportedBy TWiki:Main.SeanCMorgan
Codebase 4.1.0, 4.2.0
SVN Range TWiki-5.0.0, Tue, 15 Apr 2008, build 16676
AppliesTo Extension
Component ActionTrackerPlugin
Priority Enhancement
CurrentState New


TargetRelease n/a

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r2 - 2008-06-12 - SeanCMorgan
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