| Summary: | No need to check related guarantor/guarantee charges when the limits are not set | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
| Component: | Architecture, internals, and plumbing | Assignee: | Bugs List <koha-bugs> |
| Status: | Signed Off --- | QA Contact: | Testopia <testopia> |
| Severity: | normal | ||
| Priority: | P5 - low | CC: | david |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41405 | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
| Attachments: |
Bug 41404: Use looks_like_a_number to verify if prefs are set
Bug 41404: Use looks_like_a_number to verify if prefs are set Bug 41404: Use looks_like_a_number to verify if prefs are set |
||
Created attachment 190307 [details] [review] Bug 41404: Use looks_like_a_number to verify if prefs are set This check adds a check to ensure we have number, not just defined To test: 1 - Apply only unit tests patch 2 - Run the tests prove -v t/db_dependent/Koha/Patron.t 3 - Apply this patch 4 - Run the tests 5 - They pass! Created attachment 190313 [details] [review] Bug 41404: Use looks_like_a_number to verify if prefs are set This check adds a check to ensure we have number, not just defined To test: 1 - Apply only unit tests patch 2 - Run the tests prove -v t/db_dependent/Koha/Patron.t 3 - Apply this patch 4 - Run the tests 5 - They pass! Signed-off-by: David Nind <you@example.com> There was no unit tests patch (maybe it is missing), but the tests passed after applying the patch. Created attachment 190322 [details] [review] Bug 41404: Use looks_like_a_number to verify if prefs are set This check adds a check to ensure we have number, not just defined To test: 1 - Apply only unit tests patch 2 - Run the tests prove -v t/db_dependent/Koha/Patron.t 3 - Apply this patch 4 - Run the tests 5 - They pass! Signed-off-by: David Nind <david@davidnind.com> My sign-off line was incorrect, so have updated. |
In the code: # Check the debt of this patrons guarantees if ( defined $no_issues_charge_guarantees ) { # Check the debt of this patrons guarantors *and* the guarantees of those guarantors if ( defined $no_issues_charge_guarantors_with_guarantees ) { It is not possible to undef the system preferences, they are set as blank for no value - we need to check if they are numbers