[Bug 42200] New: SelfCheckInTimeout being interpreted in milliseconds instead of seconds
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 Bug ID: 42200 Summary: SelfCheckInTimeout being interpreted in milliseconds instead of seconds Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Self checkout Assignee: koha-bugs@lists.koha-community.org Reporter: lucas@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org To recreate: 1. Set, or leave, the SelfCheckInTimeout at 120 seconds 2. Log in to SCO module 3. You will be logged out in 120 milliseconds -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |38365 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38365 [Bug 38365] Add Content-Security-Policy HTTP header to HTML responses -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 --- Comment #1 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 196385 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196385&action=edit Bug 42200: Convert milliseconds to seconds for SelfCheckInTimeout To test: 1. Set, or leave, the SelfCheckInTimeout at 120 seconds 2. Log in to SCO module 3. You will be logged out in 120 milliseconds 4. APPLY PATCH, clear browser cache 5. SelfCheckInTimeout should work in seconds again. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lucas@bywatersolutions.com |ity.org | Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|SelfCheckInTimeout being |SelfCheckTimeout being |interpreted in milliseconds |interpreted in milliseconds |instead of seconds |instead of seconds -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 --- Comment #2 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Ooof, I said SelfCheckInTimeout when I meant SelfCheckTimeout. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196385|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 --- Comment #3 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 196386 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196386&action=edit Bug 42200: Convert milliseconds to seconds for SelfCheckInTimeout To test: 1. Set, or leave, the SelfCheckTimeout at 120 seconds 2. Log in to SCO module 3. You will be logged out in 120 milliseconds 4. APPLY PATCH, clear browser cache 5. SelfCheckTimeout should work in seconds again. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196386|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 196401 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196401&action=edit Bug 42200: Convert milliseconds to seconds for SelfCheckInTimeout To test: 1. Set, or leave, the SelfCheckTimeout at 120 seconds 2. Log in to SCO module 3. You will be logged out in 120 milliseconds 4. APPLY PATCH, clear browser cache 5. SelfCheckTimeout should work in seconds again. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes the timeout for release notes| |the self-checkout system. | |The value in | |SelfCheckTimeout is in | |seconds, but milliseconds | |were used in the code. (For | |example, instead of the | |timeout happening after 120 | |seconds (2 minutes) you | |were logged out after 120 | |milliseconds!) | | | |(This was caused by a | |change in Bug 38365 - Add | |Content-Security-Policy | |HTTP header to HTML | |responses, added in Koha | |26.05.) CC| |david@davidnind.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #5 from David Cook <dcook@prosentient.com.au> --- @Lucas not sure why bug 38365 was added as a dependency here? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 --- Comment #6 from David Cook <dcook@prosentient.com.au> --- Hmm also this sounds super familiar... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=40336, | |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=36586 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 --- Comment #7 from David Cook <dcook@prosentient.com.au> --- (In reply to David Cook from comment #6)
Hmm also this sounds super familiar...
Yeah I remember I wrote a patch that replaced [% SelfCheckTimeout | html %] with [% Koha.Preference('SelfCheckTimeout') || 120 | html %] and someone discovered that it caused the milliseconds vs seconds issue... https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=36586&attachment=182023 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|38365 |41582 --- Comment #8 from David Cook <dcook@prosentient.com.au> --- (In reply to David Cook from comment #5)
@Lucas not sure why bug 38365 was added as a dependency here?
I think the dependency is supposed to be bug 41582 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38365 [Bug 38365] Add Content-Security-Policy HTTP header to HTML responses https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41582 [Bug 41582] Tidy kohaTable block - opac -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 --- Comment #9 from David Cook <dcook@prosentient.com.au> --- And the sci-main.pl... it does this: 112 my $timeout = C4::Context->preference('SelfCheckInTimeout') || 120; 113 $template->param( refresh_timeout => $timeout ); opac/sci/sci-main.pl And it just compares those seconds against an "idleTime" counter that incremented every 1000 milliseconds -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 --- Comment #10 from David Cook <dcook@prosentient.com.au> --- In conclusion, this change makes a lot of sense. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |dcook@prosentient.com.au |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196401|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 --- Comment #11 from David Cook <dcook@prosentient.com.au> --- Created attachment 196402 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196402&action=edit Bug 42200: Convert milliseconds to seconds for SelfCheckInTimeout To test: 1. Set, or leave, the SelfCheckTimeout at 120 seconds 2. Log in to SCO module 3. You will be logged out in 120 milliseconds 4. APPLY PATCH, clear browser cache 5. SelfCheckTimeout should work in seconds again. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 --- Comment #12 from David Cook <dcook@prosentient.com.au> --- (In reply to David Cook from comment #8)
(In reply to David Cook from comment #5)
@Lucas not sure why bug 38365 was added as a dependency here?
I think the dependency is supposed to be bug 41582
This also reminds me of that thing where you don't go on the internet asking for help. You post something wrong and wait for people to scramble onto the mistake and fix it. Haha. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196402|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 --- Comment #13 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 196430 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196430&action=edit Bug 42200: Convert milliseconds to seconds for SelfCheckInTimeout To test: 1. Set, or leave, the SelfCheckTimeout at 120 seconds 2. Log in to SCO module 3. You will be logged out in 120 milliseconds 4. APPLY PATCH, clear browser cache 5. SelfCheckTimeout should work in seconds again. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 --- Comment #14 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 196431 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196431&action=edit Bug 42200: Remove pl code The code in the controller is not longer used. We should also restore the default value (120) Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|dcook@prosentient.com.au |jonathan.druart@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 --- Comment #15 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Needs documenting --- Comment #16 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- This will not be backported to 25.11.x due to it being deemed an enhancement or a dependancy not being met -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42200 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Needs documenting |RESOLVED --- Comment #17 from David Nind <david@davidnind.com> --- Bug fix, no changes to the manual required. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org