[Bug 12451] New: circulation rule cant be edited if itemtype contains a space character
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12451 Bug ID: 12451 Summary: circulation rule cant be edited if itemtype contains a space character Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: System Administration Assignee: koha-bugs@lists.koha-community.org Reporter: fridolyn.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com When an itemtype description contains a space character like " Book" (often used to set this itemtype as first in sorted lists), the edition of an existing circulation rule does not work, it selects the default itemtype. Same for patron category. It's because the JavaScript code performs a trim on value existing in table itm = itm.replace(/^\s*|\s*$/g,''); The same trim must be performed on combobox in editing line. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12451 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- URL| |cgi-bin/koha/admin/smart-ru | |les.pl -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12451 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12451 --- Comment #1 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 28979 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28979&action=edit Bug 12451 - circulation rule cant be edited if itemtype contains a space character When an itemtype description contains a space character like " Book" (often used to set this itemtype as first in sorted lists), the edition of an existing circulation rule does not work, it selects the default itemtype. Same for patron category. It's because the JavaScript code performs a trim on value existing in table itm = itm.replace(/^\s*|\s*$/g,''); This patch adds trim on select options in editing line. Test plan : - Create an itemtype with a leading or trailling space in description : ie " Book" - Go to cgi-bin/koha/admin/smart-rules.pl - Create a rule with this itemtype, Unit=hours and Hard due date=Exactly on 31/12/2015 (any date) - Click on Edit on this rule line => Without this patch, the default itemtype is selected in edition line => With this patch, the correct itemtype is selected in edition line Check others selects are ok : - Create a rule with Unit=hours and Hard due date=Exactly on 31/12/2015 (any date) - Click on Edit on this rule line => The correct options are selected Same tests with a patron category containing a leading or trailling space in description -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12451 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12451 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 29052 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29052&action=edit [SIGNED-OFF] Bug 12451 - circulation rule cant be edited if itemtype contains a space character When an itemtype description contains a space character like " Book" (often used to set this itemtype as first in sorted lists), the edition of an existing circulation rule does not work, it selects the default itemtype. Same for patron category. It's because the JavaScript code performs a trim on value existing in table itm = itm.replace(/^\s*|\s*$/g,''); This patch adds trim on select options in editing line. Test plan : - Create an itemtype with a leading or trailling space in description : ie " Book" - Go to cgi-bin/koha/admin/smart-rules.pl - Create a rule with this itemtype, Unit=hours and Hard due date=Exactly on 31/12/2015 (any date) - Click on Edit on this rule line => Without this patch, the default itemtype is selected in edition line => With this patch, the correct itemtype is selected in edition line Check others selects are ok : - Create a rule with Unit=hours and Hard due date=Exactly on 31/12/2015 (any date) - Click on Edit on this rule line => The correct options are selected Same tests with a patron category containing a leading or trailling space in description Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12451 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #28979|0 |1 is obsolete| | CC| |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12451 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12451 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29052|0 |1 is obsolete| | --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 29054 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29054&action=edit Bug 12451 - circulation rule cant be edited if itemtype contains a space character When an itemtype description contains a space character like " Book" (often used to set this itemtype as first in sorted lists), the edition of an existing circulation rule does not work, it selects the default itemtype. Same for patron category. It's because the JavaScript code performs a trim on value existing in table itm = itm.replace(/^\s*|\s*$/g,''); This patch adds trim on select options in editing line. Test plan : - Create an itemtype with a leading or trailling space in description : ie " Book" - Go to cgi-bin/koha/admin/smart-rules.pl - Create a rule with this itemtype, Unit=hours and Hard due date=Exactly on 31/12/2015 (any date) - Click on Edit on this rule line => Without this patch, the default itemtype is selected in edition line => With this patch, the correct itemtype is selected in edition line Check others selects are ok : - Create a rule with Unit=hours and Hard due date=Exactly on 31/12/2015 (any date) - Click on Edit on this rule line => The correct options are selected Same tests with a patron category containing a leading or trailling space in description Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12451 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Fridolin! -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12451 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #5 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to 3.16.x for inclusion in 3.16.2. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12451 --- Comment #6 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- Pushed to 3.14.x, will be in 3.14.12. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org