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

(-)a/C4/Circulation.pm (-2 / +2 lines)
Lines 1308-1314 sub AddIssue { Link Here
1308
        }
1308
        }
1309
    }
1309
    }
1310
1310
1311
    logaction("CIRCULATION", "ISSUE", $borrower->{'borrowernumber'}, $biblio->{'biblionumber'})
1311
    logaction("CIRCULATION", "ISSUE", $borrower->{'borrowernumber'}, $biblio->{'itemnumber'})
1312
        if C4::Context->preference("IssueLog");
1312
        if C4::Context->preference("IssueLog");
1313
  }
1313
  }
1314
  return ($datedue);	# not necessarily the same as when it came in!
1314
  return ($datedue);	# not necessarily the same as when it came in!
Lines 1876-1882 sub AddReturn { Link Here
1876
        });
1876
        });
1877
    }
1877
    }
1878
    
1878
    
1879
    logaction("CIRCULATION", "RETURN", $borrowernumber, $item->{'biblionumber'})
1879
    logaction("CIRCULATION", "RETURN", $borrowernumber, $item->{'itemnumber'})
1880
        if C4::Context->preference("ReturnLog");
1880
        if C4::Context->preference("ReturnLog");
1881
    
1881
    
1882
    # FIXME: make this comment intelligible.
1882
    # FIXME: make this comment intelligible.
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 2537-2543 CREATE TABLE `accountoffsets` ( Link Here
2537
DROP TABLE IF EXISTS `action_logs`;
2537
DROP TABLE IF EXISTS `action_logs`;
2538
CREATE TABLE `action_logs` ( -- logs of actions taken in Koha (requires that the logs be turned on)
2538
CREATE TABLE `action_logs` ( -- logs of actions taken in Koha (requires that the logs be turned on)
2539
  `action_id` int(11) NOT NULL auto_increment, -- unique identifier for each action
2539
  `action_id` int(11) NOT NULL auto_increment, -- unique identifier for each action
2540
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time the action took place
2540
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP, -- the date and time the action took place
2541
  `user` int(11) NOT NULL default 0, -- the staff member who performed the action (borrowers.borrowernumber)
2541
  `user` int(11) NOT NULL default 0, -- the staff member who performed the action (borrowers.borrowernumber)
2542
  `module` text, -- the module this action was taken against
2542
  `module` text, -- the module this action was taken against
2543
  `action` text, -- the action (includes things like DELETED, ADDED, MODIFY, etc)
2543
  `action` text, -- the action (includes things like DELETED, ADDED, MODIFY, etc)
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +8 lines)
Lines 6347-6352 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
6347
    SetVersion($DBversion);
6347
    SetVersion($DBversion);
6348
}
6348
}
6349
6349
6350
$DBversion = "3.11.00.XXX";
6351
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
6352
    $dbh->do("ALTER TABLE action_logs CHANGE timestamp timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;");
6353
    $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');");
6354
    print "Upgrade to $DBversion done (Bug 7241: Changing timestamp autoupdate on action_logs; setting items to circulation logs where missing)\n";
6355
    SetVersion($DBversion);
6356
}
6357
6350
=head1 FUNCTIONS
6358
=head1 FUNCTIONS
6351
6359
6352
=head2 TableExists($table)
6360
=head2 TableExists($table)
6353
- 

Return to bug 7241