[Bug 40869] New: Preserve mandatory fields even if hidden when duplicating item
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40869 Bug ID: 40869 Summary: Preserve mandatory fields even if hidden when duplicating item Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Staff interface Assignee: koha-bugs@lists.koha-community.org Reporter: glasklas@gmail.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com When item fields are mandatory, which usually indicate they are somehow critical for functionality and expected to exist in Koha, it makes sense they should be preserved when duplicating an item, even if the field is hidden. Right now hidden fields are ignored using the "ignore_invisible_subfields" option in the form builder for item. If for current library (holding branch) is hidden (which is the case for our library), the biblio page will crash after duplicating an item, which now has a missing holding branch. Fixing this is simple by adding a check for the mandatory attribute in the check for "ignore_invisible_subfields" (I also renamed this option to "ignore_non_mandatory_invisible_subfields" for clarity. -- 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=40869 --- Comment #1 from David Gustafsson <glasklas@gmail.com> --- Created attachment 186878 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186878&action=edit Bug 40869: Preserve mandatory fields even if hidden when duplicating item Preserve mandatory fields while when duplicating an item, also when they are non visible. To test: 1) Go to MARC bibliographic framwork and view the marc structure for some framework. 2) Select edit subfield b for tag 952 and make it non visible 3) Go to a biblio using the framework above and edit an item. In the "actions" dropdown, choose to duplicate an item. 4) Now go to the detail page for the biblio, "Current library" should be empty and it should produce a 500 error. 5) Apply patch. 6) Perform steps 3-4 for some other biblio using the same framework. 7) The "Current library" should now be set to the same value as the source item, and no crash should occur. Sponsored-by: Gothenburg University Library -- 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=40869 David Gustafsson <glasklas@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=40869 David Gustafsson <glasklas@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |glasklas@gmail.com |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=40869 --- Comment #2 from David Gustafsson <glasklas@gmail.com> --- Created attachment 186885 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186885&action=edit Bug 40869: Fix tests and documentation after changing argument name -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40869 --- Comment #3 from David Gustafsson <glasklas@gmail.com> --- Created attachment 186887 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186887&action=edit Bug 40869: Fix incorrect argument name -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40869 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Reading through the test plan I wonder if this is the right solution or not. I can see the merit for values like homebranch/holdingbranch. We usually use a "Default" with the branchcode for these, but don't set the fields to mandatory. My first reaction would be, that we should display an error message somewhere if a mandatory field is hidden from a form on saving. I believe that would match the behavior we see in other places like patron self registration. If we move on with this: 1) QA tests fail (tidy) 2) Unit tests were updated for the name change, but I feel there should be additional tests for the difference between mandatory and optional hidden fields as well (up to QA) (setting failed QA to raise attention of the developer and for 1) and 2). -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org