Summary: | Circulation rules not displayed (empty vs null) | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Architecture, internals, and plumbing | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Severity: | major | ||
Priority: | P5 - low | CC: | fridolin.somers, lucas, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18928 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23104 |
||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
19.11.00,19.05.01
|
|
Circulation function: | |||
Bug Depends on: | 18925 | ||
Bug Blocks: | |||
Attachments: |
Bug 23095: Correctly display circulation rules (0 vs undef)
Bug 23095: Correctly display circulation rules (0 vs undef) Bug 23095: Correctly display circulation rules (0 vs undef) |
Description
Jonathan Druart
2019-06-11 15:44:02 UTC
Created attachment 90502 [details] [review] Bug 23095: Correctly display circulation rules (0 vs undef) From the following commit: commit d1303ca834dd0b08fc1d44476cfbbb8b729b6165 Bug 18925: (follow-up) Fix null/empty behavior The global test must have been adjusted as well to catch empty strings. Actually we are expecting the plugin to return undef but the template variable contains an empty string. So the test should only be [% IF var != '' %] instead of [% IF var.defined && var != '' %] but I prefer to keep it as it for now. Test plan: In the section "Default checkout, hold policy by patron category" Set total checkouts = blank total on-site checkouts = blank total holds = 0 Save => Without this patch the line will not appear => With this patch applied there must be "unlimited, unlimited, 0" Created attachment 90510 [details] [review] Bug 23095: Correctly display circulation rules (0 vs undef) From the following commit: commit d1303ca834dd0b08fc1d44476cfbbb8b729b6165 Bug 18925: (follow-up) Fix null/empty behavior The global test must have been adjusted as well to catch empty strings. Actually we are expecting the plugin to return undef but the template variable contains an empty string. So the test should only be [% IF var != '' %] instead of [% IF var.defined && var != '' %] but I prefer to keep it as it for now. Test plan: In the section "Default checkout, hold policy by patron category" Set total checkouts = blank total on-site checkouts = blank total holds = 0 Save => Without this patch the line will not appear => With this patch applied there must be "unlimited, unlimited, 0" Signed-off-by: Mark Tompsett <mtompset@hotmail.com> (In reply to Jonathan Druart from comment #1) > Actually we are expecting the plugin to return undef but the template > variable contains an empty string. That's wrong, it's an empty string in DB. I don't manage to reproduce it. I'm sure I'm doing something wrong, but just followed the test steps. Created attachment 90540 [details] [review] Bug 23095: Correctly display circulation rules (0 vs undef) From the following commit: commit d1303ca834dd0b08fc1d44476cfbbb8b729b6165 Bug 18925: (follow-up) Fix null/empty behavior The global test must have been adjusted as well to catch empty strings. Actually we are expecting the plugin to return undef but the template variable contains an empty string. So the test should only be [% IF var != '' %] instead of [% IF var.defined && var != '' %] but I prefer to keep it as it for now. Test plan: In the section "Default checkout, hold policy by patron category" Set total checkouts = blank total on-site checkouts = blank total holds = 0 Save => Without this patch the line will not appear => With this patch applied there must be "unlimited, unlimited, 0" Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Nice work! Pushed to master for 19.11.00 Pushed to 19.05.x for 19.05.01 no backport for 18.11.x series as it is missing the dependency |