| Summary: | Preserve mandatory fields even if hidden when duplicating item | ||
|---|---|---|---|
| Product: | Koha | Reporter: | David Gustafsson <glasklas> |
| Component: | Staff interface | Assignee: | David Gustafsson <glasklas> |
| Status: | Failed QA --- | QA Contact: | Testopia <testopia> |
| Severity: | enhancement | ||
| Priority: | P5 - low | CC: | gmcharlt |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
| Attachments: |
Bug 40869: Preserve mandatory fields even if hidden when duplicating item
Bug 40869: Fix tests and documentation after changing argument name Bug 40869: Fix incorrect argument name |
||
|
Description
David Gustafsson
2025-09-24 12:42:35 UTC
Created attachment 186878 [details] [review] 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 Created attachment 186885 [details] [review] Bug 40869: Fix tests and documentation after changing argument name Created attachment 186887 [details] [review] Bug 40869: Fix incorrect argument name 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). |