Ticket #10614 (new enhancement)

Opened 6 months ago

Last modified 6 months ago

[PATCH]: Formulardetails list not time-sorted

Reported by: falkb Assigned to: hasienda
Priority: normal Component: TracFormsPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

I don't see the order criteria of that list but how can I have it sorted by time? It seems it doesn't work.

Attachments

Change History

11/14/12 09:35:09 changed by anonymous

Is it possible to have also older changes than the most recently ones displayed?

(in reply to: ↑ description ) 11/16/12 14:00:59 changed by falkb

  • summary changed from Formulardetails list not time-sorted to [PATCH]: Formulardetails list not time-sorted.

This one should help:

Index: tracformsplugin/0.11/tracforms/web_ui.py
===================================================================
--- tracformsplugin/0.11/tracforms/web_ui.py	(revision 12345)
+++ tracformsplugin/0.11/tracforms/web_ui.py	(working copy)
@@ -196,7 +196,7 @@
                  'author': tag.span(tag(_("by %(author)s", author=author)),
                                     class_='author'),
                  'time': time})
-        return rendered
+        return sorted(rendered, key=lambda k: k['time'], reverse=True)
 
     # ISearchSource methods

Add/Change #10614 ([PATCH]: Formulardetails list not time-sorted)




Change Properties
Action