Bug 35188

Summary: force_checkout permission can override all blocks on a patron account but only shows when they are restricted
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: CirculationAssignee: Nick Clemens (kidclamp) <nick>
Status: Pushed to main --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: crose, fridolin.somers, gmcharlt, katrin.fischer, kyle.m.hall, martin.renvoize, victor
Version: MainKeywords: Sandbox
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.11.00
Bug Depends on: 643    
Bug Blocks:    
Attachments: Bug 35188: Show checkout override for all noisseus statuses
Bug 35188: Show checkout override for all noisseus statuses
Bug 35188: Show checkout override for all noisseus statuses
Bug 35188: [23.05.x] Show checkout override for all noissues statuses

Description Nick Clemens (kidclamp) 2023-10-30 12:45:06 UTC
When the force_checkout permission was added, the script circulation.pl was altered to allow overriding any block on the patron's account (expired, gonenoaddress, etc)

The last follow-up on that bug, however, moved the button to override into the section for restrictions, limiting the scope for users to the case where a patron had a debarment.

To recreate:
1 - Log in to Koha with a user with force_checkout permission (superlibrarian ok too)
2 - Mark a patron as expired, lost card, gone no address
3 - Go to 'Check out' page for the patorn
4 - Note you cannot override the restrictions
5 - Add a manual restriction/debarment
6 - Go to checkout again, now you can override
7 - Remove the debarment
8 - Add manually ot URL of checkout page '&foreallow=1'
9 - Note you can now override the other restrictions

I think the intent here should be that 'force_checkout' allows overriding any of the statuses
Comment 1 Nick Clemens (kidclamp) 2023-10-30 12:49:59 UTC
Created attachment 158062 [details] [review]
Bug 35188: Show checkout override for all noisseus statuses

This patch moves the override button up one level into the list of noissues in order to allow
overriding any blocking status

To test:
1 - Log in to Koha with a user with force_checkout permission (superlibrarian ok too)
2 - Mark a patron as expired, lost card, gone no address
3 - Go to 'Check out' page for the patorn
4 - Note you cannot override the restrictions
5 - Add a manual restriction/debarment
6 - Go to checkout again, now you can override
7 - Remove the debarment
8 - Add manually ot URL of checkout page '&foreallow=1'
9 - Note you can now override the other restrictions
10 - Apply patch
11 - Reload patron
12 - Note you now see the override button on the check out screen
13 - Add a debarment
14 - Confirm the button is still there
15 - Confirm overriding allows the checkout (with or without a debarment)
Comment 2 Nick Clemens (kidclamp) 2023-10-30 12:51:21 UTC
*** Bug 34588 has been marked as a duplicate of this bug. ***
Comment 3 Matt Blenkinsop 2023-11-02 16:02:39 UTC
Created attachment 158271 [details] [review]
Bug 35188: Show checkout override for all noisseus statuses

This patch moves the override button up one level into the list of noissues in order to allow
overriding any blocking status

To test:
1 - Log in to Koha with a user with force_checkout permission (superlibrarian ok too)
2 - Mark a patron as expired, lost card, gone no address
3 - Go to 'Check out' page for the patorn
4 - Note you cannot override the restrictions
5 - Add a manual restriction/debarment
6 - Go to checkout again, now you can override
7 - Remove the debarment
8 - Add manually ot URL of checkout page '&foreallow=1'
9 - Note you can now override the other restrictions
10 - Apply patch
11 - Reload patron
12 - Note you now see the override button on the check out screen
13 - Add a debarment
14 - Confirm the button is still there
15 - Confirm overriding allows the checkout (with or without a debarment)

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Comment 4 Victor Grousset/tuxayo 2023-11-05 00:04:43 UTC
Created attachment 158413 [details] [review]
Bug 35188: Show checkout override for all noisseus statuses

This patch moves the override button up one level into the list of noissues in order to allow
overriding any blocking status

To test:
1 - Log in to Koha with a user with force_checkout permission (superlibrarian ok too)
2 - Mark a patron as expired, lost card, gone no address
3 - Go to 'Check out' page for the patorn
4 - Note you cannot override the restrictions
5 - Add a manual restriction/debarment
6 - Go to checkout again, now you can override
7 - Remove the debarment
8 - Add manually ot URL of checkout page '&foreallow=1'
9 - Note you can now override the other restrictions
10 - Apply patch
11 - Reload patron
12 - Note you now see the override button on the check out screen
13 - Add a debarment
14 - Confirm the button is still there
15 - Confirm overriding allows the checkout (with or without a debarment)

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 5 Victor Grousset/tuxayo 2023-11-05 00:04:58 UTC
Works, makes sense, QA script happy, code looks good, passing QA :)
Comment 6 Tomás Cohen Arazi 2023-11-06 14:36:56 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 7 Fridolin Somers 2023-11-10 07:49:54 UTC
Does not apply on 23.05.x
Please provide rebased patch
Comment 8 Nick Clemens (kidclamp) 2023-11-10 11:57:47 UTC
Created attachment 158803 [details] [review]
Bug 35188: [23.05.x] Show checkout override for all noissues statuses

This patch moves the override button up one level into the list of noissues in order to allow
overriding any blocking status

To test:
1 - Log in to Koha with a user with force_checkout permission (superlibrarian ok too)
2 - Mark a patron as expired, lost card, gone no address
3 - Go to 'Check out' page for the patorn
4 - Note you cannot override the restrictions
5 - Add a manual restriction/debarment
6 - Go to checkout again, now you can override
7 - Remove the debarment
8 - Add manually ot URL of checkout page '&foreallow=1'
9 - Note you can now override the other restrictions
10 - Apply patch
11 - Reload patron
12 - Note you now see the override button on the check out screen
13 - Add a debarment
14 - Confirm the button is still there
15 - Confirm overriding allows the checkout (with or without a debarment)

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>