Bug 39025 - Update patron account templates to use old_issue_id to display circ info
Summary: Update patron account templates to use old_issue_id to display circ info
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Andrew Fuerste-Henry
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 22421
Blocks:
  Show dependency treegraph
 
Reported: 2025-02-03 21:28 UTC by Andrew Fuerste-Henry
Modified: 2025-03-23 14:14 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.05.00,24.11.03
Circulation function:


Attachments
Bug 39025: Use old_issue_id for issue details on patron account screens (4.07 KB, patch)
2025-02-04 13:17 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 39025: Use old_issue_id for issue details on patron account screens (4.12 KB, patch)
2025-02-04 17:55 UTC, Roman Dolny
Details | Diff | Splinter Review
Bug 39025: Use old_issue_id for issue details on patron account screens (4.89 KB, patch)
2025-02-12 13:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 39025: Use old_issue_id for issue details on patron account screens (4.98 KB, patch)
2025-02-14 08:05 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2025-02-03 21:28:18 UTC
In Bug 22421 we created accountlines.old_issue_id to hold the issue_id of a finished issue in a way that folllows foreign key constraints. 

But in boraccount.tt and pay.tt we use issue_id to pull checkout information related to the fee. We need to update those templates to use old_issue_id where it exists. Currently any fee associated with a completed checkout will not show and due date, return date, etc.
Comment 1 Andrew Fuerste-Henry 2025-02-04 13:17:05 UTC
Created attachment 177506 [details] [review]
Bug 39025: Use old_issue_id for issue details on patron account screens

To test:
1: Have an item that is checked out, overdue, and showing an accruing fine
2: On the patron account, check both Make A Payment and Transactions tabs, confirm that the fine shows Due Date, Checkout Date, and Checked Out From values
3: Check your item in
4: Reload the patron account, confirm that the fine no longer shows checkout data on either Make A Payment or Transactions
5: Apply patch
6: Reload pages, confirm Make A Payment and Transactions tabs now show values in Due Date, Checkin Date, Checkout Date, and Checked Out From
Comment 2 Roman Dolny 2025-02-04 17:55:21 UTC
Created attachment 177513 [details] [review]
Bug 39025: Use old_issue_id for issue details on patron account screens

To test:
1: Have an item that is checked out, overdue, and showing an accruing fine
2: On the patron account, check both Make A Payment and Transactions tabs, confirm that the fine shows Due Date, Checkout Date, and Checked Out From values
3: Check your item in
4: Reload the patron account, confirm that the fine no longer shows checkout data on either Make A Payment or Transactions
5: Apply patch
6: Reload pages, confirm Make A Payment and Transactions tabs now show values in Due Date, Checkin Date, Checkout Date, and Checked Out From

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 3 Jonathan Druart 2025-02-12 13:16:15 UTC
Created attachment 177856 [details] [review]
Bug 39025: Use old_issue_id for issue details on patron account screens

To test:
1: Have an item that is checked out, overdue, and showing an accruing fine
2: On the patron account, check both Make A Payment and Transactions tabs, confirm that the fine shows Due Date, Checkout Date, and Checked Out From values
3: Check your item in
4: Reload the patron account, confirm that the fine no longer shows checkout data on either Make A Payment or Transactions
5: Apply patch
6: Reload pages, confirm Make A Payment and Transactions tabs now show values in Due Date, Checkin Date, Checkout Date, and Checked Out From

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 4 Jonathan Druart 2025-02-12 13:16:20 UTC
Patch rebased using the auto-rebase script.
Comment 5 Julian Maurice 2025-02-13 10:15:19 UTC
Comment on attachment 177856 [details] [review]
Bug 39025: Use old_issue_id for issue details on patron account screens

Review of attachment 177856 [details] [review]:
-----------------------------------------------------------------

The lines modified by the patch check for account.issue_id and account.old_issue_id and then use account.checkout
Can't we simply check if account.checkout is defined ? (which should return undef if issue_id and old_issue_id are both null) ?

Also, storing the result of account.checkout in a TT variable probably avoids several duplicate SQL queries as it's used multiple times.
Comment 6 Marcel de Rooy 2025-02-14 08:05:35 UTC
Created attachment 178077 [details] [review]
Bug 39025: Use old_issue_id for issue details on patron account screens

To test:
1: Have an item that is checked out, overdue, and showing an accruing fine
2: On the patron account, check both Make A Payment and Transactions tabs, confirm that the fine shows Due Date, Checkout Date, and Checked Out From values
3: Check your item in
4: Reload the patron account, confirm that the fine no longer shows checkout data on either Make A Payment or Transactions
5: Apply patch
6: Reload pages, confirm Make A Payment and Transactions tabs now show values in Due Date, Checkin Date, Checkout Date, and Checked Out From

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 7 Katrin Fischer 2025-02-17 14:07:19 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 8 Laura O'Neil 2025-03-03 22:00:14 UTC
Will it be possible to backport this to 24.11, please?
Comment 9 Dani Elder 2025-03-17 16:26:33 UTC
Another request for backport. This affects our billing documentation, and when money is involved it can be contentious.
Comment 10 Paul Derscheid 2025-03-23 14:09:27 UTC
Nice work everyone!

Pushed to 24.11.x for 24.11.03