It would be great if there were a way to track whenever someone overrides a warning message in circulation. Whether it's ignoring a hold for someone or checking out even though the patron owes too much - any of the warnings with buttons listed here: http://manual.koha-community.org/3.12/en/circulation.html#checkoutwarn or here: http://manual.koha-community.org/3.12/en/checkingin.html#checkinmsg would be tracked.
*** Bug 21422 has been marked as a duplicate of this bug. ***
I'm trying to make a list of all possibilities where someone can override a restriction. I don't know if it's useful for a developer... Circulation -- Checking out - Check out an item that is age restricted (AgeRestrictionOverride syspref) - Check out an item that has a not for loan status (AllowNotForLoanOverride syspref) - Check out an item that has a lost status (IssueLostItem syspref) - Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) - Check out an item to a patron who is not allowed to borrow this item type - Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) - Check out an item on hold for someone else - Check out an item on hold ready for pickup by someone else - Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) - Check out to a patron who has restrictions Circulation -- Checking in - Ignore a hold upon check in - Ignore a hold & transfer upon check in Circulation -- Renewing - Renew an item on hold for someone else - Renew an item that has reached the maximum amount of renewals Holds - Place a hold for a patron who is not allowed to put this item type on hold - Place a hold for a patron who has reached the maximum amount of holds - Place an item-level hold when rules say this is not allowed
We are also very interested in this logging. Other things to consider in addition to Caroline's list, depending on how sysprefs are set: - Check out an item to a patron who has guarantee's who have unpaid fines (NoIssuesChargeGuarantees) - Check out an item to a patron who has overdues (OverduesBlockCirc) - Renew an item for a patron who has overdues (OverduesBlockRenewing) - Override circulation fine rules via "specify dute dute" Thanks for the attention on this enhancement! -Marti Fuerst, Huntsville-Madison County Public Library
As a consortia library, this would also be helpful for us. If we have librarians overriding restrictions (such as circulation rules), it can cause problems if the rules are for another library. Knowing which login is doing this would help track down what's going on.
Created attachment 149554 [details] [review] Bug 9762: Log circulation overrides This patch allows you to save commands that have been overridden by someone. To test: --After each step, a message will be display on the actionlog-- Circulation -- Checking out - Check out an item that is age restricted (AgeRestrictionOverride syspref) - Check out an item that has a not for loan status (AllowNotForLoanOverride syspref) - Check out an item that has a lost status (IssueLostItem syspref) - Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) - Check out an item to a patron who is not allowed to borrow this item type - Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) - Check out an item on hold for someone else - Check out an item on hold ready for pickup by someone else - Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) - Check out to a patron who has restrictions Circulation -- Checking in - Ignore a hold upon check in - Ignore a hold & transfer upon check in Circulation -- Renewing - Renew an item on hold for someone else - Renew an item that has reached the maximum amount of renewals Holds - Place a hold for a patron who is not allowed to put this item type on hold - Place a hold for a patron who has reached the maximum amount of holds - Place an item-level hold when rules say this is not allowed Signed-off-by: Solene Ngamga <solene.ngamga@inLibro.com>
Solene, Most of this is working and this will be a great addition! A few things though: -Do these strings need to translatable? -This is going to need unit tests.
(In reply to Lucas Gass from comment #7) > Solene, > > Most of this is working and this will be a great addition! A few things > though: > > -Do these strings need to translatable? > -This is going to need unit tests. The messages in action_logs are usually not translated, but they are also usually not sentences/text, but data changes in JSON and other machine friendly syntax. Could we use codes instead of plain text and then translate them on the action log viewer? This would make them translatable and we could also adjust the texts easier. I expected to find override in the descriptions or it being a new type of action. Maybe we could be a little bit clearer that these were all override actions.
Created attachment 156222 [details] [review] Bug 9762: Log circulation overrides This patch allows you to save commands that have been overridden by someone. The patch has been updated but is not yet completed. Tests 10, 13, 14, and 17 are still not functional. Tests 15 and 16 need to be fixed as they do not display the barcode. All other tests should be functional. To test: --After each step, a message will be displayed in the action_logs table and in Tools > Log viewer -- Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed
Created attachment 163847 [details] [review] Bug 9762: Log circulation overrides Rebase to master This patch allows you to save commands that have been overridden by someone. The patch has been updated but is not yet completed. Tests 10, 13, 14, and 17 are still not functional. Tests 15 and 16 need to be fixed as they do not display the barcode. All other tests should be functional. To test: --After each step, a message will be displayed in the action_logs table and in Tools > Log viewer -- Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed Current status: Failed QA
Created attachment 164022 [details] [review] Bug 9762: fix log for test 10 13 14 15 16 17 To test: --After each step, a message will be displayed in the action_logs table and in Tools > Log viewer -- Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed (In circulation rules put "On shelf holds allowed" to "If any unavailable")
Lots of issues here. 1. renew.pl now fails with this error: Could not compile /kohadevbox/koha/circ/renew.pl: Global symbol "$borrower" requires explicit package name (did you forget to declare "my $borrower"?) at /kohadevbox/koha/circ/renew.pl line 67. 2. Looks like some debugging code is leftover 3. request.pl has a whole block of code commented out starting with: # elsif ( C4::Context->preference('AllowHoldPolicyOverride') ){ 4. Why remove the check for "unless( $skip_record_index )" in AddRenewal? I think there are times when we want to skip indexing. 5. FAIL C4/Circulation.pm FAIL pod coverage POD is missing for CanBookBeReturned 6. FAIL circ/renew.pl WARN tidiness The file is less tidy than before (bad/messy lines before: 28, now: 44) FAIL valid Global symbol "$borrower" requires explicit package name (did you forget to declare "my $borrower"?) Global symbol "$issue" requires explicit package name (did you forget to declare "my $issue"?) Global symbol "$borrower" requires explicit package name (did you forget to declare "my $borrower"?) Global symbol "$borrower" requires explicit package name (did you forget to declare "my $borrower"?) Global symbol "$borrower" requires explicit package name (did you forget to declare "my $borrower"?) Global symbol "$borrower" requires explicit package name (did you forget to declare "my $borrower"?) circ/renew.pl had compilation errors. 7. Changes to CanBookBeIssued and AddRenewal probably need test coverage.
Created attachment 164067 [details] [review] Bug 9762: Log circulation overrides This patch allows you to save commands that have been overridden by someone. The patch has been updated but is not yet completed. Tests 10, 13, 14, and 17 are still not functional. Tests 15 and 16 need to be fixed as they do not display the barcode. All other tests should be functional. To test: --After each step, a message will be displayed in the action_logs table and in Tools > Log viewer -- Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed (In circulation rules put "On shelf holds allowed" to "If any unavailable") In this patch I smatch my log fix and tideness fix. I will make another patch for the new test. Current status: Failed QA
For the "skip_record_index" I don't now why Emily deleted this code but I thing we need this code so I put it back. Tell me if it's good??
And I will make a new patch for test Circulation.pm
Created attachment 164068 [details] [review] Bug 9762: Log circulation overrides This patch allows you to save commands that have been overridden by someone. The patch has been updated but is not yet completed. Tests 10, 13, 14, and 17 are still not functional. Tests 15 and 16 need to be fixed as they do not display the barcode. All other tests should be functional. To test: --After each step, a message will be displayed in the action_logs table and in Tools > Log viewer -- Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed (In circulation rules put "On shelf holds allowed" to "If any unavailable") Fix POD problem for Circulation.pm Current status: Failed QA
Created attachment 164302 [details] [review] Bug 9762: Change how to pass the param issueconfirmed To test: --After each step, a message will be displayed in the action_logs table and in Tools > Log viewer -- Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed (In circulation rules put "On shelf holds allowed" to "If any unavailable") Current status: Failed QA
Created attachment 164387 [details] [review] Bug 9762: Change how to pass the param Current status: Failed QA
Created attachment 164426 [details] [review] Bug 9762: Test CanBookBeIssued.pm To test: 1) Apply the patch 2) run prove t/db_dependent/Circulation/CanBookBeIssued.t --After each step, a message will be displayed in the action_logs table and in Tools > Log viewer -- Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed (In circulation rules put "On shelf holds allowed" to "If any unavailable")
I created a separate test file from circulation.t because I think it's simpler as it tests the message sending for the method CanBookBeIssued in Circulation.pm method and also on master and without having applied the patch the Circulation.t test didn't work so I couldn't test my tests.
Created attachment 164479 [details] [review] Bug 9762: change test Current status: Needs Signoff
Sorry not the good bz
Created attachment 164508 [details] [review] Bug 9762: Log circulation overrides This patch allows you to save commands that have been overridden by someone. The patch has been updated but is not yet completed. Tests 10, 13, 14, and 17 are still not functional. Tests 15 and 16 need to be fixed as they do not display the barcode. All other tests should be functional. To test: --After each step, a message will be displayed in the action_logs table and in Tools > Log viewer -- Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed (In circulation rules put "On shelf holds allowed" to "If any unavailable") Current status: Needs Signoff
Created attachment 164509 [details] [review] Bug 9762: Change how to pass the param
Created attachment 164510 [details] [review] Bug 9762: Test CanBookBeIssued.pm To test: 1) Apply the patch 2) run prove t/db_dependent/Circulation/CanBookBeIssued.t --After each step, a message will be displayed in the action_logs table and in Tools > Log viewer -- Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed (In circulation rules put "On shelf holds allowed" to "If any unavailable")
Rebase to master
Created attachment 164519 [details] [review] Bug 9762: Test CanBookBeIssued.pm Current status: Needs Signoff
I tested in Bywater's sandbox points 1, 2, 3, 10 and 16 and was about to comment that these doesn't work because there were no logs for those borrowers whose restriction was overridden. Then I checked the action_logs table with SQL report and noticed that there actually were logs for overrides. But there were no object recorded which is why I did not find anything at first with the log viewer. Should the borrowernumber of the borrower whose resctriction is overridden be recorded as well to the object column in action_logs? It would help to find those overrides more easily. I intuitively looked for them from borrowers logs.
I think the info is already there, either in the "Object column", there's a link to the person who checkout. If that's what you mean. The logs are in Tools > Log viewer.
Patron's borrowernumber was in info column but not in object column which is usually used when action concerns certain borrower. For example, if someone asks, how is it possible that this borrower has issues even when borrower is restricted. I would start to investigate the problem by searching with patron's borrowernumber from object column and would get nothing. I would have to know that in restriction overrides patron's borrowernumber is in info column and I would have to search using that one. What I'm trying to say is that if there were a problem, I would start from patron's action log view. Now you kind of have start from staff memeber's action log view but the problem is, that you do not know which staff member to look for. Or you have to make large search by info column when you get lots of unnecessary hits with itemnumbers or other numbers that happens to be same as the borrowernumber.
Created attachment 170271 [details] [review] Bug 9762: Log circulation overrides This patch allows you to save commands that have been overridden by someone. The patch has been updated but is not yet completed. Tests 10, 13, 14, and 17 are still not functional. Tests 15 and 16 need to be fixed as they do not display the barcode. All other tests should be functional. To test: --After each step, a message will be displayed in the action_logs table and in Tools > Log viewer -- Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed (In circulation rules put "On shelf holds allowed" to "If any unavailable")
Created attachment 170272 [details] [review] Bug 9762: Change how to pass the param
Created attachment 170273 [details] [review] Bug 9762: Test CanBookBeIssued.pm To test: 1) Apply the patch 2) run prove t/db_dependent/Circulation/CanBookBeIssued.t --After each step, a message will be displayed in the action_logs table and in Tools > Log viewer -- Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed (In circulation rules put "On shelf holds allowed" to "If any unavailable") Bug 9762: change permission
Rebase to main
Sorry Hammat, needs another rebase.
Created attachment 176742 [details] [review] Bug 9762: Log circulation overrides This patch allows you to save commands that have been overridden by someone. The patch has been updated but is not yet completed. Tests 10, 13, 14, and 17 are still not functional. Tests 15 and 16 need to be fixed as they do not display the barcode. All other tests should be functional. To test: --After each step, a message will be displayed in the action_logs table and in Tools > Log viewer -- Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed (In circulation rules put "On shelf holds allowed" to "If any unavailable")
Rebased
Sorry William, I just pulled main this AM and tried applying this, it does not cleanly apply.
Created attachment 177294 [details] [review] Bug 9762: Change how to pass the param Rebased again
Created attachment 177295 [details] [review] Bug 9762: Test CanBookBeIssued.pm To test: 1) Apply the patch 2) run prove t/db_dependent/Circulation/CanBookBeIssued.t --After each step, a message will be displayed in the action_logs table and in Tools > Log viewer -- Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed (In circulation rules put "On shelf holds allowed" to "If any unavailable") Bug 9762: change permission
Created attachment 177296 [details] [review] Bug 9762: Log circulation overrides This patch allows you to save commands that have been overridden by someone. The patch has been updated but is not yet completed. Tests 10, 13, 14, and 17 are still not functional. Tests 15 and 16 need to be fixed as they do not display the barcode. All other tests should be functional. To test: --After each step, a message will be displayed in the action_logs table and in Tools > Log viewer -- Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed (In circulation rules put "On shelf holds allowed" to "If any unavailable")
Created attachment 178029 [details] [review] Bug 9762: Change how to pass the param
Created attachment 178030 [details] [review] Bug 9762: Test CanBookBeIssued.pm To test: 1) Apply the patch 2) run prove t/db_dependent/Circulation/CanBookBeIssued.t --After each step, a message will be displayed in the action_logs table and in Tools > Log viewer -- Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed (In circulation rules put "On shelf holds allowed" to "If any unavailable") Bug 9762: change permission
Created attachment 178031 [details] [review] Bug 9762: Log circulation overrides This patch allows you to save commands that have been overridden by someone. The patch has been updated but is not yet completed. Tests 10, 13, 14, and 17 are still not functional. Tests 15 and 16 need to be fixed as they do not display the barcode. All other tests should be functional. To test: --After each step, a message will be displayed in the action_logs table and in Tools > Log viewer -- Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed (In circulation rules put "On shelf holds allowed" to "If any unavailable")
Created attachment 178036 [details] [review] Bug 9762: Log circulation overrides This patch allows you to save commands that have been overridden by someone. The patch has been updated but is not yet completed. Tests 10, 13, 14, and 17 are still not functional. Tests 15 and 16 need to be fixed as they do not display the barcode. All other tests should be functional. To test: --After each step, a message will be displayed in the action_logs table and in Tools > Log viewer -- Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed (In circulation rules put "On shelf holds allowed" to "If any unavailable")
This needed a rebase.
(In reply to William Lavoie from comment #46) > This needed a rebase. Sorry William, there are quite a few problems now: 1. There are some code issues: "my" variable $dbh masks earlier declaration in same scope at /kohadevbox/koha/C4/Circulation.pm line 3669. "my" variable $patron masks earlier declaration in same scope at /kohadevbox/koha/C4/Circulation.pm line 3676. 2. I would check your release_tools, many things are not tidy 3. Unit tests are failing
Created attachment 181303 [details] [review] Bug 9762: Log circulation overrides This patch allows you to save commands that have been overridden by someone. The patch has been updated but is not yet completed. Tests 10, 13, 14, and 17 are still not functional. Tests 15 and 16 need to be fixed as they do not display the barcode. All other tests should be functional. To test: --After each step, a message will be displayed in the action_logs table and in Tools > Log viewer -- Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed (In circulation rules put "On shelf holds allowed" to "If any unavailable")
Created attachment 181304 [details] [review] Bug 9762: Change how to pass the param
Created attachment 181305 [details] [review] Bug 9762: Test CanBookBeIssued.pm To test: 1) Apply the patch 2) run prove t/db_dependent/Circulation/CanBookBeIssued.t --After each step, a message will be displayed in the action_logs table and in Tools > Log viewer -- Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed (In circulation rules put "On shelf holds allowed" to "If any unavailable") Bug 9762: change permission
Created attachment 181306 [details] [review] Bug 9762: (follow-up) Re-instate bug 17729
Created attachment 181307 [details] [review] Bug 9762: (follow-up) Re-instate bug 37868
Created attachment 181308 [details] [review] Bug 9762:(QA follow-up) Fix executable bit
Rebased, but still failed QA for now with the following tests failing: Running tests (1) * Proving /kohadevbox/koha/t/db_dependent/Circulation/CanBookBeIssued.t KO! # Failed test 'Borrower had amend message displayed' # at /kohadevbox/koha/t/db_dependent/Circulation/CanBookBeIssued.t line 231. # got: undef # expected: 'borrower had amend' # Looks like you failed 1 test of 9. /kohadevbox/koha/t/db_dependent/Circulation/CanBookBeIssued.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/9 subtests Test Summary Report ------------------- /kohadevbox/koha/t/db_dependent/Circulation/CanBookBeIssued.t (Wstat: 256 (exited 1) Tests: 9 Failed: 1) Failed test: 4 Non-zero exit status: 1 Files=1, Tests=9, 2 wallclock secs ( 0.01 usr 0.00 sys + 1.40 cusr 0.16 csys = 1.57 CPU) Result: FAIL Running more tests (1) * Proving t/db_dependent/Circulation.t KO! # Looks like you planned 27 tests but ran 5. # Failed test 'CanBookBeIssued & AllowReturnToBranch' # at t/db_dependent/Circulation.t line 2546. Can't call method "itemnumber" on an undefined value at /kohadevbox/koha/C4/Circulation.pm line 1478. # Looks like your test exited with 11 just after 27. t/db_dependent/Circulation.t .. Dubious, test returned 11 (wstat 2816, 0xb00) Failed 50/76 subtests Test Summary Report ------------------- t/db_dependent/Circulation.t (Wstat: 2816 (exited 11) Tests: 27 Failed: 1) Failed test: 26 Non-zero exit status: 11 Parse errors: Bad plan. You planned 76 tests but ran 27. Files=1, Tests=27, 5 wallclock secs ( 0.01 usr 0.01 sys + 3.57 cusr 0.44 csys = 4.03 CPU) Result: FAIL I've not got a moment right now to work through those test failures I'm afraid.
Created attachment 181340 [details] [review] Bug 9762: Log circulation overrides This patch allows you to save commands that have been overridden by someone. The patch has been updated but is not yet completed. Tests 10, 13, 14, and 17 are still not functional. Tests 15 and 16 need to be fixed as they do not display the barcode. All other tests should be functional. To test: --After each step, a message will be displayed in the action_logs table and in Tools > Log viewer -- Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed (In circulation rules put "On shelf holds allowed" to "If any unavailable")
Created attachment 181341 [details] [review] Bug 9762: Change how to pass the param
Created attachment 181342 [details] [review] Bug 9762: Test CanBookBeIssued.pm To test: 1) Apply the patch 2) run prove t/db_dependent/Circulation/CanBookBeIssued.t --After each step, a message will be displayed in the action_logs table and in Tools > Log viewer -- Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed (In circulation rules put "On shelf holds allowed" to "If any unavailable") Bug 9762: change permission
Created attachment 181343 [details] [review] Bug 9762: (follow-up) Re-instate bug 17729
Created attachment 181344 [details] [review] Bug 9762: (follow-up) Re-instate bug 37868
Created attachment 181345 [details] [review] Bug 9762:(QA follow-up) Fix executable bit
Created attachment 181346 [details] [review] Bug 9762: (QA follow-up) Add missing issueconfirmed check
Comment on attachment 181340 [details] [review] Bug 9762: Log circulation overrides Review of attachment 181340 [details] [review]: ----------------------------------------------------------------- ::: C4/Circulation.pm @@ +832,4 @@ > my $circ_library = Koha::Libraries->find( _GetCircControlBranch( $item_object, $patron ) ); > > my $now = dt_from_string(); > + my $message; I don't see `$message` passed anywhere.. we seem to construct what could be a huge concatenated string below, but then never output it anywhere. We also have this on line 1822: `my ( $allowed, $message ) = CanBookBeReturned( $item_unblessed, C4::Context->userenv->{branch} );` This will overwrite whatever was in $message above.. and it's intended to just be a branchcode passed back in that case.
Created attachment 181357 [details] [review] Bug 9762: Log circulation overrides This patch allows you to save commands that have been overridden by someone. The patch has been updated but is not yet completed. Tests 10, 13, 14, and 17 are still not functional. Tests 15 and 16 need to be fixed as they do not display the barcode. All other tests should be functional. To test: --After each step, a message will be displayed in the action_logs table and in Tools > Log viewer -- Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed (In circulation rules put "On shelf holds allowed" to "If any unavailable")
Created attachment 181358 [details] [review] Bug 9762: Change how to pass the param
Created attachment 181359 [details] [review] Bug 9762: Test CanBookBeIssued.pm To test: 1) Apply the patch 2) run prove t/db_dependent/Circulation/CanBookBeIssued.t --After each step, a message will be displayed in the action_logs table and in Tools > Log viewer -- Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed (In circulation rules put "On shelf holds allowed" to "If any unavailable") Bug 9762: change permission
Created attachment 181360 [details] [review] Bug 9762: (QA follow-up) Fix executable bit
Created attachment 181361 [details] [review] Bug 9762: (QA follow-up) Add missing issueconfirmed check
Created attachment 181362 [details] [review] Bug 9762: (QA follow-up) Fix failing test
Created attachment 181363 [details] [review] Bug 9762: (QA follow-up) Remove superflous string construction We never actually pass `$message` back to anywhere so there's no reason to create it in the first place.
Squashed rebase follow-ups and made some more rebase corrections. One test is still failing, and the string type record is still an issue.. I still need to test this all in detail too before I think it's QA runnnable.
This somehow feels like it's recording twice or is just at the wrong level to me.. I think I'd remove the changes to C4::Circulation::CanBookBeIssued and perform the record in the controllers.. or perhaps in AddIssue, AddRenewal.. those are the places we actually store the Issue/Renewal so it seems somewhat odd to record the override before the actual Issue/Renewal takes place to me.
Created attachment 181371 [details] [review] Bug 9762: (Alternative) Log circulation overrides An alternative approach to the original submission for bug 9762. Instead of recording a distinct action log line for a set of override messages in addition to the standard issue record, this patch updates the existing issue log to include any confirmation or impossible responses from the preceeding CanBookBeIssued call. We continue to record these as a JSON structure as the prior patch did, but instead of human messages we use the predefined codes as returned from the existing CanBookBeIssued response. To test: After each step, a single action log message should be displayed under `Tools > Log viewer`. The message itself will now consist of a JSON string with an array of 'confirmations' and 'forced' strings representing the overriden feedback from CanBookBeIssued. Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed
So.. I've added an alternative approach for comment. It's not fully implemented yet as it only covers calls to AddIssue and we should also consider Renewal and Return override as the original patchset does.
Created attachment 181381 [details] [review] Bug 9762: (Alternative) Log circulation overrides An alternative approach to the original submission for bug 9762. Instead of recording a distinct action log line for a set of override messages in addition to the standard issue record, this patch updates the existing issue log to include any confirmation or impossible responses from the preceeding CanBookBeIssued call. We continue to record these as a JSON structure as the prior patch did, but instead of human messages we use the predefined codes as returned from the existing CanBookBeIssued response. To test: After each step, a single action log message should be displayed under `Tools > Log viewer`. The message itself will now consist of a JSON string with an array of 'confirmations' and 'forced' strings representing the overriden feedback from CanBookBeIssued. Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed
Created attachment 181390 [details] [review] Bug 9762: (Alternative) Log circulation overrides An alternative approach to the original submission for bug 9762. Instead of recording a distinct action log line for a set of override messages in addition to the standard issue record, this patch updates the existing issue log to include any confirmation or impossible responses from the preceeding CanBookBeIssued call. We continue to record these as a JSON structure as the prior patch did, but instead of human messages we use the predefined codes as returned from the existing CanBookBeIssued response. To test: After each step, a single action log message should be displayed under `Tools > Log viewer`. The message itself will now consist of a JSON string with an array of 'confirmations' and 'forced' strings representing the overriden feedback from CanBookBeIssued. Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed
Created attachment 181393 [details] [review] Bug 9762: (Alternative) Log circulation overrides An alternative approach to the original submission for bug 9762. Instead of recording a distinct action log line for a set of override messages in addition to the standard issue record, this patch updates the existing issue log to include any confirmation or impossible responses from the preceeding CanBookBeIssued call. We continue to record these as a JSON structure as the prior patch did, but instead of human messages we use the predefined codes as returned from the existing CanBookBeIssued response. To test: After each step, a single action log message should be displayed under `Tools > Log viewer`. The message itself will now consist of a JSON string with an array of 'confirmations' and 'forced' strings representing the overriden feedback from CanBookBeIssued. Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed
Forgot to mention.. this version is translatable ;)
Created attachment 181545 [details] [review] Bug 9762: (Alternative) Log circulation overrides An alternative approach to the original submission for bug 9762. Instead of recording a distinct action log line for a set of override messages in addition to the standard issue record, this patch updates the existing issue log to include any confirmation or impossible responses from the preceeding CanBookBeIssued call. We continue to record these as a JSON structure as the prior patch did, but instead of human messages we use the predefined codes as returned from the existing CanBookBeIssued response. To test: After each step, a single action log message should be displayed under `Tools > Log viewer`. The message itself will now consist of a JSON string with an array of 'confirmations' and 'forced' strings representing the overriden feedback from CanBookBeIssued. Circulation -- Checking out 1) Check out an item that is age-restricted (AgeRestrictionOverride syspref) 2) Check out an item that has a “not for loan” status (AllowNotForLoanOverride syspref) 3) Check out an item that has a “lost” status (IssueLostItem syspref) 4) Check out an item to a patron who has reached the checkout limit (AllowTooManyOverride syspref) 5) Check out an item to a patron who is not allowed to borrow this item type 6) Check out an item to a patron who has unpaid fines (AllFinesNeedOverride and/or AllowFineOverride + noissuescharge sysprefs) 7) Check out an item on hold for someone else 8) Check out an item on hold ready for pickup by someone else 9) Check out an item already checked out to someone else (AutoReturnCheckedOutItems syspref) 10) Check out to a patron who has restrictions Circulation -- Checking in 11) Ignore a hold upon check in 12) Ignore a hold and transfer upon check in Circulation – Renewing 13) Renew an item on hold for someone else (AllowRenewalOnHoldOverride syspref) 14) Renew an item that has reached the maximum number of renewals (AllowRenewalLimitOverride syspref) Holds 15) Place a hold for a patron who is not allowed to place this item type on hold (AllowHoldPolicyOverride syspref) 16) Place a hold for a patron who has reached the maximum number of holds 17) Place an item-level hold when rules dictate that this is not allowed
Created attachment 181546 [details] [review] Bug 9762: (Alternative) Handle renewals