tslittle / tiffanymaster

0 stars 0 forks source link

LP#1808173 Deleting a line item should delete attached copies #3

Open tslittle opened 4 years ago

tslittle commented 4 years ago

https://bugs.launchpad.net/evergreen/+bug/1808173

tslittle commented 4 years ago

Bug that might have some ideas: https://bugs.launchpad.net/evergreen/+bug/1761615

tslittle commented 4 years ago

See Order.pm at line 3175 forhow copies are deleted when lineitems are cancelled.

    # gathering any real copies for deletion
    # if there is a copy ID and the cancel reason keeps debits,
    # do not delete. 
    if ($lid->eg_copy_id && ! $U->is_true($cancel_reason->keep_debits)) {
        $lid->eg_copy_id->isdeleted('t');
        push @$copies, $lid->eg_copy_id;
tslittle commented 4 years ago

Note for later: there's way more than below that line, since it also needs to delete acn's and possibly the bib.

tslittle commented 4 years ago

The sub for deleting lineitems is in Lineitem.pm starting at 273.

tslittle commented 3 years ago

May want to look at the code in the branch linked here, since it mentions that it should prompt before deleting copies: https://bugs.launchpad.net/evergreen/+bug/1175740