[Bug 8480] New: auth_subfield_structure is not cleared when deleting an authority type
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8480 Priority: P5 - low Change sponsored?: --- Bug ID: 8480 CC: gmcharlt@gmail.com Assignee: koha-bugs@lists.koha-community.org Summary: auth_subfield_structure is not cleared when deleting an authority type Severity: normal Classification: Unclassified OS: All Reporter: gaetan.boisson@biblibre.com Hardware: All Status: NEW Version: master Component: Staff Client Product: Koha To reproduce : - in authtypes.pl create a new authority type - have a look at it's MARC structure and fill it with the default type for instance - delete it - in the database the auth_subfield_structure table was not properly cleared : auth_type and auth_tag_structure were properly cleared but all the subfields for the test authority type are still there. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8480 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8480 --- Comment #1 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 37402 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37402&action=edit Bug 8480: Add constraint on auth_subfield_structure.authtypecode In order not to have useless entries in the auth_subfield_structure table, this patch modifies the DB structure to add a foreign key on the authtypecode column. Note that the auth_tag_structure already has this constraint. Test plan: 0/ Don't apply this patch 1/ Create a now authority type 'RM_ME' 2/ Look at the MARC structure, to create the subfield structure and populate the auth_subfield_structure table. 3/ Delete the authority type 4/ Using your SQL cli: SELECT COUNT(*) FROM auth_subfield_structure WHERE authtypecode='RM_ME'; => The data are still in this table. 5/ Apply this patch 6/ Execute the updatedb entry 7/ Confirm the entries in the auth_subfield_structure table related to RM_ME have been deleted 8/ Repeat 1, 2 and 3 and verify the auth_subfield_structure entries have been correctly removed. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8480 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@biblibre.co |ity.org |m CC| |jonathan.druart@biblibre.co | |m --- Comment #2 from Jonathan Druart <jonathan.druart@biblibre.com> --- Note that this is also valid for marc_subfield_structure (I can provide a patch if this patch is accepted). -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8480 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8480 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #37402|0 |1 is obsolete| | --- Comment #3 from Frédéric Demians <frederic@tamil.fr> --- Created attachment 37794 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37794&action=edit Bug 8480: Add constraint on auth_subfield_structure.authtypecode In order not to have useless entries in the auth_subfield_structure table, this patch modifies the DB structure to add a foreign key on the authtypecode column. Note that the auth_tag_structure already has this constraint. Test plan: 0/ Don't apply this patch 1/ Create a now authority type 'RM_ME' 2/ Look at the MARC structure, to create the subfield structure and populate the auth_subfield_structure table. 3/ Delete the authority type 4/ Using your SQL cli: SELECT COUNT(*) FROM auth_subfield_structure WHERE authtypecode='RM_ME'; => The data are still in this table. 5/ Apply this patch 6/ Execute the updatedb entry 7/ Confirm the entries in the auth_subfield_structure table related to RM_ME have been deleted 8/ Repeat 1, 2 and 3 and verify the auth_subfield_structure entries have been correctly removed. Signed-off-by: Frederic Demians <f.demians@tamil.fr> - Works exactly as described in the (very good) test plan. - After authority type deletion, auth_subfield_structure still contains entries for deleted authority type. Applying the patch clean the previously undeleted records in auth_subfield_strucute. Now deleting a authority type cleans propertly all appropriate records in auth_subfield_structure. - Fix a merge conflict -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8480 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8480 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #37794|0 |1 is obsolete| | --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 38226 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38226&action=edit [PASSED QA] Bug 8480: Add constraint on auth_subfield_structure.authtypecode In order not to have useless entries in the auth_subfield_structure table, this patch modifies the DB structure to add a foreign key on the authtypecode column. Note that the auth_tag_structure already has this constraint. Test plan: 0/ Don't apply this patch 1/ Create a now authority type 'RM_ME' 2/ Look at the MARC structure, to create the subfield structure and populate the auth_subfield_structure table. 3/ Delete the authority type 4/ Using your SQL cli: SELECT COUNT(*) FROM auth_subfield_structure WHERE authtypecode='RM_ME'; => The data are still in this table. 5/ Apply this patch 6/ Execute the updatedb entry 7/ Confirm the entries in the auth_subfield_structure table related to RM_ME have been deleted 8/ Repeat 1, 2 and 3 and verify the auth_subfield_structure entries have been correctly removed. Signed-off-by: Frederic Demians <f.demians@tamil.fr> - Works exactly as described in the (very good) test plan. - After authority type deletion, auth_subfield_structure still contains entries for deleted authority type. Applying the patch clean the previously undeleted records in auth_subfield_strucute. Now deleting a authority type cleans propertly all appropriate records in auth_subfield_structure. - Fix a merge conflict Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8480 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Passed QA |Pushed to Master --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Thanks "funny" Jonathan! :-P -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org