Bug 38525

Summary: Patron checkouts table doesn't update after the next checkout
Product: Koha Reporter: Stefan Norinder <somesecretemail>
Component: PatronsAssignee: Bugs List <koha-bugs>
Status: CLOSED INVALID QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: gmcharlt, kyle
Version: 23.11   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Stefan Norinder 2024-11-25 08:59:48 UTC
Description:

There is an issue with the table displaying a borrower's loans on their detail page. After making changes to a patron's loans, such as checking in or out an item, the table does not update automatically. To see the updated table, the user must perform a hard refresh (Ctrl + F5 on Windows).

This behavior is inconvenient and may confuse library staff.

Steps to Reproduce:

1. Navigate to a borrower's detail page:
https://host/cgi-bin/koha/members/moremember.pl?borrowernumber=:borrowerNumber
2. Click on the Check Out tab.
3. Observe the number of loans displayed:
  - In the checkout table at the bottom of the page.
  - In the tab label (e.g., "Checkouts (2)").
4. Check out an item to the borrower.

Actual Result:

The tab label updates correctly (e.g., "Checkouts (3)").
The checkout table does not reflect the new loan. It still displays the previous number of rows.

Expected Result:

The table showing the patron's loans should update to reflect the new loan immediately (e.g., three rows if three items are checked out).
Comment 1 Katrin Fischer 2024-11-25 09:30:26 UTC
Do you have any errors in the developer tools (F12)? There is some JS at play here.
Do you have any chances in your IntranetUserJS that could affect this?
Comment 2 Stefan Norinder 2024-11-25 10:06:38 UTC
Thank you, Katrin Fischer, for your quick reply. You are absolutely right—it is our own customization that caused the faulty behavior. After removing the problematic JavaScript, the page behaves as expected.

Should I delete this bug report altogether, or should I resolve it and keep it?
Comment 3 Katrin Fischer 2024-11-25 10:15:01 UTC
Deleting is not possible, but I am setting it to INVALID in this case. Thanks!