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

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

Return to bug 7241