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

(-)a/C4/Circulation.pm (-2 / +2 lines)
Lines 1129-1135 sub AddIssue { Link Here
1129
        }
1129
        }
1130
    }
1130
    }
1131
1131
1132
    logaction("CIRCULATION", "ISSUE", $borrower->{'borrowernumber'}, $biblio->{'biblionumber'})
1132
    logaction("CIRCULATION", "ISSUE", $borrower->{'borrowernumber'}, $biblio->{'itemnumber'})
1133
        if C4::Context->preference("IssueLog");
1133
        if C4::Context->preference("IssueLog");
1134
  }
1134
  }
1135
  return ($datedue);	# not necessarily the same as when it came in!
1135
  return ($datedue);	# not necessarily the same as when it came in!
Lines 1693-1699 sub AddReturn { Link Here
1693
        });
1693
        });
1694
    }
1694
    }
1695
    
1695
    
1696
    logaction("CIRCULATION", "RETURN", $borrowernumber, $item->{'biblionumber'})
1696
    logaction("CIRCULATION", "RETURN", $borrowernumber, $item->{'itemnumber'})
1697
        if C4::Context->preference("ReturnLog");
1697
        if C4::Context->preference("ReturnLog");
1698
    
1698
    
1699
    # FIXME: make this comment intelligible.
1699
    # FIXME: make this comment intelligible.
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 2507-2513 CREATE TABLE `accountoffsets` ( Link Here
2507
DROP TABLE IF EXISTS `action_logs`;
2507
DROP TABLE IF EXISTS `action_logs`;
2508
CREATE TABLE `action_logs` ( -- logs of actions taken in Koha (requires that the logs be turned on)
2508
CREATE TABLE `action_logs` ( -- logs of actions taken in Koha (requires that the logs be turned on)
2509
  `action_id` int(11) NOT NULL auto_increment, -- unique identifier for each action
2509
  `action_id` int(11) NOT NULL auto_increment, -- unique identifier for each action
2510
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time the action took place
2510
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP, -- the date and time the action took place
2511
  `user` int(11) NOT NULL default 0, -- the staff member who performed the action (borrowers.borrowernumber)
2511
  `user` int(11) NOT NULL default 0, -- the staff member who performed the action (borrowers.borrowernumber)
2512
  `module` text, -- the module this action was taken against
2512
  `module` text, -- the module this action was taken against
2513
  `action` text, -- the action (includes things like DELETED, ADDED, MODIFY, etc)
2513
  `action` text, -- the action (includes things like DELETED, ADDED, MODIFY, etc)
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +8 lines)
Lines 5684-5689 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
5684
    SetVersion($DBversion);
5684
    SetVersion($DBversion);
5685
}
5685
}
5686
5686
5687
$DBversion = "3.09.00.XXX";
5688
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
5689
    $dbh->do("ALTER TABLE action_logs CHANGE timestamp timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;");
5690
    $dbh->do("UPDATE action_logs SET object=(SELECT itemnumber FROM items WHERE biblionumber= action_logs.object LIMIT 1) WHERE module='CIRCULATION' AND action in ('ISSUE','RETURN');");
5691
    print "Upgrade to $DBversion done (Bug 7241 - Changing timestamp autoupdate on action_logs; setting items to circulation logs where missing)\n";
5692
    SetVersion($DBversion);
5693
}
5694
5687
=head1 FUNCTIONS
5695
=head1 FUNCTIONS
5688
5696
5689
=head2 TableExists($table)
5697
=head2 TableExists($table)
5690
- 

Return to bug 7241