[Bug 37357] New: Authorised values in control fields cause Javascript errors
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37357 Bug ID: 37357 Summary: Authorised values in control fields cause Javascript errors Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: MARC Bibliographic data support Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org I have a library that uses an authorised value list in one of their MARC control fields, and I notice it causes Javascript errors. The label will be for tag_001_subfield_00_597551_809285 but the select2 select will have a name and ID of tag_001_subfield_@_597551_809285 In Koha/UI/Form/Builder/Biblio.pm, @ gets rewritten to 00 in some subfield contexts, but not all. The "id" in the "subfield_data" hash is correct, but sub build_authorized_values_list creates a name/id which uses @ instead. -- 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=37357 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |dcook@prosentient.com.au |ity.org | -- 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=37357 David Cook <dcook@prosentient.com.au> 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=37357 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Created attachment 168960 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168960&action=edit Bug 37357: Map @ to 00 for control field select lists This change adds the existing @ to 00 mapping for control fields to work for authorized value select lists as well. Test plan: 0. Apply the patch 1. koha-plack --reload kohadev 2. Make 001 subfield @ mandatory and give it an authorised value of branches for Default framework 3. Go to the New record editor for a Default record 4. Click "Save" 5. Note that the editor prompts you to fill in the 001 field 6. Fill in required fields and click "Save" 7. Note that all data is captured correctly 8. prove t/db_dependent/Koha/UI/Form/Builder/Biblio.t To prove that this wouldn't work without the patch, try the test plan on a different branch without this patch. You won't be prompted to fill in mandatory fields and the record will just save (or if a possible duplicate is detected it will just redirect you back to an empty editor) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37357 David Nind <david@davidnind.com> 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=37357 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168960|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 169036 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169036&action=edit Bug 37357: Map @ to 00 for control field select lists This change adds the existing @ to 00 mapping for control fields to work for authorized value select lists as well. Test plan: 0. Apply the patch 1. koha-plack --reload kohadev 2. Make 001 subfield @ mandatory and give it an authorised value of branches for Default framework 3. Go to the New record editor for a Default record 4. Click "Save" 5. Note that the editor prompts you to fill in the 001 field 6. Fill in required fields and click "Save" 7. Note that all data is captured correctly 8. prove t/db_dependent/Koha/UI/Form/Builder/Biblio.t To prove that this wouldn't work without the patch, try the test plan on a different branch without this patch. You won't be prompted to fill in mandatory fields and the record will just save (or if a possible duplicate is detected it will just redirect you back to an empty editor) Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37357 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #169036|0 |1 is obsolete| | --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 169092 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169092&action=edit Bug 37357: Map @ to 00 for control field select lists This change adds the existing @ to 00 mapping for control fields to work for authorized value select lists as well. Test plan: 0. Apply the patch 1. koha-plack --reload kohadev 2. Make 001 subfield @ mandatory and give it an authorised value of branches for Default framework 3. Go to the New record editor for a Default record 4. Click "Save" 5. Note that the editor prompts you to fill in the 001 field 6. Fill in required fields and click "Save" 7. Note that all data is captured correctly 8. prove t/db_dependent/Koha/UI/Form/Builder/Biblio.t To prove that this wouldn't work without the patch, try the test plan on a different branch without this patch. You won't be prompted to fill in mandatory fields and the record will just save (or if a possible duplicate is detected it will just redirect you back to an empty editor) Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37357 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |martin.renvoize@ptfs-europe | |.com --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Trivial fix, thanks David Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37357 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37357 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37357 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37357 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|martin.renvoize@ptfs-europe | |.com | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37357 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|24.11.00 |24.11.00,24.05.06 released in| | CC| |lucas@bywatersolutions.com --- Comment #6 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Backported to 24.05.x for upcoming 24.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37357 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37357 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Pushed to oldoldstable CC| |fridolin.somers@biblibre.co | |m Version(s)|24.11.00,24.05.06 |24.11.00,24.05.06,23.11.11 released in| | --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37357 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldoldstable |Needs documenting CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #8 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11 unless requested -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org