| Summary: | Navigating to moremember.pl for a patron who has fines on deleted items causes software error. | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Barton Chittenden <barton> |
| Component: | Patrons | Assignee: | Bugs List <koha-bugs> |
| Status: | CLOSED WORKSFORME | QA Contact: | Testopia <testopia> |
| Severity: | critical | ||
| Priority: | P5 - low | CC: | gmcharlt, jonathan.druart, kyle, nick |
| Version: | 17.11 | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Crowdfunding committed: | 0 |
| Crowdfunding contact: | Patch complexity: | --- | |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
|
Description
Barton Chittenden
2018-06-14 18:35:06 UTC
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? (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. Could you confirm the FK is missing? (In reply to Jonathan Druart from comment #3) > Could you confirm the FK is missing? Indeed, the foreign key appears to be missing on the affected site It's not a new constraint, no idea how it could be possible. (In reply to Jonathan Druart from comment #5) > It's not a new constraint, no idea how it could be possible. We suspect these sites were either original liblime dbs or created using outdated info. Closing this bug out as it shouldn't occur without bad tables |