Opened 7 years ago

Closed 4 years ago

Last modified 3 years ago

#8217 closed (fixed)

Alphabetical sorted FilePathField

Reported by: bernd Owned by: nobody
Component: Forms Version: master
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

When using the FilePathField-form-field I get an unordered list of files (I think the files are ordered by creation date).
If there are a lot of files it's very hard to get a good overview with this order.

My idea is to sort the files in alphabetical order which makes a long list much more easier to read.

I added a patch and run the test on "forms" without any errors.

Attachments (2)

FilePathField-sorted.diff (1.0 KB) - added by bernd 7 years ago.
FilePathField-sorted_py2.3.diff (746 bytes) - added by davidb 6 years ago.

Download all attachments as: .zip

Change History (11)

Changed 7 years ago by bernd

comment:1 Changed 7 years ago by jacob

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

sorted() is new in 2.4, so the patch needs to use list.sort. Otherwise, good.

Changed 6 years ago by davidb

comment:2 Changed 6 years ago by davidb

I added a patch that does the sorting properly on Python 2.3. The "forms" tests passed without errors.

comment:3 Changed 5 years ago by claudep

Now that Python 2.3 support has been dropped, the first patch seems fine (it even still applies on current trunk). Ready to commit?

comment:4 Changed 4 years ago by paparent

Will this issue be fixed ?

comment:5 Changed 4 years ago by claudep

  • milestone set to 1.3

comment:6 Changed 4 years ago by jezdez

  • Triage Stage changed from Accepted to Ready for checkin

I could reproduce this on a Debian Lenny server.

comment:7 Changed 4 years ago by jezdez

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

(In [14772]) Fixed #8217 -- Correctly sort files in FilePathFields on older Python versions. Thanks, bernd and davidb.

comment:8 Changed 4 years ago by jezdez

(In [14774]) [1.2.X] Fixed #8217 -- Correctly sort files in FilePathFields on older Python versions. Thanks, bernd and davidb.

Backport from trunk (r14772).

comment:9 Changed 3 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top