Main Koha release repository
https://koha-community.org
f5d89a41ed
GetOtherReserves attempts to set the waiting/transit status for the next hold on the list when applicable, but in practice it either leaves the hold state unchanged, or sets the itemnumber without setting the found status (erroneously converting bib-level holds to item-level holds). The latter situation only occurs when the user has been prompted to confirm, cancel, or revert the hold, and is able to ignore the prompt. In those situations, the hold's state should not change. GetOtherReserves does not need to change the hold state, and it does not do so correctly. Besides that, it does not do much other than call CheckReserves, and is only used in 3 places. This patch removes GetOtherReserves, and refactors returns.pl and C4::Reserves::ModReserveCancelAll to call CheckReserves directly instead. To test: 1. Place 2 bib-level holds for 2 different patrons (Patron A and Patron B) on the same record, both for pickup at the logged-in library 2. Check in an item from that record to fill Patron A's hold 3. Set the hold's expiration date to yesterday by accessing the database in the command line: - In a ktd shell prompt, open the db client with koha-mysql kohadev - UPDATE reserves SET expirationdate = DATE_SUB(CURDATE(), INTERVAL 1 DAY) WHERE borrowernumber = <Patron A's borrowernumber> 4. Go to Circulation > Holds Awaiting Pickup, and find the hold in the "holds waiting past their expiration date" tab 5. Click the "Cancel hold" button in the Actions column next to the hold (do not check in the book) 6. Return to the bib record and look at Patron B's hold --> Note that Patron B's hold is now an item-level hold and does not have a waiting status 7. Cancel Patron B's hold 8. Place 2 new holds on the record: one for Patron A at the logged-in library, and one for Patron B at a different library 9. Check in an item to fill Patron A's hold 10. Repeat steps 3-5 to expire and cancel Patron A's hold 11. Return to the Holds tab of the bib record and look at Patron B's hold --> Note that Patron B's hold is now an item-level hold, and there is no "Revert transit status" button 12. Place 2 bib-level holds for 2 different patrons (Patron A and Patron B) on the same record, both for pickup at the logged-in library 13. Check in an item from that record to fill Patron A's hold 14. Check in the same item again. A modal will pop up, saying that the hold is already waiting 15. In the modal, choose a cancellation reason and click "Cancel hold" --> A new modal will pop up to fill Patron B's hold 16. Click "Ignore" on the modal for Patron B's hold 17. Return to the bib record and look at Patron B's hold --> Note that Patron B's hold is now an item-level hold and does not have a waiting status 18. Apply patch 19. Repeat steps 1-6 --> Note that Patron B's hold is still a bib-level/"next available" hold 20. Repeat steps 7-11 --> Note that Patron B's hold is still a bib-level/"next available" hold 21. Repeat steps 12-17 --> Note that Patron B's hold is still a bib-level/"next available" hold Make sure correct behavior is unchanged: 22. Cancel Patron B's hold 23. Place 2 new holds on the record: one for Patron A at the logged-in library, and one for Patron B at a different library 24. Check in an item from that record to fill Patron A's hold 25. Check in the same item again. A modal will pop up, saying that the hold is already waiting 26. In the modal, choose a cancellation reason and click "Cancel hold" --> A new modal will pop up to fill Patron B's hold 27. Click "Print slip, transfer, and confirm" on the modal for Patron B's hold --> Confirm that the information on the slip is correct --> Confirm that the hold is correctly put in transit 22. Set HoldsAutoFill and HoldsAutoFillPrintSlip to "Do" 23. Place a bib-level hold for the logged-in library 24. Check in an item from that bib --> Confirm the information on the slip is correct --> Confirm the hold is correctly assigned and set to waiting 25. Place a bib-level hold for a different library 26. Check in an item from that bib --> Confirm the information on the slip is correct --> Confirm the hold is correctly put in transit 27. Change the logged-in branch to match the hold pickup location 28. Check the item in --> Confirm the information on the slip is correct --> Confirm the hold is correctly assigned and set to waiting 29. Repeat steps 22-26 --> Confirm a correct hold slip pops up for Patron B's hold --> Confirm that Patron B's hold is correctly put in transit 30. Cancel Patron B's hold 31. Place 2 bib-level holds for 2 different patrons (Patron A and Patron B) on the same record, both for pickup at the logged-in library 33. Repeat steps 24-26 --> Confirm a correct hold slip pops up for Patron B's hold --> Confirm Patron B's hold is correctly set to Waiting 34. Prove t/db_dependent/Circulation.t 35. Prove t/db_dependent/Koha/Holds.t --> Tests pass Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> (cherry picked from commit |
||
---|---|---|
acqui | ||
admin | ||
api | ||
authorities | ||
basket | ||
bin | ||
C4 | ||
catalogue | ||
cataloguing | ||
circ | ||
clubs | ||
course_reserves | ||
debian | ||
docs | ||
erm | ||
errors | ||
etc | ||
ill | ||
installer | ||
Koha | ||
koha-tmpl | ||
labels | ||
lib/CGI/Session/Serialize | ||
members | ||
misc | ||
offline_circ | ||
opac | ||
patron_lists | ||
patroncards | ||
plugins | ||
pos | ||
recalls | ||
reports | ||
reserve | ||
reviews | ||
rotating_collections | ||
serials | ||
services | ||
skel | ||
suggestion | ||
svc | ||
t | ||
tags | ||
tools | ||
virtualshelves | ||
xt | ||
.editorconfig | ||
.eslintrc.json | ||
.gitignore | ||
.htaccess | ||
.mailmap | ||
.perlcriticrc | ||
.perltidyrc | ||
.proverc.dist | ||
.stylelintrc.json | ||
about.pl | ||
app.psgi | ||
build-resources.PL | ||
changelanguage.pl | ||
cpanfile | ||
cypress.json | ||
fix-perl-path.PL | ||
gulpfile.js | ||
help.pl | ||
INSTALL | ||
Koha.pm | ||
kohaversion.pl | ||
LICENSE | ||
mainpage.pl | ||
Makefile.PL | ||
MANIFEST.SKIP | ||
package.json | ||
README | ||
README.md | ||
README.robots | ||
rewrite-config.PL | ||
tsconfig.json | ||
webpack.config.js | ||
yarn.lock |
Koha is a free software integrated library system (ILS).
Koha is distributed under the GNU GPL version 3 or later.
Note: Koha does not accept pull requests from git hosting sites.
Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.
For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch
The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook