Comment 9 for bug 1819542

Revision history for this message
Jason Etheridge (phasefx) wrote :

Interesting. Per bug 1794575, put item into transit, tried to Mark it Damaged, and get an uncaught exception in the console: TypeError: Cannot read property 'charge' of undefined at circ.js:1375

Put item into transit, changed status to Available directly in the DB, check it out to user, and indeed, no cancel transit prompt. Checked item in, get a klaxxon. Perfect. DATABASE_UPDATE_FAILED at circ.js:1740

ERROR: Copy id=401 is already in transit

I'd be tempted to insert a transit search in Circulate.pm:sub do_copy_checks where it's doing the following:

    if( $stat == OILS_COPY_STATUS_IN_TRANSIT ) {
        return $self->bail_on_events(OpenILS::Event->new('COPY_IN_TRANSIT'));
    }

However, there are several places in the code where it's checking for OILS_COPY_STATUS_IN_TRANSIT. We could change the transit_copy_is_unique_check on action.transit_copy to replace old transits with new transits, but that's the sort of logic that allowed multiple redundant calls in the XUL client. Maybe we repair the item status at the point of first comparison. I'll mull this over. Thanks!