https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41058

--- Comment #8 from David Nind <[email protected]> ---
Created attachment 193267
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193267&action=edit
Bug 41058: Assign timeout id when delaying issues table load

When AlwaysLoadCheckoutsTable is enabled and a delay is configured,
we were calling setTimeout without capturing the returned id, despite a
`loadIssuesTableDelayTimeoutId` variable already being declared and targetted
by clearTimeout. This prevented the "Load now" button from properly clearing
the pending timeout.

Test plan:
1. Configure a delay (LoadCheckoutsTableDelay > 0) so checkouts table
   loads after N seconds.
2. Go to a patron’s checkouts page.
3. Before the delay completes, click "Load now".
   - Without this patch: an alert window will display a "Something went wrong
         when loading the table" error once the timeout triggers.
   - With this patch: the pending timeout is cleared; the table loads
     immediately only once.
4. Reload the page with the delay set; wait for the timeout to elapse
   and confirm the table loads normally.

Signed-off-by: Mike Grgurev <[email protected]>
Signed-off-by: David Nind <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to