Bugzilla – Attachment 105194 Details for
Bug 25567
borrower_attribute_types.category_code must be set to undef if not set
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25567: Prevent patron category type's categorycode to be created with ""
Bug-25567-Prevent-patron-category-types-categoryco.patch (text/plain), 1.52 KB, created by
Jonathan Druart
on 2020-05-21 13:32:01 UTC
(
hide
)
Description:
Bug 25567: Prevent patron category type's categorycode to be created with ""
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-05-21 13:32:01 UTC
Size:
1.52 KB
patch
obsolete
>From 261e26cbd176f314e2ead91a76f22d965a01c702 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 21 May 2020 15:30:35 +0200 >Subject: [PATCH] Bug 25567: Prevent patron category type's categorycode to be > created with "" > >It must be NULL/undef, the default from the DB. > >The method Koha::Patron::Attribute::Type->categorycode is not covered by tests! > >To recreate: >Create a new patron attribute type, don't select a patron's category (and not repeatable or unique) >Go to the batch patron modification tool, enter a cardnumber, next. >=> boom! >Apply the patch, edit the patron attribute, save >Go to the batch patron modification tool, enter a cardnumber, next. >=> success! >--- > admin/patron-attr-types.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/admin/patron-attr-types.pl b/admin/patron-attr-types.pl >index b923638427..8aab052be4 100755 >--- a/admin/patron-attr-types.pl >+++ b/admin/patron-attr-types.pl >@@ -122,7 +122,7 @@ sub add_update_attribute_type { > my $staff_searchable = $input->param('staff_searchable') ? 1 : 0; > my $authorised_value_category = $input->param('authorised_value_category'); > my $display_checkout = $input->param('display_checkout') ? 1 : 0; >- my $category_code = $input->param('category_code'); >+ my $category_code = $input->param('category_code') || undef; > my $class = $input->param('class'); > > my $attr_type = Koha::Patron::Attribute::Types->find($code); >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25567
:
105194
|
105195
|
105197
|
105208
|
105209
|
105221
|
105222