Bug 29706 - When placing a request on the opac, the user is shown titles they cannot place a hold on
Summary: When placing a request on the opac, the user is shown titles they cannot plac...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-16 01:59 UTC by Nick Clemens
Modified: 2022-03-20 14:45 UTC (History)
4 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,21.11.03,21.05.13


Attachments
Bug 29706: Improve table elements (2.75 KB, patch)
2021-12-16 02:06 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 29706: Hide items that cannot be held by default when placing hold on OPAC (8.66 KB, patch)
2021-12-16 02:06 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 29706: Hide items that cannot be held by default when placing hold on OPAC (8.72 KB, patch)
2022-01-07 16:19 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 29706: Improve table elements (2.81 KB, patch)
2022-02-08 09:11 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 29706: Hide items that cannot be held by default when placing hold on OPAC (8.79 KB, patch)
2022-02-08 09:11 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 29706: (follow-up) Adjust code to work for multi-holds (937 bytes, patch)
2022-02-08 12:30 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 29706: Improve table elements (2.89 KB, patch)
2022-02-08 15:50 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 29706: Hide items that cannot be held by default when placing hold on OPAC (8.87 KB, patch)
2022-02-08 15:50 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 29706: (follow-up) Adjust code to work for multi-holds (1012 bytes, patch)
2022-02-08 15:50 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-12-16 01:59:42 UTC
When a user is placing a hold in a consortium, there may be many items on a record that cannot be held.

We display these items which can cause the need for scrolling to get to items that can be held.
Comment 1 Nick Clemens 2021-12-16 02:06:50 UTC
Created attachment 128580 [details] [review]
Bug 29706: Improve table elements

This patch add a thead and tbody element to the 'copiesrow' table
Comment 2 Nick Clemens 2021-12-16 02:06:53 UTC Comment hidden (obsolete)
Comment 3 The Minh Luong 2022-01-07 16:19:03 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2022-02-08 09:11:23 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2022-02-08 09:11:27 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2022-02-08 09:12:34 UTC
I would have put the button at the top of the table, but not considering blocker.
Comment 7 Jonathan Druart 2022-02-08 09:14:45 UTC
It actually does not work for multi holds, the button will show/hide the items for the other biblios as well.
Comment 8 Nick Clemens 2022-02-08 12:30:48 UTC Comment hidden (obsolete)
Comment 9 Jonathan Druart 2022-02-08 15:50:15 UTC
Created attachment 130297 [details] [review]
Bug 29706: Improve table elements

This patch add a thead and tbody element to the 'copiesrow' table

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 10 Jonathan Druart 2022-02-08 15:50:19 UTC
Created attachment 130298 [details] [review]
Bug 29706: Hide items that cannot be held by default when placing hold on OPAC

This patch adds a 'holdable' and 'unholdable' class to the rows of the table

Additionally I rename the 'backgroundcolor' field to 'onloan' as that is what it contains.
Note: Out of the box, there is no css associated with this class

I add a div around the table to allow hiding the new buttons as well when optiuons are hidden

It would be nice in the future to utilise a Koha table here, however, it is complicated by multi-holds

To test:
 1 - Add a number of items to a record, ensuring they belong to different libraries
 2 - Set 'Default checkout, hold and return policy'->'Hold policy' to 'From home library'
 3 - Sign in to opac and attempt to placehold on the record
 4 - Click 'show more options' and 'a specificitem'
 5 - Note holds table includes items that cannot be held
 6 - Apply patch
 7 - Reload holds page
 8 - Note items that cannot be heldare hidden
 9 - Click 'Show unholdable items' and note they appear
10 - Click 'Hide unholdable items' and veriofy they hide
11 - Test with multi holds

Signed-off-by: The Minh Luong <the-minh.luong@inlibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 11 Jonathan Druart 2022-02-08 15:50:23 UTC
Created attachment 130299 [details] [review]
Bug 29706: (follow-up) Adjust code to work for multi-holds

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 12 Fridolin Somers 2022-02-16 21:52:25 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 13 Kyle M Hall 2022-02-18 12:51:24 UTC
Pushed to 21.11.x for 21.11.03
Comment 14 Andrew Fuerste-Henry 2022-03-04 17:14:50 UTC
Pushed to 21.05.x for 21.05.12
Comment 15 Victor Grousset/tuxayo 2022-03-18 02:32:24 UTC
Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed.