[Bug 44245] New: Batch patron modification cannot set a value of 0 (Protected cannot be set to No)
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44245 Bug ID: 44245 Summary: Batch patron modification cannot set a value of 0 (Protected cannot be set to No) Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Tools Assignee: koha-bugs@lists.koha-community.org Reporter: babarjunaid1122@gmail.com QA Contact: testopia@bugs.koha-community.org Target Milestone: --- tools/modborrowers.pl keeps a posted value only when it is true: $infos->{$field} = $value if $value; so a value of 0 is dropped. The Protected field is a Yes / No select whose No is 0: a superlibrarian can protect patrons in batch but cannot unprotect them. A street number, sort1 or sort2 of 0 is ignored the same way. To reproduce (main): 1. Log in as a superlibrarian, set Protected = Yes on a patron. 2. Tools > Batch patron modification, the patron's card number, Continue. 3. Protected: No. Save. 4. The patron is still protected. Reproduced on main (c8e8025). -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44245 --- Comment #1 from babar junaid <babarjunaid1122@gmail.com> --- Created attachment 212475 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212475&action=edit Bug 44245: Let batch patron modification set a value of 0 Bug 44245: Let batch patron modification set a value of 0 tools/modborrowers.pl only kept a posted value when it was true: $infos->{$field} = $value if $value; so "0" was dropped. Setting "Protected" to "No" (value 0) did nothing: a protected patron cannot be unprotected in batch. A street number, sort1 or sort2 of 0 was ignored the same way. A value is now kept when it is not empty. An empty field still leaves the patron's value as it is. Test plan: 1. Log in as a superlibrarian. Edit a patron, set Protected = Yes. 2. Tools > Batch patron modification, enter the patron's card number, Continue. Protected: No. Save. 3. The patron is still protected. 4. Apply the patch, restart Plack, repeat 2: the patron is no longer protected. Their other fields are unchanged. 5. Repeat 2 with Sort 1 = 0: Sort 1 is now 0 (before: unchanged). Sponsored-by: Koha Solutions -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44245 babar junaid <babarjunaid1122@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |babarjunaid1122@gmail.com |ity.org | -- 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