Bug 29058 - Add option to not load existing holds table automatically
Summary: Add option to not load existing holds table automatically
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Keywords: release-notes-needed
Depends on: 29043
Blocks: 29562
  Show dependency treegraph
 
Reported: 2021-09-20 11:19 UTC by Nick Clemens
Modified: 2023-06-08 22:26 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00


Attachments
Bug 29058: Add 'Always show holds' checkbox to request.pl (10.23 KB, patch)
2021-09-20 11:25 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 29058: Add 'Always show holds' checkbox to request.pl (10.30 KB, patch)
2021-09-20 13:47 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 29058: (follow-up) Add hold count and don't display show options if no holds (2.56 KB, patch)
2021-09-21 10:45 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 29058: Add 'Always show holds' checkbox to request.pl (9.51 KB, patch)
2021-09-30 11:05 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 29058: (follow-up) Add hold count and don't display show options if no holds (2.56 KB, patch)
2021-09-30 11:05 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 29058: (follow-up) Add hold count and don't display show options if no holds (2.56 KB, patch)
2021-10-27 13:23 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 29058: Add 'Always show holds' checkbox to request.pl (10.05 KB, patch)
2022-01-28 12:07 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 29058: Don't display 'Show holds' button if holds are displayed (1.71 KB, patch)
2022-01-28 12:07 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 29058: Don't display 'Always show holds' at the bottom of the patron list (2.72 KB, patch)
2022-01-28 12:48 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 29058: Add missing filters (1.52 KB, patch)
2022-01-28 12:52 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 29058: Don't display 'Show holds' button if holds are displayed (1.74 KB, patch)
2022-01-28 12:55 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 29058: Don't display 'Always show holds' at the bottom of the patron list (2.74 KB, patch)
2022-01-28 12:55 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2021-09-20 11:19:23 UTC
In large consortia the holds table can take a long time to load on records with many holds.

When attempting to place a hold this table is always loaded

We should provide an option to prevent automatic loading of the table
Comment 1 Nick Clemens 2021-09-20 11:25:39 UTC
Created attachment 125054 [details] [review]
Bug 29058: Add 'Always show holds' checkbox to request.pl

This patch adds a new cookie 'awalys_show_holds' and utlises it on request.pl
to determine if the existing holds table should be loaded.

If the cookie does not exist, the table is loaded to preserve exiting behaviour.
If the cookie exists and is set to 'DONT' a new button 'Show holds' is added to
the page to allow force loading the table

To test:
1 - Place some holds on a record
2 - Click 'Holds' tab or 'Place a hold' from details page
3 - Note search box to place hold and table of existing holds
4 - Apply patch
5 - Reload the holds page and note new checkbox 'Always show holds'
6 - Confirm the box is checked
7 - Uncheck it
8 - Reload the page and confirm holds do not automatically load
9 - Click the new 'Show holds' button
10 - Confirm the existing holds load, and that 'Always show holds' is unchecked
11 - Check 'Always show holds'
12 - Reload page and confirm holds don't show
13 - Uncheck the box, load holds for another record, confirm it remains unchecked
14 - Bring up browser console (F12)
15 - In 'Storage' tab, under 'Cookies', delete the cookie for 'always_show_holds'
16 - Reload holds page, confirm holds load and check box is checked
Comment 2 Andrew Fuerste-Henry 2021-09-20 13:47:29 UTC
Created attachment 125062 [details] [review]
Bug 29058: Add 'Always show holds' checkbox to request.pl

This patch adds a new cookie 'awalys_show_holds' and utlises it on request.pl
to determine if the existing holds table should be loaded.

If the cookie does not exist, the table is loaded to preserve exiting behaviour.
If the cookie exists and is set to 'DONT' a new button 'Show holds' is added to
the page to allow force loading the table

To test:
1 - Place some holds on a record
2 - Click 'Holds' tab or 'Place a hold' from details page
3 - Note search box to place hold and table of existing holds
4 - Apply patch
5 - Reload the holds page and note new checkbox 'Always show holds'
6 - Confirm the box is checked
7 - Uncheck it
8 - Reload the page and confirm holds do not automatically load
9 - Click the new 'Show holds' button
10 - Confirm the existing holds load, and that 'Always show holds' is unchecked
11 - Check 'Always show holds'
12 - Reload page and confirm holds don't show
13 - Uncheck the box, load holds for another record, confirm it remains unchecked
14 - Bring up browser console (F12)
15 - In 'Storage' tab, under 'Cookies', delete the cookie for 'always_show_holds'
16 - Reload holds page, confirm holds load and check box is checked

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 3 Nick Clemens 2021-09-21 10:45:40 UTC
Created attachment 125091 [details] [review]
Bug 29058: (follow-up) Add hold count and don't display show options if no holds
Comment 4 Martin Renvoize 2021-09-30 10:40:28 UTC
Sorry, another one that doesn't apply any more :(.
Comment 5 Nick Clemens 2021-09-30 11:05:55 UTC
Created attachment 125487 [details] [review]
Bug 29058: Add 'Always show holds' checkbox to request.pl

This patch adds a new cookie 'awalys_show_holds' and utlises it on request.pl
to determine if the existing holds table should be loaded.

If the cookie does not exist, the table is loaded to preserve exiting behaviour.
If the cookie exists and is set to 'DONT' a new button 'Show holds' is added to
the page to allow force loading the table

To test:
1 - Place some holds on a record
2 - Click 'Holds' tab or 'Place a hold' from details page
3 - Note search box to place hold and table of existing holds
4 - Apply patch
5 - Reload the holds page and note new checkbox 'Always show holds'
6 - Confirm the box is checked
7 - Uncheck it
8 - Reload the page and confirm holds do not automatically load
9 - Click the new 'Show holds' button
10 - Confirm the existing holds load, and that 'Always show holds' is unchecked
11 - Check 'Always show holds'
12 - Reload page and confirm holds don't show
13 - Uncheck the box, load holds for another record, confirm it remains unchecked
14 - Bring up browser console (F12)
15 - In 'Storage' tab, under 'Cookies', delete the cookie for 'always_show_holds'
16 - Reload holds page, confirm holds load and check box is checked

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 6 Nick Clemens 2021-09-30 11:05:59 UTC
Created attachment 125488 [details] [review]
Bug 29058: (follow-up) Add hold count and don't display show options if no holds
Comment 7 Katrin Fischer 2021-10-21 20:19:12 UTC
Can you please rebase?

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 29058: Add 'Always show holds' checkbox to request.pl
Using index info to reconstruct a base tree...
M	koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
M	reserve/request.pl
Falling back to patching base and 3-way merge...
Auto-merging reserve/request.pl
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
error: Failed to merge in the changes.
Patch failed at 0001 Bug 29058: Add 'Always show holds' checkbox to request.pl
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-29058-Add-Always-show-holds-checkbox-to-reques-gBYoJH.patch
Comment 8 Nick Clemens 2021-10-27 13:23:36 UTC
Created attachment 126995 [details] [review]
Bug 29058: (follow-up) Add hold count and don't display show options if no holds
Comment 9 Katrin Fischer 2021-11-01 13:21:14 UTC
There is still something odd with the patches here. When I started, there was only the follow-up patch, I reactivated the main patch, but I get a conflict on applying:

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 29058: Add 'Always show holds' checkbox to request.pl
Using index info to reconstruct a base tree...
M	koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
M	reserve/request.pl
Falling back to patching base and 3-way merge...
Auto-merging reserve/request.pl
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
error: Failed to merge in the changes.
Patch failed at 0001 Bug 29058: Add 'Always show holds' checkbox to request.pl
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-29058-Add-Always-show-holds-checkbox-to-reques-BjIBIP.patch
Comment 10 Jonathan Druart 2022-01-28 12:07:21 UTC
Created attachment 129924 [details] [review]
Bug 29058: Add 'Always show holds' checkbox to request.pl

This patch adds a new cookie 'awalys_show_holds' and utlises it on request.pl
to determine if the existing holds table should be loaded.

If the cookie does not exist, the table is loaded to preserve exiting behaviour.
If the cookie exists and is set to 'DONT' a new button 'Show holds' is added to
the page to allow force loading the table

To test:
1 - Place some holds on a record
2 - Click 'Holds' tab or 'Place a hold' from details page
3 - Note search box to place hold and table of existing holds
4 - Apply patch
5 - Reload the holds page and note new checkbox 'Always show holds'
6 - Confirm the box is checked
7 - Uncheck it
8 - Reload the page and confirm holds do not automatically load
9 - Click the new 'Show holds' button
10 - Confirm the existing holds load, and that 'Always show holds' is unchecked
11 - Check 'Always show holds'
12 - Reload page and confirm holds don't show
13 - Uncheck the box, load holds for another record, confirm it remains unchecked
14 - Bring up browser console (F12)
15 - In 'Storage' tab, under 'Cookies', delete the cookie for 'always_show_holds'
16 - Reload holds page, confirm holds load and check box is checked

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Bug 29058: (follow-up) Add hold count and don't display show options if no holds

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 11 Jonathan Druart 2022-01-28 12:07:32 UTC
Created attachment 129925 [details] [review]
Bug 29058: Don't display 'Show holds' button if holds are displayed

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 12 Jonathan Druart 2022-01-28 12:48:34 UTC
Created attachment 129930 [details] [review]
Bug 29058: Don't display 'Always show holds' at the bottom of the patron list

The checkbox should not appear if we are selecting a patron

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 13 Jonathan Druart 2022-01-28 12:52:53 UTC
Created attachment 129931 [details] [review]
Bug 29058: Add missing filters
Comment 14 Jonathan Druart 2022-01-28 12:55:15 UTC
Created attachment 129932 [details] [review]
Bug 29058: Don't display 'Show holds' button if holds are displayed

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 15 Jonathan Druart 2022-01-28 12:55:41 UTC
Created attachment 129933 [details] [review]
Bug 29058: Don't display 'Always show holds' at the bottom of the patron list

The checkbox should not appear if we are selecting a patron

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 16 Fridolin Somers 2022-02-01 01:05:10 UTC
QA scripts will show :

 FAIL	koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
   FAIL	  spelling
		 DONT'  ==> DON'T

False alert
It is not a displayed text it is the value of cookie 'always_show_holds'
Comment 17 Fridolin Somers 2022-02-01 07:56:47 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 18 Katrin Fischer 2022-08-25 09:40:22 UTC
We are missing the update to the wiki here, but I am not seeing/finding the information about duration etc. right now:

https://wiki.koha-community.org/wiki/Use_of_Cookies

This documentation is important for libraries dealing with GDPR.