When reviewing overdue items, (at least in our case) it's quite helpful to have the table of overdue items primarily be sorted by date, especially with a list that spans years in some cases.

Attached is a one-line patch that sorts the item ids by their duedate. Interestingly, PHP seems to insert items checked out by the same person at a later date below the earlier items of that patron due to the patron id being the array's index. For us, this grouping is a feature rather than a bug.

Feel free to reject the attached patch if the behavior is too counterintuitive for other users.

CommentFileSizeAuthor
#2 735328-sort-2.patch874 bytesgrahl
#1 sort.patch890 bytesgrahl

Comments

grahl’s picture

StatusFileSize
new890 bytes
grahl’s picture

StatusFileSize
new874 bytes

The previous patch is a bit cumbersome. I have now changed the structure of $rows in library.pages.inc in the following patch, to have a quick sort based on due dates.

jastraat’s picture

I've been swamped for the last year, and I haven't had a chance to figure out how to set up Git access yet. I may be able to add you as a maintainer if that's still of interest to you. Also - is this patch against 6.x-1 or 6.x-2?

grahl’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)