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

(-)a/C4/Circulation.pm (-2 / +2 lines)
Lines 1305-1311 sub AddIssue { Link Here
1305
        }
1305
        }
1306
    }
1306
    }
1307
1307
1308
    logaction("CIRCULATION", "ISSUE", $borrower->{'borrowernumber'}, $biblio->{'biblionumber'})
1308
    logaction("CIRCULATION", "ISSUE", $borrower->{'borrowernumber'}, $biblio->{'itemnumber'})
1309
        if C4::Context->preference("IssueLog");
1309
        if C4::Context->preference("IssueLog");
1310
  }
1310
  }
1311
  return ($datedue);	# not necessarily the same as when it came in!
1311
  return ($datedue);	# not necessarily the same as when it came in!
Lines 1873-1879 sub AddReturn { Link Here
1873
        });
1873
        });
1874
    }
1874
    }
1875
    
1875
    
1876
    logaction("CIRCULATION", "RETURN", $borrowernumber, $item->{'biblionumber'})
1876
    logaction("CIRCULATION", "RETURN", $borrowernumber, $item->{'itemnumber'})
1877
        if C4::Context->preference("ReturnLog");
1877
        if C4::Context->preference("ReturnLog");
1878
    
1878
    
1879
    # FIXME: make this comment intelligible.
1879
    # 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 6339-6344 if ( CheckVersion($DBversion) ) { Link Here
6339
   SetVersion ($DBversion);
6339
   SetVersion ($DBversion);
6340
}
6340
}
6341
6341
6342
$DBversion = "3.11.00.XXX";
6343
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
6344
    $dbh->do("ALTER TABLE action_logs CHANGE timestamp timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;");
6345
    $dbh->do("UPDATE action_logs SET info=(SELECT itemnumber FROM items WHERE biblionumber= action_logs.object LIMIT 1) WHERE module='CIRCULATION' AND action in ('ISSUE','RETURN');");
6346
    print "Upgrade to $DBversion done (Bug 7241: Changing timestamp autoupdate on action_logs; setting items to circulation logs where missing)\n";
6347
    SetVersion($DBversion);
6348
}
6349
6342
=head1 FUNCTIONS
6350
=head1 FUNCTIONS
6343
6351
6344
=head2 TableExists($table)
6352
=head2 TableExists($table)
6345
- 

Return to bug 7241