Issue with File Sorting Logic

Bug #919285 reported by Nat Katin-Borland
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KARL3
Won't Fix
Medium
Balazs Ree

Bug Description

When you upload a bunch of files to KARL with file names containing numbers, KARL doesn't seem to know how to deal with these in a logical way. It seems to sort files by the first digit only, rather than the entire number. So if you upload a series of documents it groups them like this: 1, 10, 100, 101, 102… then 2, 20, 200, 201. Obviously it would make more sense for the end user if items were grouped by in a more logical way, taking the entire number into account: 1, 2..10....100, 101...200, etc.

Revision history for this message
Paul Everitt (paul-agendaless) wrote :

Unfortunately that's the way alphabetic sorting works. When sorting alphabetically:

1 A
10 A
100 A
2 A
20 A
3 A

...is the sort order. Attached is a spreadsheet where I sorted alphabetically to demonstrate this. I'll see if Python/Javascript offers any choices for easily doing some other kind of sort, but I suspect our options are limited.

Revision history for this message
Paul Everitt (paul-agendaless) wrote :

Shane, assigning this to you only for a ruling. I'm not sure how sorting works in the folders, but I *think* SlickGrid does the sorting in JS. If so, can you give a ruling on whether this is, as I suspect, too much for a JS sort algorithm?

Changed in karl3:
assignee: nobody → Balazs Ree (ree)
importance: Undecided → Medium
milestone: none → m88
Revision history for this message
Nat Katin-Borland (nborland) wrote : RE: [Bug 919285] Re: Issue with File Sorting Logic

OK, sounds good...

--
Nathaniel Katin-Borland
Support Specialist
Knowledge Management Initiative
KARL Support Team

Open Society Foundations - New York Office
400 West 59th Street
New York, NY 10019
Email: <email address hidden>
Phone: 212-547-6984
http://www.soros.org/
http://www.karlproject.org
-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Paul Everitt
Sent: Friday, January 20, 2012 1:30 PM
To: Nathaniel Katin-Borland
Subject: [Bug 919285] Re: Issue with File Sorting Logic

Unfortunately that's the way alphabetic sorting works. When sorting
alphabetically:

1 A
10 A
100 A
2 A
20 A
3 A

...is the sort order. Attached is a spreadsheet where I sorted alphabetically to demonstrate this. I'll see if Python/Javascript offers any choices for easily doing some other kind of sort, but I suspect our options are limited.

** Attachment added: "Spreadsheet screenshot demonstrating alpha sort"
   https://bugs.launchpad.net/karl3/+bug/919285/+attachment/2684382/+files/FirefoxScreenSnapz001.png

--
You received this bug notification because you are subscribed to the bug report.
https://bugs.launchpad.net/bugs/919285

Title:
  Issue with File Sorting Logic

Status in KARL3:
  New

Bug description:
  When you upload a bunch of files to KARL with file names containing
  numbers, KARL doesn't seem to know how to deal with these in a logical
  way. It seems to sort files by the first digit only, rather than the
  entire number. So if you upload a series of documents it groups them
  like this: 1, 10, 100, 101, 102… then 2, 20, 200, 201. Obviously it
  would make more sense for the end user if items were grouped by in a
  more logical way, taking the entire number into account: 1,
  2..10....100, 101...200, etc.

To manage notifications about this bug go to:
https://bugs.launchpad.net/karl3/+bug/919285/+subscriptions

Revision history for this message
Paul Everitt (paul-agendaless) wrote :

Sorry, I meant "Balazs, assigning this to you…"

--Paul

On Jan 20, 2012, at 1:33 PM, Paul Everitt wrote:

> Shane, assigning this to you only for a ruling. I'm not sure how sorting
> works in the folders, but I *think* SlickGrid does the sorting in JS. If
> so, can you give a ruling on whether this is, as I suspect, too much for
> a JS sort algorithm?
>
> ** Changed in: karl3
> Importance: Undecided => Medium
>
> ** Changed in: karl3
> Milestone: None => m88
>
> ** Changed in: karl3
> Assignee: (unassigned) => Balazs Ree (ree)
>
> --
> You received this bug notification because you are subscribed to KARL3.
> https://bugs.launchpad.net/bugs/919285
>
> Title:
> Issue with File Sorting Logic
>
> Status in KARL3:
> New
>
> Bug description:
> When you upload a bunch of files to KARL with file names containing
> numbers, KARL doesn't seem to know how to deal with these in a logical
> way. It seems to sort files by the first digit only, rather than the
> entire number. So if you upload a series of documents it groups them
> like this: 1, 10, 100, 101, 102… then 2, 20, 200, 201. Obviously it
> would make more sense for the end user if items were grouped by in a
> more logical way, taking the entire number into account: 1,
> 2..10....100, 101...200, etc.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/karl3/+bug/919285/+subscriptions

Revision history for this message
Paul Everitt (paul-agendaless) wrote :

Verdict rendered and consented.

Changed in karl3:
status: New → Won't Fix
Revision history for this message
Balazs Ree (ree) wrote :

I think we need to be able to server side (catalog) sorting here.

But even if we want and can do a client side sorting, any comparison between two elements that is more elaborate then a constant fixed number of steps, would turn out too slow in practice. (as this one would, no doubt, require a cycle through each word in the sentence, if I understand the issue correctly)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.