[Bug 10020] New: Remove old code related to 'ethnicity'
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 Bug ID: 10020 Summary: Remove old code related to 'ethnicity' Classification: Unclassified Change sponsored?: --- Product: Koha Version: 3.14 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Database Assignee: gmcharlt@gmail.com Reporter: katrin.fischer@bsz-bw.de While updating our database documentation I found ethnicity and I suspect, that this is no longer used in current versions of Koha. Related code I found so far: - database table ethnicity - database columns ethnicity and ethnotes in borrowers and deletedborrowers - ethnicitycategories in C4/Members.pm - some code in memberentry.pl I can see no way in current versions for a library to enter data in the related fields and tables. Also we have a very flexible feature for patron attributes now, that I think, should make it possible to replicate this feature, if a library wanted to use it. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Note: We need to check the table and columns are empty before dropping them. If possible migrate data to patron attributes automatically. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz --- Comment #2 from Chris Cormack <chris@bigballofwax.co.nz> --- (In reply to comment #1)
Note: We need to check the table and columns are empty before dropping them. If possible migrate data to patron attributes automatically.
If non empty we must migrate them, we can't throw away users data. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|3.14 |master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 --- Comment #3 from Galen Charlton <gmcharlt@gmail.com> --- (In reply to Chris Cormack from comment #2)
(In reply to comment #1)
Note: We need to check the table and columns are empty before dropping them. If possible migrate data to patron attributes automatically.
If non empty we must migrate them, we can't throw away users data.
My inclination is to treat this like bug 7372: i.e., create an ETHNICITY authval, migrate the ethnicity table to that, then drop it. Moving the ethnicity column to a patron attribute can come later, if it all. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- +1 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nengard@gmail.com --- Comment #5 from Nicole C. Engard <nengard@gmail.com> --- +1 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 37639 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37639&action=edit Bug 10020: Remove code related to ethnicity This is a(nother) vestige of Koha (2.2?). This patch removes unused code related to the 'ethnicity'. In detail: There is no way to fill the ethnicity table. There is no way to fill the borrowers.ethnicity and borrowers.ethnotes. BUT if borrowers.ethnicity exists, the value is displayed on members/moremember.pl (and only here). Test plan: Apply this patch and confirm there is no regression on adding/updating/deleting patrons. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 37640 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37640&action=edit Bug 10020: Remove DB table and fields related to ethnicity This patch remove the ethnicity table and the ethnicity and ethnotes fields from the 3 tables: borrowers, deletedborrowers and borrower_modifications IF no data exist. Test plan: 0/ Apply this patch and update the Koha::Schema (misc/devel/update_dbix_class_files.pl). 1/ Make sure the ethnicity has at least 1 entry 2/ Launch the updatedb entry and confirm you get a warning message and the DB structure is not updated. 3/ truncate the ethnicity table and fill ethnicity (or ethnotes) for at least 1 row of the borrowers table. 4/ Launch the updatedb entry and confirm you get a warning message and the DB structure is not updated. 5/ Make sure the ethnicity table is empty as well as the ethniciy and the ethnotes fields of borrowers, deletedborrowers and borrower_modifications 6/ Launch the updatedb entry and confirm you don't get the warning message and the DB structure is updated (ie. table and fields dropped). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #37639|0 |1 is obsolete| | --- Comment #8 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 37641 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37641&action=edit Bug 10020: Remove code related to ethnicity This is a(nother) vestige of Koha (2.2?). This patch removes unused code related to the 'ethnicity'. In detail: There is no way to fill the ethnicity table. There is no way to fill the borrowers.ethnicity and borrowers.ethnotes. BUT if borrowers.ethnicity exists, the value is displayed on members/moremember.pl (and only here). Test plan: Apply this patch and confirm there is no regression on adding/updating/deleting patrons. Note that you don't see the ethnicity value on the moremember.pl page even if a patron has it. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |jonathan.druart@biblibre.co | |m CC| |jonathan.druart@biblibre.co | |m Component|Database |Architecture, internals, | |and plumbing -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 Nick Clemens <nick@quecheelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@quecheelibrary.org Status|Needs Signoff |Failed QA --- Comment #9 from Nick Clemens <nick@quecheelibrary.org> --- Test plan successful for first patch, when checking for regression I cannot delete a patron Software error: DBIx::Class::Storage::DBI::_dbh_execute(): Unknown column 'me.ethnicity' in 'field list' at /home/kidclamp/kohaclone/C4/Members.pm line 1864 For help, please send mail to the webmaster ([no address given]), giving this error message and the time and date of the error. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #10 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Nick Clemens from comment #9)
Test plan successful for first patch, when checking for regression I cannot delete a patron
Software error:
DBIx::Class::Storage::DBI::_dbh_execute(): Unknown column 'me.ethnicity' in 'field list' at /home/kidclamp/kohaclone/C4/Members.pm line 1864 For help, please send mail to the webmaster ([no address given]), giving this error message and the time and date of the error.
I have retested and it works. Did you update the schema (step 0 of first patch)? You need to edit the file and set $db_name, $db_user and $db_password -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 Nick Clemens <nick@quecheelibrary.org> 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=10020 Nick Clemens <nick@quecheelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #37640|0 |1 is obsolete| | --- Comment #11 from Nick Clemens <nick@quecheelibrary.org> --- Created attachment 37984 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37984&action=edit [SIGNED OFF] Bug 10020: Remove DB table and fields related to ethnicity This patch remove the ethnicity table and the ethnicity and ethnotes fields from the 3 tables: borrowers, deletedborrowers and borrower_modifications IF no data exist. Test plan: 0/ Apply this patch and update the Koha::Schema (misc/devel/update_dbix_class_files.pl). 1/ Make sure the ethnicity has at least 1 entry 2/ Launch the updatedb entry and confirm you get a warning message and the DB structure is not updated. 3/ truncate the ethnicity table and fill ethnicity (or ethnotes) for at least 1 row of the borrowers table. 4/ Launch the updatedb entry and confirm you get a warning message and the DB structure is not updated. 5/ Make sure the ethnicity table is empty as well as the ethniciy and the ethnotes fields of borrowers, deletedborrowers and borrower_modifications 6/ Launch the updatedb entry and confirm you don't get the warning message and the DB structure is updated (ie. table and fields dropped). Signed-off-by: Nick Clemens <nick@quecheelibrary.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 Nick Clemens <nick@quecheelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #37641|0 |1 is obsolete| | --- Comment #12 from Nick Clemens <nick@quecheelibrary.org> --- Created attachment 37985 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37985&action=edit [SIGNED OFF] Bug 10020: Remove code related to ethnicity This is a(nother) vestige of Koha (2.2?). This patch removes unused code related to the 'ethnicity'. In detail: There is no way to fill the ethnicity table. There is no way to fill the borrowers.ethnicity and borrowers.ethnotes. BUT if borrowers.ethnicity exists, the value is displayed on members/moremember.pl (and only here). Test plan: Apply this patch and confirm there is no regression on adding/updating/deleting patrons. Note that you don't see the ethnicity value on the moremember.pl page even if a patron has it. Signed-off-by: Nick Clemens <nick@quecheelibrary.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #37984|0 |1 is obsolete| | Attachment #37985|0 |1 is obsolete| | --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 38400 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38400&action=edit [PASSED QA] Bug 10020: Remove DB table and fields related to ethnicity This patch remove the ethnicity table and the ethnicity and ethnotes fields from the 3 tables: borrowers, deletedborrowers and borrower_modifications IF no data exist. Test plan: 0/ Apply this patch and update the Koha::Schema (misc/devel/update_dbix_class_files.pl). 1/ Make sure the ethnicity has at least 1 entry 2/ Launch the updatedb entry and confirm you get a warning message and the DB structure is not updated. 3/ truncate the ethnicity table and fill ethnicity (or ethnotes) for at least 1 row of the borrowers table. 4/ Launch the updatedb entry and confirm you get a warning message and the DB structure is not updated. 5/ Make sure the ethnicity table is empty as well as the ethniciy and the ethnotes fields of borrowers, deletedborrowers and borrower_modifications 6/ Launch the updatedb entry and confirm you don't get the warning message and the DB structure is updated (ie. table and fields dropped). Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 --- Comment #14 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 38401 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38401&action=edit [PASSED QA] Bug 10020: Remove code related to ethnicity This is a(nother) vestige of Koha (2.2?). This patch removes unused code related to the 'ethnicity'. In detail: There is no way to fill the ethnicity table. There is no way to fill the borrowers.ethnicity and borrowers.ethnotes. BUT if borrowers.ethnicity exists, the value is displayed on members/moremember.pl (and only here). Test plan: Apply this patch and confirm there is no regression on adding/updating/deleting patrons. Note that you don't see the ethnicity value on the moremember.pl page even if a patron has it. Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Severity|normal |enhancement -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA --- Comment #15 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I agree with Galen here: I think we need to create extended patron attributes for storing this. It can be linked to an authorized value category or not, but I don't think we should leave cruft on the database (even with a warning message: the users will read it, but won't be capable of doing anything). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 --- Comment #16 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Tomás Cohen Arazi from comment #15)
I agree with Galen here: I think we need to create extended patron attributes for storing this. It can be linked to an authorized value category or not, but I don't think we should leave cruft on the database (even with a warning message: the users will read it, but won't be capable of doing anything).
IMO it does not worth spending time on this. The patch removes the tables/fields if data exist (which is certainly not the case), or leave them. How do you see the data migration? Just create 2 attributes "ethnicity" and "ethnotes"? I don't understand why we should need an authorized value here. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I agree with Jonathan, I think creating authorized values is not necessary. If we are going with extended patron attributes, then I'd just copy the values. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 --- Comment #18 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Jonathan Druart from comment #16)
The patch removes the tables/fields if data exist (which is certainly not the case), or leave them.
Hum, trying again... The patch removes the tables/fields when they don't contain any data (which is certainly the case) or keep them if they are not empty. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA --- Comment #19 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #18)
(In reply to Jonathan Druart from comment #16)
The patch removes the tables/fields if data exist (which is certainly not the case), or leave them.
Hum, trying again... The patch removes the tables/fields when they don't contain any data (which is certainly the case) or keep them if they are not empty.
And I think it's enough, don't you think? Back to the RM queue for reconsidering it. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Patch doesn't apply --- Comment #20 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Please, small rebase needed. Thanks! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38400|0 |1 is obsolete| | Attachment #38401|0 |1 is obsolete| | --- Comment #21 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 43103 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43103&action=edit Bug 10020: Remove DB table and fields related to ethnicity This patch remove the ethnicity table and the ethnicity and ethnotes fields from the 3 tables: borrowers, deletedborrowers and borrower_modifications IF no data exist. Test plan: 0/ Apply this patch and update the Koha::Schema (misc/devel/update_dbix_class_files.pl). 1/ Make sure the ethnicity has at least 1 entry 2/ Launch the updatedb entry and confirm you get a warning message and the DB structure is not updated. 3/ truncate the ethnicity table and fill ethnicity (or ethnotes) for at least 1 row of the borrowers table. 4/ Launch the updatedb entry and confirm you get a warning message and the DB structure is not updated. 5/ Make sure the ethnicity table is empty as well as the ethniciy and the ethnotes fields of borrowers, deletedborrowers and borrower_modifications 6/ Launch the updatedb entry and confirm you don't get the warning message and the DB structure is updated (ie. table and fields dropped). Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 --- Comment #22 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 43104 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43104&action=edit Bug 10020: Remove code related to ethnicity This is a(nother) vestige of Koha (2.2?). This patch removes unused code related to the 'ethnicity'. In detail: There is no way to fill the ethnicity table. There is no way to fill the borrowers.ethnicity and borrowers.ethnotes. BUT if borrowers.ethnicity exists, the value is displayed on members/moremember.pl (and only here). Test plan: Apply this patch and confirm there is no regression on adding/updating/deleting patrons. Note that you don't see the ethnicity value on the moremember.pl page even if a patron has it. Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 --- Comment #23 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 43174 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43174&action=edit Bug 10020: (RM followup) DBIx update Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #24 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 Kyle M Hall <kyle.m.hall@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |14981 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14981 [Bug 14981] Sample patron data broken by removal of ethnicity column -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10020 --- Comment #25 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 43384 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43384&action=edit Bug 10020: (RM followup) DBIx update / delete leftover file Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org