Bug 16547

Summary: Can't place item level hold directly from search results screen
Product: Koha Reporter: Barton Chittenden <barton>
Component: Hold requestsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: 1joynelson, andrewfh, arthur.suzuki, cbrannon, david, gmcharlt, jonathan.druart, katrin.fischer, martin.renvoize, nick
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25408
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
This enhancement lets you place and an item level hold from a search results list.
Version(s) released in:
20.05.00
Attachments: Bug 16547: Do not display "multi holds" view if only one is selected
Bug 16547: Do not display "multi holds" view if only one is selected
Bug 16547: Do not display "multi holds" view if only one is selected
Bug 16547: Do not display "multi holds" view if only one is selected
Bug 16547: Do not display "multi holds" view if only one is selected
Bug 16547: Remove more multi_holds inconsistencies
Bug 16547: Remove more multi_holds inconsistencies
Bug 16547: Remove more multi_holds inconsistencies
Bug 16547: Remove more multi_holds inconsistencies

Description Barton Chittenden 2016-05-18 20:01:15 UTC
If you search for an item that brings up a list of results, checking the check box and clicking the 'Place Hold' button allows you to place a hold -- but after you've selected the patron, you can only place biblio level holds -- the section of the 'Confirm Holds' page which usually shows to allow item level holds is not displayed.

This is most easily demonstrated on the bywater demo machine [usernam and password are both koha].

Search for Harry Potter:

http://intranet.bywatersolutions.com/cgi-bin/koha/catalogue/search.pl?q=harry+potter

Click the check-box for the first search result ( Harry Potter and the Chamber of Secrets [videorecording] ... )

Click the 'Place hold' button, which will take you to the 'Confirm hold' screen (http://intranet.bywatersolutions.com/cgi-bin/koha/reserve/request.pl?biblionumbers=25778%2F&findborrower=&multi_hold=1)

Enter card number 55.

This takes you to a second 'Confirm hold' screen, showing a hold for 'Harry Potter and the Chamber of Secrets' for patron Bilbo Baggins (55)... no item information is viewable. (http://intranet.bywatersolutions.com/cgi-bin/koha/reserve/request.pl?biblionumber=25778)

By contrast, If I start at http://intranet.bywatersolutions.com/cgi-bin/koha/catalogue/search.pl?q=harry+potter, and click in to the first result page to see the details:

http://intranet.bywatersolutions.com/cgi-bin/koha/catalogue/detail.pl?biblionumber=25778&searchid=scs_1463601092892


Then click 'place hold' from the details screen, I am taken to
http://intranet.bywatersolutions.com/cgi-bin/koha/reserve/request.pl?biblionumber=25778&searchid=scs_1463601092892

Entering card number 55 at that point takes me to http://intranet.bywatersolutions.com/cgi-bin/koha/reserve/request.pl?biblionumber=25778 ... but this time item level information *is* available, and an item level hold can be placed.

Steps to replicate on your system:

1/ Search for an item with more than one search result
2/ Select an item, click 'Place hold'
3/ Enter a patron card number
4/ Note that item level holds are not available.
5/ Run the search again
6/ Click the title to see the detail page on the same bib.
7/ Enter the same patron card number
8/ Items now show on the page, and an item level hold can be placed.
Comment 1 Barton Chittenden 2016-05-18 20:14:38 UTC
16:11 < cait> barton: koha doesn't work as login fro me to check out your latest bug
16:13 < barton> ok, I'll check that.
16:13 < barton> thanks.
16:14 < barton> cait: sorry, it's bywater/bywater. I'll update the bug.
16:14 < cait> aah :)
Comment 2 Jonathan Druart 2016-05-22 09:37:03 UTC
It's by design, with multi holds the next available item is automatically selected.
I'd say this is more an enhancement request than a bug.
Comment 3 Katrin Fischer 2020-01-11 13:07:46 UTC
Maybe we could send the user to the normal holds page if only one record was selected?
Comment 4 Jonathan Druart 2020-01-13 10:24:19 UTC
Created attachment 97296 [details] [review]
Bug 16547: Do not display "multi holds" view if only one is selected

If a hold is selected from the result list, we should let the ability to
select an item-level hold.

Test plan:
I. Detail page
1/ Go to a bibliographic record detail page
2/ Click "Place hold"
3/ Select a patron
=> No change expected, you can select an item

II. Search result, multiple holds
1/ Search for an item with more than one search result
2/ Select several items, click 'Place hold'
3/ Enter a patron card number
=> No change expected, item level holds are not available.

III. Search result, single hold
1/ Search for an item with more than one search result
2/ Select only one item, click 'Place hold'
3/ Enter a patron card number
=> With this patch applied, item level hold is available. The screen is the same
as when you place a hold from the bibliographic record detail page
=> Without this patch you cannot place an item-level hold

QA notes: We could go a bit further and remove the 2 biblionumbers and
biblionumber from hold script, as well as remove the checkMultiHold in
request.tt. We should not have a biblionumbers param that contain a list
of biblionumber separated by '/' but several biblionumber parameters
instead.

QA notes 2: About placerequest.pl, see bug 19618 comment 27.
Comment 5 David Nind 2020-02-17 09:58:58 UTC
Patch no longer applies.
Comment 6 Jonathan Druart 2020-02-17 10:21:37 UTC
Created attachment 99072 [details] [review]
Bug 16547: Do not display "multi holds" view if only one is selected

If a hold is selected from the result list, we should let the ability to
select an item-level hold.

Test plan:
I. Detail page
1/ Go to a bibliographic record detail page
2/ Click "Place hold"
3/ Select a patron
=> No change expected, you can select an item

II. Search result, multiple holds
1/ Search for an item with more than one search result
2/ Select several items, click 'Place hold'
3/ Enter a patron card number
=> No change expected, item level holds are not available.

III. Search result, single hold
1/ Search for an item with more than one search result
2/ Select only one item, click 'Place hold'
3/ Enter a patron card number
=> With this patch applied, item level hold is available. The screen is the same
as when you place a hold from the bibliographic record detail page
=> Without this patch you cannot place an item-level hold

QA notes: We could go a bit further and remove the 2 biblionumbers and
biblionumber from hold script, as well as remove the checkMultiHold in
request.tt. We should not have a biblionumbers param that contain a list
of biblionumber separated by '/' but several biblionumber parameters
instead.

QA notes 2: About placerequest.pl, see bug 19618 comment 27.
Comment 7 David Nind 2020-02-17 18:33:58 UTC
Created attachment 99121 [details] [review]
Bug 16547: Do not display "multi holds" view if only one is selected

If a hold is selected from the result list, we should let the ability to
select an item-level hold.

Test plan:
I. Detail page
1/ Go to a bibliographic record detail page
2/ Click "Place hold"
3/ Select a patron
=> No change expected, you can select an item

II. Search result, multiple holds
1/ Search for an item with more than one search result
2/ Select several items, click 'Place hold'
3/ Enter a patron card number
=> No change expected, item level holds are not available.

III. Search result, single hold
1/ Search for an item with more than one search result
2/ Select only one item, click 'Place hold'
3/ Enter a patron card number
=> With this patch applied, item level hold is available. The screen is the same
as when you place a hold from the bibliographic record detail page
=> Without this patch you cannot place an item-level hold

QA notes: We could go a bit further and remove the 2 biblionumbers and
biblionumber from hold script, as well as remove the checkMultiHold in
request.tt. We should not have a biblionumbers param that contain a list
of biblionumber separated by '/' but several biblionumber parameters
instead.

QA notes 2: About placerequest.pl, see bug 19618 comment 27.

Signed-off-by: David Nind <david@davidnind.com>
Comment 8 Jonathan Druart 2020-03-27 11:51:32 UTC
Created attachment 101992 [details] [review]
Bug 16547: Do not display "multi holds" view if only one is selected

If a hold is selected from the result list, we should let the ability to
select an item-level hold.

Test plan:
I. Detail page
1/ Go to a bibliographic record detail page
2/ Click "Place hold"
3/ Select a patron
=> No change expected, you can select an item

II. Search result, multiple holds
1/ Search for an item with more than one search result
2/ Select several items, click 'Place hold'
3/ Enter a patron card number
=> No change expected, item level holds are not available.

III. Search result, single hold
1/ Search for an item with more than one search result
2/ Select only one item, click 'Place hold'
3/ Enter a patron card number
=> With this patch applied, item level hold is available. The screen is the same
as when you place a hold from the bibliographic record detail page
=> Without this patch you cannot place an item-level hold

QA notes: We could go a bit further and remove the 2 biblionumbers and
biblionumber from hold script, as well as remove the checkMultiHold in
request.tt. We should not have a biblionumbers param that contain a list
of biblionumber separated by '/' but several biblionumber parameters
instead.

QA notes 2: About placerequest.pl, see bug 19618 comment 27.

Signed-off-by: David Nind <david@davidnind.com>
Comment 9 Nick Clemens 2020-03-27 13:06:37 UTC
Created attachment 102002 [details] [review]
Bug 16547: Do not display "multi holds" view if only one is selected

If a hold is selected from the result list, we should let the ability to
select an item-level hold.

Test plan:
I. Detail page
1/ Go to a bibliographic record detail page
2/ Click "Place hold"
3/ Select a patron
=> No change expected, you can select an item

II. Search result, multiple holds
1/ Search for an item with more than one search result
2/ Select several items, click 'Place hold'
3/ Enter a patron card number
=> No change expected, item level holds are not available.

III. Search result, single hold
1/ Search for an item with more than one search result
2/ Select only one item, click 'Place hold'
3/ Enter a patron card number
=> With this patch applied, item level hold is available. The screen is the same
as when you place a hold from the bibliographic record detail page
=> Without this patch you cannot place an item-level hold

QA notes: We could go a bit further and remove the 2 biblionumbers and
biblionumber from hold script, as well as remove the checkMultiHold in
request.tt. We should not have a biblionumbers param that contain a list
of biblionumber separated by '/' but several biblionumber parameters
instead.

QA notes 2: About placerequest.pl, see bug 19618 comment 27.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 10 Martin Renvoize 2020-04-06 09:58:02 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 11 Jonathan Druart 2020-04-08 13:48:31 UTC
Created attachment 102570 [details] [review]
Bug 16547: Remove more multi_holds inconsistencies

There was a bug, on the biblio's hold list view, if the pickup library
was changed, the next screen was "place a hold for no title"

http://pro.kohadev.org/cgi-bin/koha/reserve/request.pl?multi_hold=1&biblionumbers=

https://bugs.koha-community.org/show_bug.cgi?id=24547
Comment 12 Jonathan Druart 2020-04-08 13:49:28 UTC
Created attachment 102571 [details] [review]
Bug 16547: Remove more multi_holds inconsistencies

There was a bug, on the biblio's hold list view, if the pickup library
was changed, the next screen was "place a hold for no title"

http://pro.kohadev.org/cgi-bin/koha/reserve/request.pl?multi_hold=1&biblionumbers=
Comment 13 Andrew Fuerste-Henry 2020-04-08 14:18:14 UTC
Quick test plan for Jonathan's patch:
1 perform search that returns multiple titles
2 select two titles and click Place Hold from results page
3 select patron
4 change pickup location, click Place Hold
5 get taken to page that says "Place hold on No Title"
6 look at the two titles you'd meant to place holds on -- holds do place, but we don't get any confirmation screen

7 apply patch
8 repeat steps 1-4
9 get taken to Confirm Holds page that lists the titles on which you just placed holds
Comment 14 Andrew Fuerste-Henry 2020-04-08 14:19:07 UTC
Created attachment 102573 [details] [review]
Bug 16547: Remove more multi_holds inconsistencies

There was a bug, on the biblio's hold list view, if the pickup library
was changed, the next screen was "place a hold for no title"

http://pro.kohadev.org/cgi-bin/koha/reserve/request.pl?multi_hold=1&biblionumbers=

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 15 Nick Clemens 2020-04-09 10:04:07 UTC
Created attachment 102608 [details] [review]
Bug 16547: Remove more multi_holds inconsistencies

There was a bug, on the biblio's hold list view, if the pickup library
was changed, the next screen was "place a hold for no title"

http://pro.kohadev.org/cgi-bin/koha/reserve/request.pl?multi_hold=1&biblionumbers=

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 16 Jonathan Druart 2020-04-09 10:55:00 UTC
Thanks Andrew and Nick!
Comment 17 Joy Nelson 2020-04-28 21:36:21 UTC
enhancement no backported to 19.11.x
Comment 18 Martin Renvoize 2020-05-11 13:01:07 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 19 Christopher Brannon 2021-02-23 00:02:36 UTC
Jonathan,
Can the work you've done here be applied to the cart?  If so, I could create a ticket suggesting that enhancement.
Comment 20 Jonathan Druart 2021-03-01 08:26:54 UTC
(In reply to Christopher Brannon from comment #19)
> Jonathan,
> Can the work you've done here be applied to the cart?  If so, I could create
> a ticket suggesting that enhancement.

What exactly? I have tested on master and I see the item info for a single hold and the "multi holds view" if more than 1 is selected.