Koha-clms/circ
Laura_Escamilla 5ecdbcae32
Bug 40886: Ensure patron messages display in proper chronological order
1. Create several random patron circ messages with different dates. I used the following sql for my ktd:
    -- INSERT INTO messages (borrowernumber, branchcode, message_type, message, message_date)
SELECT
    51 AS borrowernumber,
    'CPL' AS branchcode,
    ELT(FLOOR(1 + (RAND() * 3)), 'L','B','E') AS message_type,  -- L=Staff note, B=OPAC, E=Email (adjust to your codes)
    CONCAT('Random test message ', FLOOR(RAND()*1000)) AS message,
    DATE_ADD(CURDATE(), INTERVAL -FLOOR(RAND() * 1825) DAY) AS message_date  -- random day in last ~5 years (5*365)
FROM (
    SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5
    UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 UNION ALL SELECT 10
) AS x;

2. View the patron account and notice that messages are sorted by type, but not by date.
3. Apply the patch and restart_all
4. Refresh the patron account page and clear the browser cache if necessary.
5. View the patron account again and notice that the messages are still sorted by type, but they are also sorted in descending order (newest to oldest).
6. Sign off and have a great day!

Signed-off-by: Jen Tormey <jntormey@dmpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7be401fcbd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-10-23 23:06:48 +02:00
..
add_message.pl Bug 38095: Include logged-in branch in custom patron message 2025-02-21 16:41:28 +01:00
article-request-slip.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
article-requests.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
bookcount.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
branchoverdues.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
branchtransfers.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
checkout-notes.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
circulation-home.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
circulation.pl Bug 40886: Ensure patron messages display in proper chronological order 2025-10-23 23:06:48 +02:00
curbside_pickups.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
del_message.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
hold-transfer-slip.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
on-site_checkouts.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
overdue.pl Bug 31167: Only mark due dates in the past red on overdues report 2025-03-21 17:50:27 +01:00
pendingbookings.pl Bug 33736: Add filter for holding library 2024-10-25 11:09:55 +02:00
pendingreserves.pl Bug 40515: Fix regexp for cud-mark_as_lost_and_notify 2025-09-20 10:43:13 +02:00
renew.pl Bug 9762: (Alternative) Handle renewals 2025-09-20 10:43:26 +02:00
request-article.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
reserveratios.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
returns.pl Bug 40708: Return the specific error to the checkin page 2025-09-25 16:22:48 +02:00
set-library.pl Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
transfer-slip.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
transfers_to_send.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
transferstoreceive.pl Bug 39834: Replace some tabs with spaces 2025-06-17 21:42:59 +02:00
view_holdsqueue.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
waitingreserves.pl Bug 39834: Replace some tabs with spaces 2025-06-17 21:42:59 +02:00