[Bug 35190] New: additional_fields table should allow null values for authorised_value_category
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 Bug ID: 35190 Summary: additional_fields table should allow null values for authorised_value_category Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: emily.lamancusa@montgomerycountymd.gov Reporter: emily.lamancusa@montgomerycountymd.gov QA Contact: testopia@bugs.koha-community.org Blocks: 29390 When creating an Additional Field in the staff interface, the UI explicitly allows the Additional Field not to be linked to an authorized value. However, the database doesn't allow NULL values for authorised_value_category in the additional_fields table. Instead, an empty string is inserted into the database if the user chooses not to link an authorized value. This is not good practice, and does not allow a foreign key constraint to be properly implemented. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29390 [Bug 29390] Authorised values: Add a few missing foreign keys -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 --- Comment #1 from Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 158087 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158087&action=edit Bug 35190: Set default NULL for authorised_value_category in additional_fields table To test: 1. Start KTD without this patch 2. In the Administration module, create an Additional Field with Authorized Value set to None 3. Create another Additional Field with Authorized Value set to an existing authorized value 4. Apply patch and updatedatabase 5. Access the database in the command line with koha-mysql kohadev 6. Select all rows from additional_fields 7. Confirm that the two Additional Fields from earlier have values of NULL and the correct authorized value, respectively, in their authorised_value_category fields. 8. reset_all to test new install 9. Access the database in the command line 10. Show the table structure for additional_fields and confirm that default for authorised_value_category is NULL -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 --- Comment #2 from Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 158088 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158088&action=edit Bug 35190: Adjust tests Test plan: prove t/db_dependent/Koha/AdditionalField.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 --- Comment #3 from Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 158089 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158089&action=edit Bug 35190: Adjust UI handling to avoid inserting an empty starting To test: 1. In the Administration module, create an Additional Field that is not linked to an authorized value 2. Create another Additional Field that is linked to an authorized value 3. Access the database in the command line (koha-mysql kohadev) 4. Select all from additional_fields 5. Confirm that each field correctly lists either the appropriate authorized value, or NULL -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 --- Comment #4 from Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 158090 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158090&action=edit Bug 35190: Adjust UI handling to avoid inserting an empty string To test: 1. In the Administration module, create an Additional Field that is not linked to an authorized value 2. Create another Additional Field that is linked to an authorized value 3. Access the database in the command line (koha-mysql kohadev) 4. Select all from additional_fields 5. Confirm that each field correctly lists either the appropriate authorized value, or NULL -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158089|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|additional_fields table |Additional_fields table |should allow null values |should allow null values |for |for |authorised_value_category |authorised_value_category CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- # Failed test 'no default category' # at /usr/share/koha/t/db_dependent/Koha/AdditionalField.t line 33. # got: '' # expected: undef # Looks like you failed 1 test of 4. Will take a look now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marcel de Rooy from comment #5)
# Failed test 'no default category' # at /usr/share/koha/t/db_dependent/Koha/AdditionalField.t line 33. # got: '' # expected: undef # Looks like you failed 1 test of 4.
Will take a look now.
Easy fix: run the dbrev LOL -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158087|0 |1 is obsolete| | --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 158116 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158116&action=edit Bug 35190: Set default NULL for authorised_value_category in additional_fields table To test: 1. Start KTD without this patch 2. In the Administration module, create an Additional Field with Authorized Value set to None 3. Create another Additional Field with Authorized Value set to an existing authorized value 4. Apply patch and updatedatabase 5. Access the database in the command line with koha-mysql kohadev 6. Select all rows from additional_fields 7. Confirm that the two Additional Fields from earlier have values of NULL and the correct authorized value, respectively, in their authorised_value_category fields. 8. reset_all to test new install 9. Access the database in the command line 10. Show the table structure for additional_fields and confirm that default for authorised_value_category is NULL Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158088|0 |1 is obsolete| | --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 158117 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158117&action=edit Bug 35190: Adjust tests Test plan: prove t/db_dependent/Koha/AdditionalField.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158090|0 |1 is obsolete| | --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 158118 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158118&action=edit Bug 35190: Adjust UI handling to avoid inserting an empty string To test: 1. In the Administration module, create an Additional Field that is not linked to an authorized value 2. Create another Additional Field that is linked to an authorized value 3. Access the database in the command line (koha-mysql kohadev) 4. Select all from additional_fields 5. Confirm that each field correctly lists either the appropriate authorized value, or NULL Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |katrin.fischer@bsz-bw.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Marcel de Rooy from comment #6)
(In reply to Marcel de Rooy from comment #5)
# Failed test 'no default category' # at /usr/share/koha/t/db_dependent/Koha/AdditionalField.t line 33. # got: '' # expected: undef # Looks like you failed 1 test of 4.
Will take a look now.
Easy fix: run the dbrev LOL
Thx for leaving the comment, I ran into this too :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158116|0 |1 is obsolete| | --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 158203 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158203&action=edit Bug 35190: Set default NULL for authorised_value_category in additional_fields table To test: 1. Start KTD without this patch 2. In the Administration module, create an Additional Field with Authorized Value set to None 3. Create another Additional Field with Authorized Value set to an existing authorized value 4. Apply patch and updatedatabase 5. Access the database in the command line with koha-mysql kohadev 6. Select all rows from additional_fields 7. Confirm that the two Additional Fields from earlier have values of NULL and the correct authorized value, respectively, in their authorised_value_category fields. 8. reset_all to test new install 9. Access the database in the command line 10. Show the table structure for additional_fields and confirm that default for authorised_value_category is NULL Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158117|0 |1 is obsolete| | --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 158204 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158204&action=edit Bug 35190: Adjust tests Test plan: prove t/db_dependent/Koha/AdditionalField.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158118|0 |1 is obsolete| | --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 158205 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158205&action=edit Bug 35190: Adjust UI handling to avoid inserting an empty string To test: 1. In the Administration module, create an Additional Field that is not linked to an authorized value 2. Create another Additional Field that is linked to an authorized value 3. Access the database in the command line (koha-mysql kohadev) 4. Select all from additional_fields 5. Confirm that each field correctly lists either the appropriate authorized value, or NULL Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to master |Pushed to stable Version(s)|23.11.00 |23.11.00,23.05.06 released in| | --- Comment #15 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.05.x for 23.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pedro.amorim@ptfs-europe.co | |m Status|Pushed to stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35190 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |35197 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35197 [Bug 35197] Expose additional fields through REST API -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org