Description
Kyle M Hall (khall)
2020-06-25 11:13:42 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! I should note, this bug does not present in master. I think it was fixed by bug 22284 though I have not proven it. 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> 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> 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 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 I didn't see that red message - any other pref or so I might need to toggle? 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 ? (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. (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. (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. 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> 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 Sending to 19.11 queue. |