View | Details | Raw Unified | Return to bug 7241
Collapse All | Expand All

(-)a/C4/Circulation.pm (-2 / +2 lines)
Lines 1317-1323 sub AddIssue { Link Here
1317
        }
1317
        }
1318
    }
1318
    }
1319
1319
1320
    logaction("CIRCULATION", "ISSUE", $borrower->{'borrowernumber'}, $biblio->{'biblionumber'})
1320
    logaction("CIRCULATION", "ISSUE", $borrower->{'borrowernumber'}, $biblio->{'itemnumber'})
1321
        if C4::Context->preference("IssueLog");
1321
        if C4::Context->preference("IssueLog");
1322
  }
1322
  }
1323
  return ($datedue);	# not necessarily the same as when it came in!
1323
  return ($datedue);	# not necessarily the same as when it came in!
Lines 1885-1891 sub AddReturn { Link Here
1885
        });
1885
        });
1886
    }
1886
    }
1887
    
1887
    
1888
    logaction("CIRCULATION", "RETURN", $borrowernumber, $item->{'biblionumber'})
1888
    logaction("CIRCULATION", "RETURN", $borrowernumber, $item->{'itemnumber'})
1889
        if C4::Context->preference("ReturnLog");
1889
        if C4::Context->preference("ReturnLog");
1890
    
1890
    
1891
    # FIXME: make this comment intelligible.
1891
    # FIXME: make this comment intelligible.
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 2524-2530 CREATE TABLE `accountoffsets` ( Link Here
2524
DROP TABLE IF EXISTS `action_logs`;
2524
DROP TABLE IF EXISTS `action_logs`;
2525
CREATE TABLE `action_logs` ( -- logs of actions taken in Koha (requires that the logs be turned on)
2525
CREATE TABLE `action_logs` ( -- logs of actions taken in Koha (requires that the logs be turned on)
2526
  `action_id` int(11) NOT NULL auto_increment, -- unique identifier for each action
2526
  `action_id` int(11) NOT NULL auto_increment, -- unique identifier for each action
2527
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time the action took place
2527
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP, -- the date and time the action took place
2528
  `user` int(11) NOT NULL default 0, -- the staff member who performed the action (borrowers.borrowernumber)
2528
  `user` int(11) NOT NULL default 0, -- the staff member who performed the action (borrowers.borrowernumber)
2529
  `module` text, -- the module this action was taken against
2529
  `module` text, -- the module this action was taken against
2530
  `action` text, -- the action (includes things like DELETED, ADDED, MODIFY, etc)
2530
  `action` text, -- the action (includes things like DELETED, ADDED, MODIFY, etc)
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +9 lines)
Lines 6655-6660 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
6655
    SetVersion($DBversion);
6655
    SetVersion($DBversion);
6656
}
6656
}
6657
6657
6658
$DBversion = "3.11.00.XXX";
6659
if ( CheckVersion($DBversion) ) {
6660
    $dbh->do("ALTER TABLE action_logs CHANGE timestamp timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;");
6661
    $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');");
6662
    print "Upgrade to $DBversion done (Bug 7241: Changing timestamp autoupdate on action_logs; setting items to circulation logs where missing)\n";
6663
    SetVersion($DBversion);
6664
}
6665
6666
6658
=head1 FUNCTIONS
6667
=head1 FUNCTIONS
6659
6668
6660
=head2 TableExists($table)
6669
=head2 TableExists($table)
6661
- 

Return to bug 7241