Closed Bug 425649 Opened 17 years ago Closed 17 years ago

Sorting by Last Change Date results in wrong order

Categories

(bugzilla.mozilla.org :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: ssitter, Assigned: justdave)

References

Details

Attachments

(1 file)

Starting with today I noticed that sorting search results by Last Change Date or Creation Date results in wrong order. Bugs are sorted in the order - today (recently) - today (some hours ago) - far past - past - last week - yesterday I'd expect to have bugs sorted in order like: - far past - past - last week - yesterday - today (some hours ago) - today (recently)
Blocks: 425607
OS: Windows 2000 → All
Hardware: PC → All
Mind providing queries for both expected and actual?
I bet this is the client-side sort. Because it's not sorting dates, it's sorting strings.
Probably the simplest fix would be to just make all the dates displayed as sortable strings instead of the whole "Yesterday" bit. Otherwise I could send this back to engineering over on my side for adjustments.
Yes, this happens if I decide to change the sort order when the search results are already shown in the browser.
A sample query would be e.g. the list of bugs changed in the last week <https://bugzilla.mozilla.org/buglist.cgi?query_format=advanced&product=Calendar&chfieldfrom=1w&chfieldto=Now> Scroll down, select "Change Columns", enable column "Changed" and save it. Finally click the column header "Changed" to sort by it. The result looks similar as described Comment #0. But after reading Comment #2 I can confirm that it's sorted alphabetically instead.
Rearranging this component to not have me as the default assignee, so that it doesn't appear like I'm intending to work on bugs that other people could be taking care of if they didn't think I was already doing them. If this bug is a software issue on b.m.o and you'd like to fix it, the modified source is now available for the patching (see bug 373688). Reassigning to the new default owner.
Assignee: justdave → nobody
QA Contact: reed → other-bmo-issues
I believe the solution that I will implement is just to make all those times YYYY-MM-DD HH-MM so that they sort correctly alphabetically.
Assignee: nobody → mkanat
Okay, there's a fix for this available in our repo: Committing to: /var/www/html/everythingsolved.com/bzr/mozilla/3.0/ modified buglist.cgi modified Bugzilla/Field.pm modified template/en/default/list/table.html.tmpl Committed revision 5169.
Assignee: mkanat → justdave
(In reply to comment #3) > Probably the simplest fix would be to just make all the dates displayed as > sortable strings instead of the whole "Yesterday" bit. Otherwise I could send > this back to engineering over on my side for adjustments. Oh no, that will take too much column width on the screen. current way chopping off the date-part when it is today and time-part on other days is great for usability. I wish the complete timestamp would have kept as a hidden field and the JS code should just make use of it. (In reply to comment #8) > Okay, there's a fix for this available in our repo: is there a way to see it, with out installing bugzilla?
(In reply to comment #10) > is there a way to see it, with out installing bugzilla? It will be merged into bmo, just wait. No further discussion of this bug is necessary, really. My comment is equivalent to marking this "FIXED", except the fix just hasn't been merged in yet.
Blocks: 434921
revno: 5186 committer: David Miller <justdave@mozilla.com> branch nick: bugzilla-test timestamp: Mon 2008-05-19 22:19:25 -0700 message: Import current changes from Everything Solved This won't be live on bmo until bug 434921 is marked resolved.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
This bug and Bug 434921 are resolved as fixed but I don't see any improvements on <https://bugzilla.mozilla.org/>. The sorting issue still exists. Is there another bug I need to follow?
Stefan is right, the code sets sorttable_customkey incorrectly.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I will provide a patch later today.
Assignee: justdave → mkanat
Status: REOPENED → NEW
Attached patch FixSplinter Review
Here's the fix. This was checked in to my repo as revision 5175: Committing to: /var/www/html/everythingsolved.com/bzr/mozilla/3.0/ modified template/en/default/list/table.html.tmpl Committed revision 5175.
Over to justdave to apply to bmo.
Assignee: mkanat → justdave
Seems to be fixed now.
This was deployed to production a while ago.
Status: NEW → RESOLVED
Closed: 17 years ago17 years ago
Resolution: --- → FIXED
Component: Bugzilla: Other b.m.o Issues → General
Product: mozilla.org → bugzilla.mozilla.org
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: