Bugzilla – Attachment 64428 Details for
Bug 13178
cardnumber field length is too short
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13178: increase max value of CardnumberLength
Bug-13178-increase-max-value-of-CardnumberLength.patch (text/plain), 1.87 KB, created by
Baptiste Wojtkowski (bwoj)
on 2017-06-19 15:07:07 UTC
(
hide
)
Description:
Bug 13178: increase max value of CardnumberLength
Filename:
MIME Type:
Creator:
Baptiste Wojtkowski (bwoj)
Created:
2017-06-19 15:07:07 UTC
Size:
1.87 KB
patch
obsolete
>From c5c5061dd960838b0a90ad0db2aeec1aef7fd4c6 Mon Sep 17 00:00:00 2001 >From: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com> >Date: Mon, 19 Jun 2017 15:04:28 +0000 >Subject: [PATCH] Bug 13178: increase max value of CardnumberLength > >testplan >1 - Apply patch >2 - Run updatedatabase.pl >3 - set the value of CardnumberLength to a value between 16 and 20 >4 - Check you can enter a propper cardnumber >--- > C4/Members.pm | 2 +- > installer/data/mysql/atomicupdate/bug_13178_wide_cardnumber.sql | 6 ++++++ > 2 files changed, 7 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_13178_wide_cardnumber.sql > >diff --git a/C4/Members.pm b/C4/Members.pm >index 6527c79..755718c 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -956,7 +956,7 @@ database column. > =cut > > sub get_cardnumber_length { >- my ( $min, $max ) = ( 0, 16 ); # borrowers.cardnumber is a nullable varchar(16) >+ my ( $min, $max ) = ( 0, 20 ); # borrowers.cardnumber is a nullable varchar(20) > $min = 1 if C4::Context->preference('BorrowerMandatoryField') =~ /cardnumber/; > if ( my $cardnumber_length = C4::Context->preference('CardnumberLength') ) { > # Is integer and length match >diff --git a/installer/data/mysql/atomicupdate/bug_13178_wide_cardnumber.sql b/installer/data/mysql/atomicupdate/bug_13178_wide_cardnumber.sql >new file mode 100644 >index 0000000..8c36c48 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_13178_wide_cardnumber.sql >@@ -0,0 +1,6 @@ >+ALTER TABLE borrowers MODIFY cardnumber varchar(20); >+ALTER TABLE borrower_modifications MODIFY cardnumber varchar(20); >+ALTER TABLE deletedborrowers MODIFY cardnumber varchar(20); >+ALTER TABLE deletedborrowers MODIFY cardnumber varchar(20); >+ALTER TABLE pending_offline_operations MODIFY cardnumber varchar(20); >+ALTER TABLE tmp_holdsqueue MODIFY cardnumber varchar(20); >-- >2.7.4
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 13178
:
64428
|
64487
|
64644
|
64645
|
64646
|
64647
|
68473
|
68474
|
68475
|
68553
|
68554
|
68555