diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 05b5b7e42d..b5a5172de1 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1317,7 +1317,7 @@ sub AddIssue { } } - logaction("CIRCULATION", "ISSUE", $borrower->{'borrowernumber'}, $biblio->{'biblionumber'}) + logaction("CIRCULATION", "ISSUE", $borrower->{'borrowernumber'}, $biblio->{'itemnumber'}) if C4::Context->preference("IssueLog"); } return ($datedue); # not necessarily the same as when it came in! @@ -1885,7 +1885,7 @@ sub AddReturn { }); } - logaction("CIRCULATION", "RETURN", $borrowernumber, $item->{'biblionumber'}) + logaction("CIRCULATION", "RETURN", $borrowernumber, $item->{'itemnumber'}) if C4::Context->preference("ReturnLog"); # FIXME: make this comment intelligible. diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index caa1fc523c..8ce6a00d77 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -6661,6 +6661,16 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } +$DBversion = "3.11.00.108"; +if ( CheckVersion($DBversion) ) { + $dbh->do("ALTER TABLE action_logs CHANGE timestamp timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;"); + $dbh->do("UPDATE action_logs SET info=(SELECT itemnumber FROM items WHERE biblionumber= action_logs.info LIMIT 1) WHERE module='CIRCULATION' AND action in ('ISSUE','RETURN');"); + $dbh->do("ALTER TABLE action_logs CHANGE timestamp timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;"); + print "Upgrade to $DBversion done (Bug 7241: Fix on circulation logs)\n"; + print "WARNING about bug 7241: to partially correct the broken logs, the log history is filled with the first found item for each biblio.\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt index 1f42f530f7..a1d6e89fe4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt @@ -168,7 +168,7 @@ [% IF ( loopro.CIRCULATION ) %] - Item [% loopro.barcode |html %] + Item [% loopro.barcode |html %] [% ELSE %] [% loopro.info |html %] [% END %] diff --git a/kohaversion.pl b/kohaversion.pl index dc828591a0..d9bdb74bab 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts : use strict; sub kohaversion { - our $VERSION = '3.11.00.107'; + our $VERSION = '3.11.00.108'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install