[Bug 22658] New: aqbasket.authorisedby is missing a foreign key constraint
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22658 Bug ID: 22658 Summary: aqbasket.authorisedby is missing a foreign key constraint Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org Target Milestone: --- The aqbasket table optionally references a number of tables, but the foreign key fields are unconstrained. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22658 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |22642 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22642 [Bug 22642] DB upgrade 18.06.00.005 can fail -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22658 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22658 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |5334 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5334 [Bug 5334] Omnibus: Add explicit foreign key constraints -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22658 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I propose we create a new column: creator_id INT(11) NULL DEFAULT NULL, with FK constraint on the borrowers table, and we move/copy there the values of authorisedby that look like a number. If there's no remaining value on authorisedby, then drop the column. Otherwise, just leave it and print a noticeable message about manually removing the column once inconsistencies are solved. I haven't found references to the column in contexts in which it is not tested against the borrowers.borrowernumber column, but there might be old/legacy data there, or I'm sure Jonathan will find that spot I missed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22658 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |kyle.m.hall@gmail.com, | |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22658 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I would not care that much about authorisedby, it must contain an integer. However it can contain borrowernumber that do not longer exist in borrowers. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22658 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #2)
I would not care that much about authorisedby, it must contain an integer. However it can contain borrowernumber that do not longer exist in borrowers.
Do you say we should set to NULL if it doesn't exist in borrowers? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22658 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Tomás Cohen Arazi from comment #3)
(In reply to Jonathan Druart from comment #2)
I would not care that much about authorisedby, it must contain an integer. However it can contain borrowernumber that do not longer exist in borrowers.
Do you say we should set to NULL if it doesn't exist in borrowers?
Yes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22658 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Jonathan Druart from comment #4)
(In reply to Tomás Cohen Arazi from comment #3)
(In reply to Jonathan Druart from comment #2)
I would not care that much about authorisedby, it must contain an integer. However it can contain borrowernumber that do not longer exist in borrowers.
Do you say we should set to NULL if it doesn't exist in borrowers?
Yes
This might be a tricky one. I think we control visibility of baskets by their creator (AcqViewBaskets, independentbranches, permissions etc.). We don't want baskets to appear suddenly for libraries/staff who should not be able to see then. Not sure what the best fix here is, just saying it could lead to unwanted consequences. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22658 --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Looking forward to seeing this one.. did you want me to have a bash at it Tomas or were you intended to adopt it? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22658 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Martin Renvoize from comment #6)
Looking forward to seeing this one.. did you want me to have a bash at it Tomas or were you intended to adopt it?
I prefer to finish my works first. If it is not done yet, I'll pick it. I intended to use it for bug 24464, but can adapt it once the relationship is done. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org