[Bug 31234] New: SubfieldsToAllowForRestrictedEditing : data from drop-down menu not stored
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31234 Bug ID: 31234 Summary: SubfieldsToAllowForRestrictedEditing : data from drop-down menu not stored Change sponsored?: --- Product: Koha Version: 21.11 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: pierre.genty@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl 1. A librarian with edit_items_restricted permission set 2. Item subfield not authorized for editing (SubfieldsToAllowForRestrictedEditing). In Marc framework, this subfield is linked to an authorized value (= drop-down menu) 3. When adding/editing item, this subfield has a default value from drop-down menu and is not editable (OK). 4. Once item is saved, the subfield is empty : it should have the default value from drop-down menu. -- 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=31234 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Depends on| |28445 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 [Bug 28445] Use the task queue for the batch delete and update items tool -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31234 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |fridolin.somers@biblibre.co |ity.org |m Severity|enhancement |major Status|NEW |ASSIGNED Version|21.11 |master -- 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=31234 --- Comment #1 from Fridolin Somers <fridolin.somers@biblibre.com> --- This comes from a change by Bug 28445 in items edition form : <select name="field_value" change to : <select name="[% kohafield | html %]" This breaks the special JS code : https://git.koha-community.org/Koha-community/Koha/src/commit/fc919fc796df42... I propose we use "select.input_marceditor". -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31234 --- Comment #2 from Fridolin Somers <fridolin.somers@biblibre.com> --- Item restricted edition dates back to Bug 7673 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31234 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31234 --- Comment #3 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 138145 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138145&action=edit Bug 31234: SubfieldsToAllowForRestrictedEditing - data from drop-down menu not stored Problem with items restricted edition, restriced fields with a drop-down menu are not stored, since 21.11. This comes from a change by Bug 28445 in items edition form : <select name="field_value" change to : <select name="[% kohafield | html %]" This breaks the special JS code : https://git.koha-community.org/Koha-community/Koha/src/commit/fc919fc796df42... I propose we use "select.input_marceditor". Test plan : 1. A librarian with 'edit_items_restricted' permission set 2. Item subfield not authorized for editing (SubfieldsToAllowForRestrictedEditing). In Marc framework, this subfield is linked to an authorized value (= drop-down menu). For exemple homebranch. 3. When adding/editing item, this subfield has a default value from drop-down menu and is not editable (OK). 4. Save item => Without patch : the subfield is empty, it should have the value from drop-down menu. => With patch : the subfield is saved with the value from drop-down menu. -- You are receiving this mail because: You are watching all bug changes.
git grep 'name..field_value' git grep 'name..field_value' -- koha-tmpl/ koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt: <select name="field_value" class="input_marceditor"> koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt: <input type="hidden" name="field_value" value="[% authid | html %]" /> koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt: <input type="hidden" name="field_value" value="[% authtypecode |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31234 --- Comment #4 from Fridolin Somers <fridolin.somers@biblibre.com> --- Important /!\ : There are other places with JS calling 'field_value', we should check if there are other bugs : html %]" /> koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt: if(! $(subfield_div).children("input[type='text'][name='field_value']").val() ){ koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt: $(subfield_div).children("input[type='text'][name='field_value']").val($("#serialseq" + serialId).val()); koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt: <select name="field_value" class="select2 input_marceditor"> koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt: <input type="hidden" name="field_value" value="[% item.itemnumber | html %]" /> koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt: <select name="field_value"> koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt: <input type="hidden" name="field_value" value="[% newserialloo.itemnumber | html %]" /> koha-tmpl/intranet-tmpl/prog/en/modules/services/itemrecorddisplay.tt: <select name="field_value" class="input_marceditor"> koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt: with value <input type="text" name="field_value" id="field_value" /> koha-tmpl/intranet-tmpl/prog/js/additem.js: .prevAll("[name='field_value']")[0]; koha-tmpl/intranet-tmpl/prog/js/additem.js: $(original).find("input[name='field_value']").each(function(){ koha-tmpl/intranet-tmpl/prog/js/additem.js: $(clone).find("div[id^='"+id+"'] input[name='field_value']").val(value); koha-tmpl/intranet-tmpl/prog/js/additem.js: $(original).find("select[name='field_value']").each(function(){ koha-tmpl/intranet-tmpl/prog/js/additem.js: $(clone).find("div[id^='"+id+"'] select[name='field_value']").val(value); koha-tmpl/intranet-tmpl/prog/js/additem.js: var input = $(this).prevAll("input[name='field_value']")[0]; -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31234 --- Comment #5 from Fridolin Somers <fridolin.somers@biblibre.com> --- BTW : The system preference 'SubfieldsToAllowForRestrictedEditing' edition is quite strange, why enter itemsfield 952/995 when it is obvious. Could be simply subfields separated with a comma : a,b,c -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31234 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Fridolin Somers from comment #5)
BTW : The system preference 'SubfieldsToAllowForRestrictedEditing' edition is quite strange, why enter itemsfield 952/995 when it is obvious. Could be simply subfields separated with a comma : a,b,c
In theory someone could have changed the item subfield and used something else... we'd never recommend to do that, but I guess it might be the case or was thought to be an option when the preference was added. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31234 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=31234 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #138145|0 |1 is obsolete| | --- Comment #7 from David Nind <david@davidnind.com> --- Created attachment 140410 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140410&action=edit Bug 31234: SubfieldsToAllowForRestrictedEditing - data from drop-down menu not stored Problem with items restricted edition, restriced fields with a drop-down menu are not stored, since 21.11. This comes from a change by Bug 28445 in items edition form : <select name="field_value" change to : <select name="[% kohafield | html %]" This breaks the special JS code : https://git.koha-community.org/Koha-community/Koha/src/commit/fc919fc796df42... I propose we use "select.input_marceditor". Test plan : 1. A librarian with 'edit_items_restricted' permission set 2. Item subfield not authorized for editing (SubfieldsToAllowForRestrictedEditing). In Marc framework, this subfield is linked to an authorized value (= drop-down menu). For exemple homebranch. 3. When adding/editing item, this subfield has a default value from drop-down menu and is not editable (OK). 4. Save item => Without patch : the subfield is empty, it should have the value from drop-down menu. => With patch : the subfield is saved with the value from drop-down menu. 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=31234 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31234 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31234 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140410|0 |1 is obsolete| | --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 141156 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141156&action=edit Bug 31234: SubfieldsToAllowForRestrictedEditing - data from drop-down menu not stored Problem with items restricted edition, restriced fields with a drop-down menu are not stored, since 21.11. This comes from a change by Bug 28445 in items edition form : <select name="field_value" change to : <select name="[% kohafield | html %]" This breaks the special JS code : https://git.koha-community.org/Koha-community/Koha/src/commit/fc919fc796df42... I propose we use "select.input_marceditor". Test plan : 1. A librarian with 'edit_items_restricted' permission set 2. Item subfield not authorized for editing (SubfieldsToAllowForRestrictedEditing). In Marc framework, this subfield is linked to an authorized value (= drop-down menu). For exemple homebranch. 3. When adding/editing item, this subfield has a default value from drop-down menu and is not editable (OK). 4. Save item => Without patch : the subfield is empty, it should have the value from drop-down menu. => With patch : the subfield is saved with the value from drop-down menu. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31234 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.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=31234 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.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=31234 --- Comment #10 from Fridolin Somers <fridolin.somers@biblibre.com> --- This must be backported to untill 21.11.x right ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31234 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.11.00 |22.11.00, 22.05.07 released in| | CC| |lucas@bywatersolutions.com Status|Pushed to master |Pushed to stable --- Comment #11 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 22.05.x for upcoming 22.05.07 release -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31234 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|22.11.00, 22.05.07 |22.11.00, 22.05.07, released in| |21.11.14 CC| |arthur.suzuki@biblibre.com --- Comment #12 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- applied to 21.11 for 21.11.14 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31234 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED --- Comment #13 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Missing dependencies for 21.05.x, it shouldn't be affected, no backport. Nothing to document it seems, marking resolved. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org