Bugzilla – Attachment 36559 Details for
Bug 2806
issuingbranch isn't used
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 2806: Remove issuingbranch columns
PASSED-QA-Bug-2806-Remove-issuingbranch-columns.patch (text/plain), 7.47 KB, created by
Katrin Fischer
on 2015-03-05 11:04:52 UTC
(
hide
)
Description:
[PASSED QA] Bug 2806: Remove issuingbranch columns
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2015-03-05 11:04:52 UTC
Size:
7.47 KB
patch
obsolete
>From 4eae967b103e5bf9fbabf62a707f759d75daf619 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 23 Feb 2015 16:39:08 +0100 >Subject: [PATCH] [PASSED QA] Bug 2806: Remove issuingbranch columns > >This column is not in used in the Koha code and could be removed. > >Test plan: >Verify the branch is correctly displayed on the circulation history >(members/readingrec.pl) and that both reports Most-cisulated items >(cat_issues_top.pl) and Avg checkout (issues_avg_stats.pl) work as >before. > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >No problems found. >Fixed wrong table name on updatedatabase.pl and a tab char. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Passes tests and QA script. >Checked issues and returns are still working correctly. >There is no mention of issuingbranch in the codebase. >--- > installer/data/mysql/kohastructure.sql | 4 ---- > installer/data/mysql/updatedatabase.pl | 12 ++++++++++++ > .../intranet-tmpl/prog/en/modules/members/readingrec.tt | 3 ++- > .../intranet-tmpl/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(-) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 08ef9ee..93f5ffe 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/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, >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 0ed56c6..cc8b843 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/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) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >index 773995a..df13a17 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >+++ b/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' %] > <title>Circulation History for [% INCLUDE 'patron-title.inc' %]</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -108,7 +109,7 @@ > <td> > <span title="[% issue.issuedate %]">[% issue.issuedate | $KohaDates %]</span></td> > </td> >- <td>[% issue.issuingbranch %]</td> >+ <td>[% Branches.GetName( issue.branchcode ) %]</td> > <td> > [% IF issue.date_due %] > <span title="[% issue.date_due %]">[% issue.date_due | $KohaDates %]</span> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt >index c7e45bd..c76fba7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt >@@ -152,7 +152,7 @@ > </select></li> > <li><label for="criteria">By: </label><select name="Criteria" id="criteria"> > <option value ="" selected="selected">None</option> >- <option value ="issuingbranch">Library</option> >+ <option value ="branch">Library</option> > <option value ="categorycode">Categorycode</option> > <option value ="itemtype">Itemtype</option> > <option value ="Day">Day</option> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_avg_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_avg_stats.tt >index ffbbdd1..ce4bf86 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_avg_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_avg_stats.tt >@@ -172,14 +172,6 @@ > </select> > </td> > </tr> >-<!-- Modified according to statistics table >- <tr> >- <td>Issuing library</td> >- <td><input type="radio" name="Line" value="issuingbranch"></td> >- <td><input type="radio" name="Column" value="issuingbranch"></td> >- <td >[% CGIBranch %]</td> >- </tr> --> >-<!--End Modified --> > [% IF ( hassort1 ) %] > <tr class="hilighted"> > <td>Sort1</td> >diff --git a/members/readingrec.pl b/members/readingrec.pl >index de2baec..7f6d271 100755 >--- a/members/readingrec.pl >+++ b/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' ) { >-- >1.9.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 2806
:
36124
|
36499
| 36559