Bug 30270

Summary: Use numeric inputs instead of dropdowns for hold priority
Product: Koha Reporter: Nick Clemens <nick>
Component: Hold requestsAssignee: Nick Clemens <nick>
Status: BLOCKED --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andrewfh, gmcharlt, lucas
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 30269    
Bug Blocks:    
Attachments: Bug 30270: Use numeric inputs for holds priority

Description Nick Clemens 2022-03-10 15:48:55 UTC
Currently we load a dropdown menu with the range of priority optins when listing holds on request.pl

For a record with many holds (100+) this dropdown is large, and difficult to use

The page size when loading this many dropdowns is also large

We can reduce the problem by using numeric inputs and allowing the user to type new numbers, rather than selecting
Comment 1 Nick Clemens 2022-03-10 16:15:33 UTC
Created attachment 131574 [details] [review]
Bug 30270: Use numeric inputs for holds priority

This patch removes the code to generate dropdowns for holds priority
and adjusts it to use numeric inputs

This does remove the option to set priority to 'del' and use 'Update holds' button
to delete, however, we have a checkbox and 'Cancel selected' which perform the same function
as well as a cancel button for each individual hold

This patch increases performance of the page by reducing the size of the page

To test:
1 - Place many holds on a record
2 - View the holds page and verify functionlity when using:
    HoldsSplitQueue
    HoldsSplitQueueNumbering
3 - Apply patch
4 - Confirm dropdowns are gone
5 - Confirm priorities correctly numbered virtually or actually according to HoldsSplitQueueNumbering
6 - Confirm with all values of HoldsSplitQueue
7 - Confirm cancellation works using checkboxes or button
8 - Confirm hold priority buttons work as before
Comment 2 Andrew Fuerste-Henry 2022-05-03 15:40:37 UTC
Great start, Nick! Sadly, there was an error when setting HoldsSplitQueue to "pickup library and itemtype."

Template process failed: undef error - The method Koha::Hold->object is not covered by tests!

Trace begun at /kohadevbox/koha/Koha/Object.pm line 875
Koha::Object::AUTOLOAD('Koha::Hold=HASH(0x55f3aa7bafe0)') called at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt line 1052
eval {...} at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt line 1052
eval {...} at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt line 1057
Comment 3 Nick Clemens 2022-05-03 15:46:07 UTC
(In reply to Andrew Fuerste-Henry from comment #2)
> Great start, Nick! Sadly, there was an error when setting HoldsSplitQueue to
> "pickup library and itemtype."
> 
> Template process failed: undef error - The method Koha::Hold->object is not
> covered by tests!
> 
> Trace begun at /kohadevbox/koha/Koha/Object.pm line 875
> Koha::Object::AUTOLOAD('Koha::Hold=HASH(0x55f3aa7bafe0)') called at
> /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
> line 1052
> eval {...} at
> /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
> line 1052
> eval {...} at
> /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
> line 1057

Add a new patch to the dependency