Bug 25877 - [19.11] Error libraryNotPickupLocation when placing a hold if logged in branchcode is not a pickup location
Summary: [19.11] Error libraryNotPickupLocation when placing a hold if logged in branc...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: 19.11
Hardware: All All
: P5 - low normal (vote)
Assignee: Kyle M Hall
QA Contact: Alex Arnaud
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-25 11:13 UTC by Kyle M Hall
Modified: 2021-12-13 21:08 UTC (History)
4 users (show)

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


Attachments
Bug 25877: Error libraryNotPickupLocation when placing a hold if logged in branchcode is not a pickup location (1.63 KB, patch)
2020-06-25 11:15 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 25877: Error libraryNotPickupLocation when placing a hold if logged in branchcode is not a pickup location (1.68 KB, patch)
2020-06-25 13:47 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 25877: Error libraryNotPickupLocation when placing a hold if logged in branchcode is not a pickup location (1.75 KB, patch)
2020-06-25 16:54 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 25877: Error libraryNotPickupLocation when placing a hold if logged in branchcode is not a pickup location (1.80 KB, patch)
2020-08-29 10:40 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2020-06-25 11:13:42 UTC
On the staff side, if the librarian is logged in as a branch that is not a hold pickup location, that branch is still used as the default pickup location for the rules, resulting in the item not holdable reason libraryNotPickupLocation, while the pulldown shows the first branch that can actually be used as a pickup location.
Comment 1 Kyle M Hall 2020-06-25 11:15:53 UTC
Created attachment 106287 [details] [review]
Bug 25877: Error libraryNotPickupLocation when placing a hold if logged in branchcode is not a pickup location

On the staff side, if the librarian is logged in as a branch that is not a hold pickup location, that branch is still used as the default pickup location for the rules, resulting in the item not holdable reason libraryNotPickupLocation, while the pulldown shows the first branch that can actually be used as a pickup location.

Test Plan:
1) Log in to Koha
2) Set your logged in branch to not be a pickup location
3) Attempt to place a hold
4) Note the error message
5) Apply this patch
6) Restart plack
7) Reload the page
8) Note the error is gone!
Comment 2 Kyle M Hall 2020-06-25 11:19:42 UTC
I should note, this bug does not present in master. I think it was fixed by bug 22284 though I have not proven it.
Comment 3 Andrew Fuerste-Henry 2020-06-25 13:47:51 UTC
Created attachment 106292 [details] [review]
Bug 25877: Error libraryNotPickupLocation when placing a hold if logged in branchcode is not a pickup location

On the staff side, if the librarian is logged in as a branch that is not a hold pickup location, that branch is still used as the default pickup location for the rules, resulting in the item not holdable reason libraryNotPickupLocation, while the pulldown shows the first branch that can actually be used as a pickup location.

Test Plan:
1) Log in to Koha
2) Set your logged in branch to not be a pickup location
3) Attempt to place a hold
4) Note the error message
5) Apply this patch
6) Restart plack
7) Reload the page
8) Note the error is gone!

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 4 ByWater Sandboxes 2020-06-25 16:54:59 UTC
Created attachment 106310 [details] [review]
Bug 25877: Error libraryNotPickupLocation when placing a hold if logged in branchcode is not a pickup location

On the staff side, if the librarian is logged in as a branch that is not a hold pickup location, that branch is still used as the default pickup location for the rules, resulting in the item not holdable reason libraryNotPickupLocation, while the pulldown shows the first branch that can actually be used as a pickup location.

Test Plan:
1) Log in to Koha
2) Set your logged in branch to not be a pickup location
3) Attempt to place a hold
4) Note the error message
5) Apply this patch
6) Restart plack
7) Reload the page
8) Note the error is gone!

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

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Comment 5 Katrin Fischer 2020-06-28 22:26:21 UTC
I have done the following:
- I have changed Centerville to be 'no pickup location' in the library configuration
- My staff patron has home library Centerville and that was also my logged in library
- When I try to place a hold, Centerville is not in the pickup location list, but there is also no error. I can place holds with other pickup locations without an error.

What am I missing? I was testing on latest 19.11.x
Comment 6 Kyle M Hall 2020-07-01 17:48:52 UTC
Just tested on 19.11.x, the problem still exists: https://monosnap.com/file/gbped1dKxSpMy7LU9Lz10lZHjXHrmw

(In reply to Katrin Fischer from comment #5)
> I have done the following:
> - I have changed Centerville to be 'no pickup location' in the library
> configuration
> - My staff patron has home library Centerville and that was also my logged
> in library
> - When I try to place a hold, Centerville is not in the pickup location
> list, but there is also no error. I can place holds with other pickup
> locations without an error.
> 
> What am I missing? I was testing on latest 19.11.x
Comment 7 Katrin Fischer 2020-07-02 06:41:01 UTC
I didn't see that red message - any other pref or so I might need to toggle?
Comment 8 Alex Arnaud 2020-07-03 13:39:02 UTC
libraryNotPickupLocation red message disapears and we only have pickup location libraries in the list => Ok

Just a specific case:
If i set all my libraries as "no pickup location", i have no error message, an empty pickup location list and i can place a hold.

I agree that it's a very specific case and not likely to happen. But can you technically accept a hold without pickup location ?

What's your opinion on this ?
Comment 9 Kyle M Hall 2020-07-06 11:31:31 UTC
(In reply to Alex Arnaud from comment #8)
> libraryNotPickupLocation red message disapears and we only have pickup
> location libraries in the list => Ok
> 
> Just a specific case:
> If i set all my libraries as "no pickup location", i have no error message,
> an empty pickup location list and i can place a hold.
> 
> I agree that it's a very specific case and not likely to happen. But can you
> technically accept a hold without pickup location ?
> 
> What's your opinion on this ?

I think that would make a good bug report on its own. If no libraries are set as pickup locations, it makes sense to me to hide the holds tab altogether, or at the very least, disallow holds to be placed so long as there are no pickup locations.
Comment 10 Alex Arnaud 2020-07-10 08:04:56 UTC
(In reply to Kyle M Hall from comment #9)

> I think that would make a good bug report on its own. If no libraries are
> set as pickup locations, it makes sense to me to hide the holds tab
> altogether, or at the very least, disallow holds to be placed so long as
> there are no pickup locations.

Why not just keep the "libraryNotPickupLocation" red message in this case ?
IMO that could be done more quickly.
Comment 11 Kyle M Hall 2020-07-13 13:39:35 UTC
(In reply to Alex Arnaud from comment #10)
> (In reply to Kyle M Hall from comment #9)
> 
> > I think that would make a good bug report on its own. If no libraries are
> > set as pickup locations, it makes sense to me to hide the holds tab
> > altogether, or at the very least, disallow holds to be placed so long as
> > there are no pickup locations.
> 
> Why not just keep the "libraryNotPickupLocation" red message in this case ?
> IMO that could be done more quickly.

Because in that scenario, there are no libraries in the pulldown, so stating "this library is not a pickup location" doesn't really make sense. There is no library.
Comment 12 Katrin Fischer 2020-08-29 10:40:50 UTC
Created attachment 109291 [details] [review]
Bug 25877: Error libraryNotPickupLocation when placing a hold if logged in branchcode is not a pickup location

On the staff side, if the librarian is logged in as a branch that is not a hold pickup location, that branch is still used as the default pickup location for the rules, resulting in the item not holdable reason libraryNotPickupLocation, while the pulldown shows the first branch that can actually be used as a pickup location.

Test Plan:
1) Log in to Koha
2) Set your logged in branch to not be a pickup location
3) Attempt to place a hold
4) Note the error message
5) Apply this patch
6) Restart plack
7) Reload the page
8) Note the error is gone!

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

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Katrin Fischer 2020-08-29 10:46:52 UTC
Retested with success on a clean 19.11.x branch. I agree that the behaviour for all libraries set to be no pickup location could be handled separately so we can have this as a fix for the stable branches first. I filed:
Bug 26319 - Disable holds when all libraries are set to be no pickup-location
Comment 14 Jonathan Druart 2020-08-31 08:50:42 UTC
Sending to 19.11 queue.