Bug 27885 - Populate biblionumbers parameter when placing hold on single title
Summary: Populate biblionumbers parameter when placing hold on single title
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Kyle M Hall
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-05 17:32 UTC by Nick Clemens
Modified: 2022-06-06 20:24 UTC (History)
10 users (show)

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


Attachments
Bug 27885: Populate biblionumbers parameter using biblionumbers array (1.70 KB, patch)
2021-03-05 17:36 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 27885: Populate biblionumbers parameter using biblionumbers array (1.77 KB, patch)
2021-03-05 17:54 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 27885: Populate biblionumbers parameter using biblionumbers array (1.83 KB, patch)
2021-05-11 10:18 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 27885: (follow-up) Use biblionumbers instead of biblionumber in form action for club search (1.45 KB, patch)
2021-05-26 12:18 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 27885: Populate biblionumbers parameter using biblionumbers array (1.90 KB, patch)
2021-07-23 14:23 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 27885: (follow-up) Use biblionumbers instead of biblionumber in form action for club search (1.52 KB, patch)
2021-07-23 14:23 UTC, Kyle M Hall
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-03-05 17:32:01 UTC
On the staff client, when placing a hold on a single title, after selecting a patron the URL is:
http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumbers=

The parameter 'biblionumbers' is not populated from a single title
Comment 1 Nick Clemens 2021-03-05 17:36:01 UTC
Created attachment 117870 [details] [review]
Bug 27885: Populate biblionumbers parameter using biblionumbers array

Currently we send $biblionumbers as the parameter, but this is just apassthrough form when a list of biblios is selected for placing a hold

If passed a single biblionumber we push it into @biblionumbers and use that for building the biblio loop

This patch uses @biblionumbers to avoid sending a blank variable in the URL

To test:
1 - On the staff client click 'place hold' for an individual record
2 - Use the form to find a patron
3 - Note the url is:
    http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumbers=
4 - Apply patch
5 - Repeat
6 - The url is now like:
    http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumbers=248
    (but with whatever biblionumber you chose)
7 - Perform a search and select multiple biblios and confirm you can place holds as before
Comment 2 Andrew Fuerste-Henry 2021-03-05 17:54:27 UTC
Created attachment 117871 [details] [review]
Bug 27885: Populate biblionumbers parameter using biblionumbers array

Currently we send $biblionumbers as the parameter, but this is just apassthrough form when a list of biblios is selected for placing a hold

If passed a single biblionumber we push it into @biblionumbers and use that for building the biblio loop

This patch uses @biblionumbers to avoid sending a blank variable in the URL

To test:
1 - On the staff client click 'place hold' for an individual record
2 - Use the form to find a patron
3 - Note the url is:
    http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumbers=
4 - Apply patch
5 - Repeat
6 - The url is now like:
    http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumbers=248
    (but with whatever biblionumber you chose)
7 - Perform a search and select multiple biblios and confirm you can place holds as before

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 3 Katrin Fischer 2021-03-06 12:00:12 UTC
For a single hold I end up with:
http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumbers=114/

For multiple holds with: 
http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumbers=262%2F13%2F&findborrower=&club=

Is the / for the single biblionumber intended and the differences in encoding?
Comment 4 Nick Clemens 2021-05-06 13:12:04 UTC
(In reply to Katrin Fischer from comment #3)
> For a single hold I end up with:
> http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumbers=114/
> 
> For multiple holds with: 
> http://localhost:8081/cgi-bin/koha/reserve/request.
> pl?biblionumbers=262%2F13%2F&findborrower=&club=
> 
> Is the / for the single biblionumber intended and the differences in
> encoding?

The case I am fixing here is - Placing hold from details/holds tab, but it does seem to clear some trailing slashes in other places.

There does seem to be an issue with placing holds on multiple bibs for clubs

BEFORE PATCH

Placing holds from results:
Single biblio:
 -On patron/club search screen:
  http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumbers=248%2F&findborrower=&club=
 -After selecting patron:
  http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumber=248/
 -After selecting club:
  http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumber=248

Multiple biblios:
 -On patron/club search screen:
  http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumbers=248%2F310%2F&findborrower=&club=
 -After selecting patron:
  http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumbers=248/310/
 -After selecting club:
  http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumber=310 (something going on with ability to place holds, ignore for now)

Placing hold on single bib from the details page/holds tab
 -On patron/club search screen:
  http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumber=248&searchid=scs_1620306233111
 -After selecting patron:
  http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumbers=
 -After selecting club:
  http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumber=248


AFTER PATCH AND RESTART

Placing holds from results:
Single biblio:
 -On patron/club search screen:
  http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumbers=248%2F&findborrower=&club=
 -After selecting patron:
  http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumbers=248
 -After selecting club:
  http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumber=248

Multiple biblios:
 -On patron/club search screen:
  http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumbers=248%2F310%2F&findborrower=&club=
 -After selecting patron:
  http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumbers=248/310
 -After selecting club:
  http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumber=310 (something going on with ability to place holds, ignore for now)

Placing hold on single bib from the details page/holds tab
 -On patron/club search screen:
  http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumber=248&searchid=scs_1620306452277
 -After selecting patron:
  http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumbers=248
 -After selecting club:
  http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumber=248
Comment 5 Katrin Fischer 2021-05-10 21:26:23 UTC
Hi Nick, from your last comment#, should this be FQA (as in: Needs more work)? You mention an issue with multi-holds for clubs.

I doesn't apply, the conflict looks simple, but setting this one step back to get confirmation.
Comment 6 Nick Clemens 2021-05-11 10:18:59 UTC
Created attachment 120831 [details] [review]
Bug 27885: Populate biblionumbers parameter using biblionumbers array

Currently we send $biblionumbers as the parameter, but this is just apassthrough form when a list of biblios is selected for placing a hold

If passed a single biblionumber we push it into @biblionumbers and use that for building the biblio loop

This patch uses @biblionumbers to avoid sending a blank variable in the URL

To test:
1 - On the staff client click 'place hold' for an individual record
2 - Use the form to find a patron
3 - Note the url is:
    http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumbers=
4 - Apply patch
5 - Repeat
6 - The url is now like:
    http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumbers=248
    (but with whatever biblionumber you chose)
7 - Perform a search and select multiple biblios and confirm you can place holds as before

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 7 Nick Clemens 2021-05-11 10:19:48 UTC
(In reply to Katrin Fischer from comment #5)
> Hi Nick, from your last comment#, should this be FQA (as in: Needs more
> work)? You mention an issue with multi-holds for clubs.
> 
> I doesn't apply, the conflict looks simple, but setting this one step back
> to get confirmation.

This should be good to move forward - the problems you mentioned and the one I found exist before the patch, the patch fixes the cases it is targeting
Comment 8 Nick Clemens 2021-05-26 12:18:35 UTC
Created attachment 121425 [details] [review]
Bug 27885: (follow-up) Use biblionumbers instead of biblionumber in form action for club search

This simply matches the code on the patrons search tab
Comment 9 Nick Clemens 2021-05-26 12:26:17 UTC
(In reply to Nick Clemens from comment #7)
> (In reply to Katrin Fischer from comment #5)
> > Hi Nick, from your last comment#, should this be FQA (as in: Needs more
> > work)? You mention an issue with multi-holds for clubs.
> > 
> > I doesn't apply, the conflict looks simple, but setting this one step back
> > to get confirmation.
> 
> This should be good to move forward - the problems you mentioned and the one
> I found exist before the patch, the patch fixes the cases it is targeting

Turns out it was just the action link the form being weird, functionality was not affected
Comment 10 Kyle M Hall 2021-07-23 14:23:43 UTC
Created attachment 123119 [details] [review]
Bug 27885: Populate biblionumbers parameter using biblionumbers array

Currently we send $biblionumbers as the parameter, but this is just apassthrough form when a list of biblios is selected for placing a hold

If passed a single biblionumber we push it into @biblionumbers and use that for building the biblio loop

This patch uses @biblionumbers to avoid sending a blank variable in the URL

To test:
1 - On the staff client click 'place hold' for an individual record
2 - Use the form to find a patron
3 - Note the url is:
    http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumbers=
4 - Apply patch
5 - Repeat
6 - The url is now like:
    http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumbers=248
    (but with whatever biblionumber you chose)
7 - Perform a search and select multiple biblios and confirm you can place holds as before

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 11 Kyle M Hall 2021-07-23 14:23:56 UTC
Created attachment 123120 [details] [review]
Bug 27885: (follow-up) Use biblionumbers instead of biblionumber in form action for club search

This simply matches the code on the patrons search tab

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 12 Jonathan Druart 2021-07-26 09:23:48 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 13 Kyle M Hall 2021-07-30 14:26:52 UTC
Pushed to 21.05.x for 21.05.03
Comment 14 Fridolin Somers 2021-08-03 02:38:33 UTC
Pushed to 20.11.x for 20.11.09
Comment 15 Victor Grousset/tuxayo 2021-08-16 18:52:55 UTC
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.