Summary: | Due date to on-site loans according to the calendar and possibility to renew on-site loans | ||
---|---|---|---|
Product: | Koha | Reporter: | Inkeri Hakulinen <inkeri.hakulinen+bugz> |
Component: | Circulation | Assignee: | Lari Taskula <lari.taskula> |
Status: | ASSIGNED --- | QA Contact: | Testopia <testopia> |
Severity: | new feature | ||
Priority: | P5 - low | CC: | gmcharlt, joonas.kylmala, kyle.m.hall, lari.taskula, magnus, michael.hafen, severine.queune |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | Sponsored | Patch complexity: | Medium patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 26814 | ||
Bug Blocks: | |||
Attachments: |
Bug 24101: Enable renewals for on-site checkouts
Bug 24101: (OLD CIRC RULES GUI) Add circulation rule onsite_renewalsallowed Bug 24101: Enable renewals for on-site checkouts Bug 24101: Enable renewals for on-site checkouts Bug 24101: Enable renewals for on-site checkouts Bug 24101: Calculate on-site checkouts due date via circulation rules |
Description
Inkeri Hakulinen
2019-11-25 08:48:35 UTC
Created attachment 102091 [details] [review] Bug 24101: Enable renewals for on-site checkouts To test: 1. Enable system preference OnSiteCheckouts 2. Set onsite_renewalsallowed circulation rule (regardless the choice of GUI) by executing the following command on your Koha instance's shell RENEWS=0; perl -e 'use Koha::CirculationRules; '\ 'Koha::CirculationRules->set_rule({ branchcode => undef, categorycode => undef,'\ 'itemtype => undef, rule_name => "onsite_renewalsallowed", rule_value => '\ "$RENEWS"' });' 3. Perform an on-site checkout 4. Try to renew the loan 5. Observe a similar error dialog: "Cannot renew on-site checkout: test / ( test ) has been renewed the maximum number of times by ( admin )" 6. Execute the following shell command RENEWS=1; perl -e 'use Koha::CirculationRules; '\ 'Koha::CirculationRules->set_rule({ branchcode => undef, categorycode => undef,'\ 'itemtype => undef, rule_name => "onsite_renewalsallowed", rule_value => '\ "$RENEWS"' });' 7. Try to renew the loan 8. Observe success 9. Try to renew the loan 10. Observe the step 5 error dialog Run unit tests: 1. prove t/db_dependent/Circulation.t 2. prove t/db_dependent/OnSiteCheckouts.t Created attachment 102092 [details] [review] Bug 24101: (OLD CIRC RULES GUI) Add circulation rule onsite_renewalsallowed For current testing purposes this patch adds onsite renewals count to circulation rules page. We plan to block Bug 24101 by Bug 15522, so this patch will eventually be dropped. Initially I was thinking of duplicating the rules of normal circulation the way maxissueqty and maxonsiteissueqty is currently done, but in the end this would lead to duplicating almost all of the circulation rules. That would not be very convenient and it seems like a short-sighted way of solving this problem because it leaves no room for possible new types of checkouts in the future. Who wants to see the circulation rule table doubling in width? Not me. Another, more elegant approach would be to define a new circulation rule scope "circulationtype" that defines whether a rule applies to normal or on-site checkout (or any other type of checkout someone may come up with in the future). Now that we are able to explicitly define a scope that a specific circulation rule follows, this would make sense. No need for ugly duplication and we can get rid of maxonsiteissueqty too. In addition to Inkeri's original comment - there needs to be a way to define separate rules regarding fines between normal and on-site checkouts. (In reply to Inkeri Hakulinen from comment #0) > We have reading rooms, where patrons can have their on-site loans available > for them for a long time - even a year or more! (That is, if no one else > needs that item in the meanwhile, and makes a hold for it.) We wish to be > able to distinguish the on-site loans from the checkouts they take home. The > on-site option is good for this, because it shows clearly to the patrons and > to the staff that the loans are on-site. However, we need two improvements > to Koha for this. > How are item types handled between on-site and take home? Is the item type ignored in favor of a check-box on the check-out screen? If item type is factored into this, would setting the rules by item type be a solution? Though that would increase the row count in the issue rules table. In that case having the "All" circulation type would make sense, but in practice I expect the take home and on-site circulation rules rarely are the same. Created attachment 103254 [details] [review] Bug 24101: Enable renewals for on-site checkouts To test: 1. Enable system preference OnSiteCheckouts 2. Set renewalsallowed circulation rule for on-site checkouts via circulation rules interface 3. Perform an on-site checkout 4. Try to renew the loan 5. Observe a similar error dialog: "Cannot renew on-site checkout: test / ( test ) has been renewed the maximum number of times by ( admin )" Run unit tests: 1. prove t/db_dependent/Circulation.t Created attachment 103337 [details] [review] Bug 24101: Enable renewals for on-site checkouts To test: 1. Enable system preference OnSiteCheckouts 2. Set renewalsallowed circulation rule for on-site checkouts via circulation rules interface to value 0 3. Perform an on-site checkout 4. Try to renew the loan 5. Observe a similar error dialog: "Cannot renew on-site checkout: test / ( test ) has been renewed the maximum number of times by ( admin )" 6. Set renewalsallowed circulation rule for on-site checkouts via circulation rules interface to value 0 7. Perform an on-site checkout 8. Try to renew the loan 9. Observe success Run unit tests: 1. prove t/db_dependent/Circulation.t Created attachment 104277 [details] [review] Bug 24101: Enable renewals for on-site checkouts To test: 1. Enable system preference OnSiteCheckouts 2. Set renewalsallowed circulation rule for on-site checkouts via circulation rules interface to value 0 3. Perform an on-site checkout 4. Try to renew the loan 5. Observe a similar error dialog: "Cannot renew on-site checkout: test / ( test ) has been renewed the maximum number of times by ( admin )" 6. Set renewalsallowed circulation rule for on-site checkouts via circulation rules interface to value 0 7. Perform an on-site checkout 8. Try to renew the loan 9. Observe success Run unit tests: 1. prove t/db_dependent/Circulation.t Created attachment 107617 [details] [review] Bug 24101: Calculate on-site checkouts due date via circulation rules To test: 1. Set circulation rules to both normal and on-site checkouts, define loan period explicitly and make it different for both types of checkouts 2. Checkout two items, one as normal checkout and one as an on-site checkout 3. Observe they follow your circulation rules Should this be "Needs signoff"? At the moment these patches don't apply: Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 24101: Enable renewals for on-site checkouts error: sha1 information is lacking or useless (C4/Circulation.pm). error: could not build fake ancestor Patch failed at 0001 Bug 24101: Enable renewals for on-site checkouts hint: Use 'git am --show-current-patch=diff' to see the failed patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-24101-Enable-renewals-for-on-site-checkouts-OjwApl.patch Lari, do you plan to continue here or should we switch to NEW? |