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

(-)a/C4/Circulation.pm (-2 / +2 lines)
Lines 1302-1308 sub AddIssue { Link Here
1302
        }
1302
        }
1303
    }
1303
    }
1304
1304
1305
    logaction("CIRCULATION", "ISSUE", $borrower->{'borrowernumber'}, $biblio->{'biblionumber'})
1305
    logaction("CIRCULATION", "ISSUE", $borrower->{'borrowernumber'}, $biblio->{'itemnumber'})
1306
        if C4::Context->preference("IssueLog");
1306
        if C4::Context->preference("IssueLog");
1307
  }
1307
  }
1308
  return ($datedue);	# not necessarily the same as when it came in!
1308
  return ($datedue);	# not necessarily the same as when it came in!
Lines 1865-1871 sub AddReturn { Link Here
1865
        });
1865
        });
1866
    }
1866
    }
1867
    
1867
    
1868
    logaction("CIRCULATION", "RETURN", $borrowernumber, $item->{'biblionumber'})
1868
    logaction("CIRCULATION", "RETURN", $borrowernumber, $item->{'itemnumber'})
1869
        if C4::Context->preference("ReturnLog");
1869
        if C4::Context->preference("ReturnLog");
1870
    
1870
    
1871
    # FIXME: make this comment intelligible.
1871
    # FIXME: make this comment intelligible.
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 2533-2539 CREATE TABLE `accountoffsets` ( Link Here
2533
DROP TABLE IF EXISTS `action_logs`;
2533
DROP TABLE IF EXISTS `action_logs`;
2534
CREATE TABLE `action_logs` ( -- logs of actions taken in Koha (requires that the logs be turned on)
2534
CREATE TABLE `action_logs` ( -- logs of actions taken in Koha (requires that the logs be turned on)
2535
  `action_id` int(11) NOT NULL auto_increment, -- unique identifier for each action
2535
  `action_id` int(11) NOT NULL auto_increment, -- unique identifier for each action
2536
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time the action took place
2536
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP, -- the date and time the action took place
2537
  `user` int(11) NOT NULL default 0, -- the staff member who performed the action (borrowers.borrowernumber)
2537
  `user` int(11) NOT NULL default 0, -- the staff member who performed the action (borrowers.borrowernumber)
2538
  `module` text, -- the module this action was taken against
2538
  `module` text, -- the module this action was taken against
2539
  `action` text, -- the action (includes things like DELETED, ADDED, MODIFY, etc)
2539
  `action` text, -- the action (includes things like DELETED, ADDED, MODIFY, etc)
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +8 lines)
Lines 5966-5971 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
5966
    SetVersion($DBversion);
5966
    SetVersion($DBversion);
5967
}
5967
}
5968
5968
5969
$DBversion = "3.09.00.XXX";
5970
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
5971
    $dbh->do("ALTER TABLE action_logs CHANGE timestamp timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;");
5972
    $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');");
5973
    print "Upgrade to $DBversion done (Bug 7241 - Changing timestamp autoupdate on action_logs; setting items to circulation logs where missing)\n";
5974
    SetVersion($DBversion);
5975
}
5976
5969
=head1 FUNCTIONS
5977
=head1 FUNCTIONS
5970
5978
5971
=head2 TableExists($table)
5979
=head2 TableExists($table)
5972
- 

Return to bug 7241