@@ -, +, @@ --- installer/data/mysql/kohastructure.sql | 4 ---- installer/data/mysql/updatedatabase.pl | 12 ++++++++++++ .../prog/en/modules/members/readingrec.tt | 3 ++- .../prog/en/modules/reports/cat_issues_top.tt | 2 +- .../prog/en/modules/reports/issues_avg_stats.tt | 8 -------- members/readingrec.pl | 3 --- 6 files changed, 15 insertions(+), 17 deletions(-) --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -1144,7 +1144,6 @@ CREATE TABLE `issues` ( -- information related to check outs or issues `itemnumber` int(11), -- foreign key, linking this to the items table for the item that was checked out `date_due` datetime default NULL, -- datetime the item is due (yyyy-mm-dd hh:mm::ss) `branchcode` varchar(10) default NULL, -- foreign key, linking to the branches table for the location the item was checked out - `issuingbranch` varchar(18) default NULL, `returndate` datetime default NULL, -- date the item was returned, will be NULL until moved to old_issues `lastreneweddate` datetime default NULL, -- date the item was last renewed `return` varchar(4) default NULL, @@ -1156,7 +1155,6 @@ CREATE TABLE `issues` ( -- information related to check outs or issues KEY `issuesborridx` (`borrowernumber`), KEY `itemnumber_idx` (`itemnumber`), KEY `branchcode_idx` (`branchcode`), - KEY `issuingbranch_idx` (`issuingbranch`), KEY `bordate` (`borrowernumber`,`timestamp`), CONSTRAINT `issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE RESTRICT ON UPDATE CASCADE, CONSTRAINT `issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE RESTRICT ON UPDATE CASCADE @@ -1618,7 +1616,6 @@ CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r `itemnumber` int(11) default NULL, -- foreign key, linking this to the items table for the item that was checked out `date_due` datetime default NULL, -- date the item is due (yyyy-mm-dd) `branchcode` varchar(10) default NULL, -- foreign key, linking to the branches table for the location the item was checked out - `issuingbranch` varchar(18) default NULL, `returndate` datetime default NULL, -- date the item was returned `lastreneweddate` datetime default NULL, -- date the item was last renewed `return` varchar(4) default NULL, @@ -1630,7 +1627,6 @@ CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r KEY `old_issuesborridx` (`borrowernumber`), KEY `old_issuesitemidx` (`itemnumber`), KEY `branchcode_idx` (`branchcode`), - KEY `issuingbranch_idx` (`issuingbranch`), KEY `old_bordate` (`borrowernumber`,`timestamp`), CONSTRAINT `old_issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE SET NULL, --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -9793,6 +9793,18 @@ if(CheckVersion($DBversion)) { SetVersion($DBversion); } +$DBversion = "3.19.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do(q| + ALTER TABLE issues DROP COLUMN issuingbranch + |); + $dbh->do(q| + ALTER TABLE old_issues DROP COLUMN issuingbranch + |); + print "Upgrade to $DBversion done (Bug 2806: Remove issuingbranch columns)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt @@ -1,5 +1,6 @@ [% USE KohaDates %] [% USE Koha %] +[% USE Branches %] [% INCLUDE 'doc-head-open.inc' %] Circulation History for [% INCLUDE 'patron-title.inc' %] [% INCLUDE 'doc-head-close.inc' %] @@ -108,7 +109,7 @@ [% issue.issuedate | $KohaDates %] - [% issue.issuingbranch %] + [% Branches.GetName( issue.branchcode ) %] [% IF issue.date_due %] [% issue.date_due | $KohaDates %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt @@ -152,7 +152,7 @@
  • - - [% IF ( hassort1 ) %] Sort1 --- a/members/readingrec.pl +++ a/members/readingrec.pl @@ -74,9 +74,6 @@ if ( $borrowernumber eq C4::Context->preference('AnonymousPatron') ){ } my $branches = GetBranches(); -foreach my $issue ( @{$issues} ) { - $issue->{issuingbranch} = $branches->{ $issue->{branchcode} }->{branchname}; -} # barcode export if ( $op eq 'export_barcodes' ) { --