Bug 32921

Summary: SelfCheckTimeout doesn't logout if SelfCheckReceiptPrompt modal is open
Product: Koha Reporter: Lucas Gass <lucas>
Component: Self checkoutAssignee: Lucas Gass <lucas>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: Laura.escamilla
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.06,22.05.13
Attachments: Bug 32921: Honor SelfCheckTimeout when modal is open
Bug 32921: Honor SelfCheckTimeout when modal is open
Bug 32921: Honor SelfCheckTimeout when modal is open

Description Lucas Gass 2023-02-08 23:27:15 UTC
To recreate:

1. Set the 'SelfCheckTimeout' system preference to something low for testing.
2. Make sure 'SelfCheckReceiptPrompt' is set to 'Show'.
3. Log in to SCO and press finish but leave the modal open.
4. Wait until the 'SelfCheckTimeout' time has expired, nothing happens. 

This is a problem for some libraries because not every patron realizes there is another action after pressing 'Finish' and they walk away. Leaving open a screen that shows their username and checkouts.
Comment 1 Lucas Gass 2023-02-08 23:30:28 UTC
Created attachment 146414 [details] [review]
Bug 32921: Honor SelfCheckTimeout when modal is open

To test:
1. Set the 'SelfCheckTimeout' system preference to something low for testing.
2. Make sure 'SelfCheckReceiptPrompt' is set to 'Show'.
3. Log in to SCO and press finish but leave the modal open.
4. Wait until the 'SelfCheckTimeout' time has expired, nothing happens.
5. Apply patch and try again. You should be logged out when SelfCheckTimeout expires.
Comment 2 Laura Escamilla 2023-03-27 15:47:14 UTC
(In reply to Lucas Gass from comment #1)
> Created attachment 146414 [details] [review] [review]
> Bug 32921: Honor SelfCheckTimeout when modal is open
> 
> To test:
> 1. Set the 'SelfCheckTimeout' system preference to something low for testing.
> 2. Make sure 'SelfCheckReceiptPrompt' is set to 'Show'.
> 3. Log in to SCO and press finish but leave the modal open.
> 4. Wait until the 'SelfCheckTimeout' time has expired, nothing happens.
> 5. Apply patch and try again. You should be logged out when SelfCheckTimeout
> expires.

Hi Lucas, 

I set my SelfCheckTimeout to 10 seconds, left the modal open and it did not log out even after applying the patch.
Comment 3 Lucas Gass 2023-04-13 22:21:39 UTC
(In reply to Laura Escamilla from comment #2)
> (In reply to Lucas Gass from comment #1)
> > Created attachment 146414 [details] [review] [review] [review]
> > Bug 32921: Honor SelfCheckTimeout when modal is open
> > 
> > To test:
> > 1. Set the 'SelfCheckTimeout' system preference to something low for testing.
> > 2. Make sure 'SelfCheckReceiptPrompt' is set to 'Show'.
> > 3. Log in to SCO and press finish but leave the modal open.
> > 4. Wait until the 'SelfCheckTimeout' time has expired, nothing happens.
> > 5. Apply patch and try again. You should be logged out when SelfCheckTimeout
> > expires.
> 
> Hi Lucas, 
> 
> I set my SelfCheckTimeout to 10 seconds, left the modal open and it did not
> log out even after applying the patch.

Hmmm, this does work for me in both Firefox and Chrome. Question, did you try clearing your cache after applying the patch?
Comment 4 Lucas Gass 2023-04-13 22:22:31 UTC
Since this is working for me I am going to set it back to NSO to see if I can get some more feedback.
Comment 5 Marius 2023-04-17 20:41:16 UTC
Created attachment 149779 [details] [review]
Bug 32921: Honor SelfCheckTimeout when modal is open

To test:
1. Set the 'SelfCheckTimeout' system preference to something low for testing.
2. Make sure 'SelfCheckReceiptPrompt' is set to 'Show'.
3. Log in to SCO and press finish but leave the modal open.
4. Wait until the 'SelfCheckTimeout' time has expired, nothing happens.
5. Apply patch and try again. You should be logged out when SelfCheckTimeout expires.

Signed-off-by: Marius Mandrescu <marius.mandrescu@inLibro.com>
Comment 6 Jonathan Druart 2023-05-03 09:34:28 UTC
Created attachment 150568 [details] [review]
Bug 32921: Honor SelfCheckTimeout when modal is open

To test:
1. Set the 'SelfCheckTimeout' system preference to something low for testing.
2. Make sure 'SelfCheckReceiptPrompt' is set to 'Show'.
3. Log in to SCO and press finish but leave the modal open.
4. Wait until the 'SelfCheckTimeout' time has expired, nothing happens.
5. Apply patch and try again. You should be logged out when SelfCheckTimeout expires.

Signed-off-by: Marius Mandrescu <marius.mandrescu@inLibro.com>

JD amended patch - fix indentation

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Tomás Cohen Arazi 2023-05-05 13:15:13 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 8 Martin Renvoize 2023-05-12 14:05:40 UTC
Many hands makes light work, thankyou everyone!

Pushed to 22.11.x for the next release
Comment 9 Lucas Gass 2023-05-15 22:52:35 UTC
Backported to 22.05.x for upcoming 22.05.13