Modify

Opened 7 years ago

Closed 18 months ago

#1331 closed defect (wontfix)

Changing sort order is ignored on and after second page

Reported by: kayama Owned by: coderanger
Priority: normal Component: PaginateTicketsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

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 7 years ago by 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-0.10.3.1-ja-1/trac/ticket/query.py.orig	2007-03-14 21:22:17.000000000 +0900
+++ trac-0.10.3.1-ja-1/trac/ticket/query.py	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(group=query.group,
                               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 ?>
  </p>

comment:2 Changed 18 months ago by rjollos

  • Resolution set to wontfix
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.