Bug 41058 - Using Show Checkouts button when LoadCheckoutsTableDelay is set causes collision/error. loadIssuesTableDelayTimeoutId not assigned
Summary: Using Show Checkouts button when LoadCheckoutsTableDelay is set causes collis...
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P4 minor
Assignee: Michael Grgurev
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-20 18:20 UTC by Michael Grgurev
Modified: 2025-11-26 20:19 UTC (History)
4 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
[PATCH] Bug 41058: Assign timeout id when delaying issues table load (2.44 KB, patch)
2025-10-27 22:18 UTC, Michael Grgurev
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Grgurev 2025-10-20 18:20:44 UTC
Manually selecting the "Show Checkouts" button does not cancel the setTimeout associated with LoadCheckoutsTableDelay (Checkouts table will show automatically in blah seconds..)

In /intranet-tmpl/prog/js/checkouts.js, loadIssuesTableDelayTimeoutId is declared and  targeted by clearTimeout() but never applied to the setTimeout() that triggers LoadIssuesTable().

Lines 712 & 735 should be revised from

"setTimeout(function () {"

to 

"loadIssuesTableDelayTimeoutId = setTimeout(function () {"
Comment 2 Jonathan Druart 2025-10-23 11:01:00 UTC
Can you attach your patch here?
Comment 3 Michael Grgurev 2025-10-27 22:18:34 UTC
Created attachment 188492 [details] [review]
[PATCH] Bug 41058: Assign timeout id when delaying issues table load

Well.. hopefully I formatted this right.
Comment 4 Lucas Gass (lukeg) 2025-11-26 20:06:55 UTC
Hey Michael,

The code changes here look good! A few thing to point out:

-The commit message should always start with "Bug XXXXX: " or else the Koha QA tools will complain, 

-Your must attach a test plan to your commit.


If you can do those 2 things we can move this along. And thanks for the patch!
Comment 5 Michael Grgurev 2025-11-26 20:19:02 UTC
Ahhh, thanks Lucas! I knew my workflow was probably out of whack somewhere. Thought I had both of those in my patch file, but I'm clearly formatting/applying something wrong.  I'll review everything and resubmit.