Opened 11 years ago

Closed 5 years ago

#1331 closed defect (wontfix)

Changing sort order is ignored on and after second page

Reported by: Akihiro KAYAMA Owned by: Noah Kantrowitz
Priority: normal Component: PaginateTicketsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10


Query sort order can be modified by clicking header field. But when go another page, sort order is forced to be default(priority).

Attachments (0)

Change History (2)

comment:1 Changed 11 years ago by Akihiro KAYAMA

page_query.cs uses var:query.href, but it is originally intended for query_rss.cs. It doesn't reflect order and desc parameters.

IRequestFilter.post_process_request method seemed to have no way to produce a right href for page link(especially lacks the convenient access to query constraints to call req.href.query()).

Although I don't know this is the right way to patch trac itself, it just works.

--- trac-	2007-03-14 21:22:17.000000000 +0900
+++ trac-	2007-03-14 21:26:17.000000000 +0900
@@ -534,6 +534,10 @@
                                              not query.desc))
+        req.hdf['page_query.href'] = query.get_href(req,
+                                                    order=query.order,
+                                                    desc=query.desc)
         href = req.href.query(,
                               groupdesc=query.groupdesc and 1 or None,
                               verbose=query.verbose and 1 or None,

--- paginateticketsplugin/0.10/paginate/templates/paged_query.cs.orig	2006-09-04 02:54:38.000000000 +0900
+++ paginateticketsplugin/0.10/paginate/templates/paged_query.cs	2007-03-14 21:32:49.000000000 +0900
@@ -159,7 +159,7 @@
   <?cs if:n == page_query.curpage ?>
    <?cs var:n ?>
   <?cs else ?>
-    <a href="<?cs var:query.href ?>&page=<?cs var:n ?>"><?cs var:n ?></a>
+    <a href="<?cs var:page_query.href ?>&page=<?cs var:n ?>"><?cs var:n ?></a>
   <?cs /if ?>
   <?cs /each ?>

comment:2 Changed 5 years ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

This plugin is deprecated with Trac 0.11. The functionality was integrated to the Trac core in t:#216.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Noah Kantrowitz.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.