Summary: | Too many reserves due to syspref does not show warning | ||
---|---|---|---|
Product: | Koha | Reporter: | Fridolin Somers <fridolin.somers> |
Component: | Circulation | Assignee: | Fridolin Somers <fridolin.somers> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P5 - low | CC: | gmcharlt, kyle.m.hall, srdjan, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11250 | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Small patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Bug Depends on: | 9394 | ||
Bug Blocks: | |||
Attachments: |
Proposed patch
[SIGNED-OFF] Bug 10247 - Too many reserves due to syspref does not show warning Bug 10247 - Too many reserves due to syspref does not show warning |
Description
Fridolin Somers
2013-05-15 08:38:47 UTC
Created attachment 18148 [details] [review] Proposed patch See commit message Then wouldn't it be better to remove maxreserves syspref alltogether? (In reply to comment #2) > Then wouldn't it be better to remove maxreserves syspref alltogether? Why removing such a feature ? this bug is just a small variable problem. Maybe open a discussion on koah-devel mailing list. Well if it is in circulation rules (where it should be), maybe the syspref is redundant. (In reply to comment #4) > Well if it is in circulation rules (where it should be), maybe the syspref > is redundant. It is in circulation rules indeed but I think the syspref is used to temporary reduce reserves for all users, for holidays for example. Changing a syspref is much more easy that all circulation rules. Test plan : - Select a borrower and an item - Look at reserve quota for the borrower category, the item branch and the item type - Set maxreserves syspref with a quota lower than the circulation quota - Perform reserves for borrower to reach the quota - Try to perform one more reserve => You get the warning "too many holds" - Set maxreserves syspref with a quota higher than the circulation quota - Try to perform one more reserve => You get the warning "too many holds" Check you get a warning for alreadyreserved, none_available and alreadypossession cases. Check you get a message for expiry and diffbranch cases. Created attachment 18827 [details] [review] [SIGNED-OFF] Bug 10247 - Too many reserves due to syspref does not show warning On intranet, when placing a reserve : If borrower as reached the reserves quota, a warning should appear : Cannot place hold * Too Many Holds: TEST has too many holds. This works when quota defined in circulation rules is reached but not when quota specified in syspref maxreserves is reached, in case this quota is lower than the one defined is circulation rules. This is because template param maxreserves is set twice, this patch corrects this bug. Also moves warnings and messages conditionnal variable from perl to template because it cause the same bug as for maxreserves. Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Created attachment 19190 [details] [review] Bug 10247 - Too many reserves due to syspref does not show warning On intranet, when placing a reserve : If borrower as reached the reserves quota, a warning should appear : Cannot place hold * Too Many Holds: TEST has too many holds. This works when quota defined in circulation rules is reached but not when quota specified in syspref maxreserves is reached, in case this quota is lower than the one defined is circulation rules. This is because template param maxreserves is set twice, this patch corrects this bug. Also moves warnings and messages conditionnal variable from perl to template because it cause the same bug as for maxreserves. Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Pushed to master. Thanks, Fridolyn! It doesn't apply or work on 3.12.x because of its dependency on 9394. Please provide a patch that applies to the stable branch, or comment if you think 9394 should be backported (maybe other patches depend on it). Thanks (In reply to Tomás Cohen Arazi from comment #10) > It doesn't apply or work on 3.12.x because of its dependency on 9394. Please > provide a patch that applies to the stable branch, or comment if you think > 9394 should be backported (maybe other patches depend on it). Thanks Hie, For me, this bug does not depend on Bug 9394, its a small patch impacting old code. And actually, on 3.12.07, patch applies on 3.12.x branch. Can you confirm ? |