[Koha-bugs] [Bug 20947] Navigating to moremember.pl for a patron who has fines on deleted items causes software error.

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jun 15 17:05:25 CEST 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20947

--- Comment #2 from Barton Chittenden <barton at bywatersolutions.com> ---
(In reply to Jonathan Druart from comment #1)
> I do not recreate, I noticed that accountlines.itemnumber is set to NULL
> when the item is deleted.
> Can you detail a bit more the steps to recreate?

The problem is triggered by accountlines records that have itemnumbers that
don't point to items -- I honestly don't know *how* that happened -- manual
database manipulation? Accountlines records that existed before the foreign key
constraints?

I think as a work-around, we're going to simply null accountlines.itemnumber
and set accountlines.note using

UPDATE
    accountlines
SET
    note=CONCAT(itemnumber," item deleted from system"),
    itemnumber=NULL
WHERE
    itemnumber NOT IN ( SELECT itemnumber FROM items );

I'm still open to a patch for this; but considering that the code that causes
his no longer exists in master, and that I can't reproduce this by normal means
in 17.11, I'm willing to use the workaround.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list