Bug 35539: Remove 'issuelimit' column/field from categories table

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Pedro Amorim 2024-01-02 12:32:07 +00:00 committed by Martin Renvoize
parent 581903289d
commit 4a4469fd6a
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F
4 changed files with 6 additions and 22 deletions

View file

@ -289,7 +289,6 @@ sub to_api_mapping {
dateofbirthrequired => 'lower_age_limit',
enrolmentfee => 'enrolment_fee',
overduenoticerequired => 'overdue_notice_required',
issuelimit => undef, # Unused
reservefee => 'reserve_fee',
hidelostitems => 'hide_lost_items',
category_type => 'category_type',

View file

@ -54,7 +54,6 @@ tables:
dateofbirthrequired: 18
enrolmentfee: '0.000000'
overduenoticerequired: 1
issuelimit: ~
reservefee: '0.000000'
category_type: 'A'
can_be_guarantee: 0
@ -66,7 +65,6 @@ tables:
dateofbirthrequired: 18
enrolmentfee: '0.000000'
overduenoticerequired: 1
issuelimit: ~
reservefee: '0.000000'
category_type: 'A'
can_be_guarantee: 0
@ -78,7 +76,6 @@ tables:
dateofbirthrequired: 18
enrolmentfee: '0.000000'
overduenoticerequired: 1
issuelimit: ~
reservefee: '0.000000'
category_type: 'A'
can_be_guarantee: 0
@ -91,7 +88,6 @@ tables:
dateofbirthrequired: 5
enrolmentfee: '0.000000'
overduenoticerequired: 1
issuelimit: ~
reservefee: '0.000000'
category_type: 'C'
can_be_guarantee: 1
@ -103,7 +99,6 @@ tables:
dateofbirthrequired: 5
enrolmentfee: '0.000000'
overduenoticerequired: 1
issuelimit: ~
reservefee: '0.000000'
category_type: 'C'
can_be_guarantee: 1
@ -115,7 +110,6 @@ tables:
dateofbirthrequired: 5
enrolmentfee: '0.000000'
overduenoticerequired: 1
issuelimit: ~
reservefee: '0.000000'
category_type: 'C'
can_be_guarantee: 1
@ -128,7 +122,6 @@ tables:
dateofbirthrequired: 18
enrolmentfee: '0.000000'
overduenoticerequired: 0
issuelimit: ~
reservefee: '0.000000'
category_type: 'P'
can_be_guarantee: 1
@ -140,7 +133,6 @@ tables:
dateofbirthrequired: 5
enrolmentfee: '0.000000'
overduenoticerequired: 1
issuelimit: ~
reservefee: '0.000000'
category_type: 'P'
can_be_guarantee: 1
@ -153,7 +145,6 @@ tables:
dateofbirthrequired: 18
enrolmentfee: '0.000000'
overduenoticerequired: 1
issuelimit: ~
reservefee: '0.000000'
category_type: 'I'
can_be_guarantee: 0
@ -165,7 +156,6 @@ tables:
dateofbirthrequired: 18
enrolmentfee: '0.000000'
overduenoticerequired: 1
issuelimit: ~
reservefee: '0.000000'
category_type: 'I'
can_be_guarantee: 0
@ -177,7 +167,6 @@ tables:
dateofbirthrequired: 18
enrolmentfee: '0.000000'
overduenoticerequired: 1
issuelimit: ~
reservefee: '0.000000'
category_type: 'I'
can_be_guarantee: 0
@ -190,7 +179,6 @@ tables:
dateofbirthrequired: 18
enrolmentfee: '0.000000'
overduenoticerequired: 0
issuelimit: ~
reservefee: '0.000000'
category_type: 'S'
can_be_guarantee: 0

View file

@ -1790,7 +1790,6 @@ CREATE TABLE `categories` (
`dateofbirthrequired` tinyint(1) DEFAULT NULL COMMENT 'the minimum age required for the patron category',
`enrolmentfee` decimal(28,6) DEFAULT NULL COMMENT 'enrollment fee for the patron',
`overduenoticerequired` tinyint(1) DEFAULT NULL COMMENT 'are overdue notices sent to this patron category (1 for yes, 0 for no)',
`issuelimit` smallint(6) DEFAULT NULL COMMENT 'unused in Koha',
`reservefee` decimal(28,6) DEFAULT NULL COMMENT 'cost to place holds',
`hidelostitems` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'are lost items shown to this category (1 for yes, 0 for no)',
`category_type` varchar(1) NOT NULL DEFAULT 'A' COMMENT 'type of Koha patron (Adult, Child, Professional, Organizational, Statistical, Staff)',

View file

@ -81,21 +81,19 @@ my $samplecat = {
dateofbirthrequired => undef,
enrolmentfee => undef,
overduenoticerequired => undef,
issuelimit => undef,
reservefee => undef,
hidelostitems => 0,
category_type => 'A',
};
my $query =
"INSERT INTO categories (categorycode,description,enrolmentperiod,enrolmentperioddate,dateofbirthrequired,enrolmentfee,overduenoticerequired,issuelimit ,reservefee ,hidelostitems ,category_type) VALUES( ?,?,?,?,?,?,?,?,?,?,?)";
"INSERT INTO categories (categorycode,description,enrolmentperiod,enrolmentperioddate,dateofbirthrequired,enrolmentfee,overduenoticerequired ,reservefee ,hidelostitems ,category_type) VALUES( ?,?,?,?,?,?,?,?,?,?)";
$dbh->do(
$query, {},
$samplecat->{categorycode}, $samplecat->{description},
$samplecat->{enrolmentperiod}, $samplecat->{enrolmentperioddate},
$samplecat->{dateofbirthrequired}, $samplecat->{enrolmentfee},
$samplecat->{overduenoticerequired}, $samplecat->{issuelimit},
$samplecat->{reservefee}, $samplecat->{hidelostitems},
$samplecat->{category_type}
$samplecat->{overduenoticerequired}, $samplecat->{reservefee},
$samplecat->{hidelostitems}, $samplecat->{category_type}
);
my $builder = t::lib::TestBuilder->new;