Comment 2 for bug 1484989

Revision history for this message
Steven Callender (stevecallender) wrote :

If the fine generator is ran daily, this issue can pop up on hourly circs. If the fine generator doesn't run (if it's broken, or the process is stuck for some reason) then this issue will happen with every overdue circ checked in. It probably hasn't been so noticeable yet because most folks run the fine generator daily.

In Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm in 2.7 and earlier,

During the check-in phase we would first generate fines and then check to see if we can close the xact,

In sub do_checkin {

    if( $self->circ ) {
        $self->generate_fines_finish;
        $self->checkin_handle_circ;
        return if $self->bail_out;
        $self->checkin_changed(1);

The checkin_handle_circ sub is where the xact_finish is being stamped. So pre-2.8, we would do fines first.

In 2.8, we no longer generate fines first,

    if( $self->circ ) {
        $self->checkin_handle_circ;
        return if $self->bail_out;
        $self->checkin_changed(1);

This is the point that transactions are being closed prior to fines being added. Fines will still be added even though an xact_finish is stamped.

It looks like this issue may of been introduced on commit 1d2a885426d74841bbc912e868b62e08bd65baec
where the fines were re-tooled and things were rearranged. The fines really however need to be assessed before the closing of a transaction (whether by the fine generator running, or upon check-in) or the result is stuck records with a balance that are un-editable in the staff client.

Steve