[Bug 21927] New: Acq: Allow blank values in pull downs in the item form when subfield is mandatory
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21927 Bug ID: 21927 Summary: Acq: Allow blank values in pull downs in the item form when subfield is mandatory Change sponsored?: --- Product: Koha Version: 17.11 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org This has already been fixed for the item form in cataloguing (bug 14662), but sadly we missed that there is an item form in acq too! To test: - Set AcQCreateItem to "on order" - Create a new order line - Check that item type shows and has an empty entry that is preselected - Change 952y in the ACQ framework to be mandatory - Verify the empty entry is gone and the first value is preselected (bug) -- 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=21927 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal Depends on| |14662 Version|17.11 |master --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- After some digging in the code I believe we need the same or similar changes as bug 14662 for C4::Items::PrepareItemrecordDisplay. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14662 [Bug 14662] Allow blank values in pull downs in cataloguing forms when subfield is mandatory -- 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=21927 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21927 Séverine Queune <severine.queune@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |severine.queune@bulac.fr -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21927 Chris Slone <cslone@camdencountylibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cslone@camdencountylibrary. | |org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21927 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |katrin.fischer@bsz-bw.de |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=21927 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |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=21927 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 102892 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102892&action=edit Bug 21927: Acq - Add blank values in pull downs of mandatory item subfields This is the same fix as on bug 14662, which fixed the behaviour in cataloguing, but for the item form in acquisitions. The code assumes that if a subfield is marked as mandatory, there should be no empty entry in the pull downs. This assumption is not correct, as it leads to the first entry of the pull down being preselected if there is no default set. As the field can never be 'unset', there will never be a 'required' warning. Furthermore, it might be counterproductive to use mandatory fields, as it might be easily forgotten to change the preselected value and those mistakes will be hard to find. Correct behaviour would be to preselect the empty value when there is no default. This means on saving the item an error message is triggered and the cataloger is forced to set the value. To test: - This is best tested with an ACQ framework, but default can be used when no ACQ framework was created. - In your MARC bibliographic framework: - In 952 make itemtype, classification source and some other pull downs like location or collection mandatory and set them to visibel if needed - Create a new basket with 'items created while ordering' - Add a new order, an existing record with 942$c set will work best - Add items for your order line - Verify that the first value of each pull down is preselected, there is no way to trigger the 'required' error - Apply patch - Add a new order line - Verify that classification source is preselected according to the DefaultClassificationSource system preference (try unsetting it later) - Verify all mandatory fields can be set to empty - Verify that you can't save before correctly setting them - Change your frameworks and set a default for itemtype (Ex: BK) and another mandatory and non-mandatory field of your choice - Add a new order line and item and verify the defaults are selected -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21927 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=21927 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #102892|0 |1 is obsolete| | --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 103632 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103632&action=edit Bug 21927: Acq - Add blank values in pull downs of mandatory item subfields This is the same fix as on bug 14662, which fixed the behaviour in cataloguing, but for the item form in acquisitions. The code assumes that if a subfield is marked as mandatory, there should be no empty entry in the pull downs. This assumption is not correct, as it leads to the first entry of the pull down being preselected if there is no default set. As the field can never be 'unset', there will never be a 'required' warning. Furthermore, it might be counterproductive to use mandatory fields, as it might be easily forgotten to change the preselected value and those mistakes will be hard to find. Correct behaviour would be to preselect the empty value when there is no default. This means on saving the item an error message is triggered and the cataloger is forced to set the value. To test: - This is best tested with an ACQ framework, but default can be used when no ACQ framework was created. - In your MARC bibliographic framework: - In 952 make itemtype, classification source and some other pull downs like location or collection mandatory and set them to visibel if needed - Create a new basket with 'items created while ordering' - Add a new order, an existing record with 942$c set will work best - Add items for your order line - Verify that the first value of each pull down is preselected, there is no way to trigger the 'required' error - Apply patch - Add a new order line - Verify that classification source is preselected according to the DefaultClassificationSource system preference (try unsetting it later) - Verify all mandatory fields can be set to empty - Verify that you can't save before correctly setting them - Change your frameworks and set a default for itemtype (Ex: BK) and another mandatory and non-mandatory field of your choice - Add a new order line and item and verify the defaults are selected 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=21927 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- What about the 2 left? 1658 push @authorised_values, "" 1659 unless ( $tagslib->{$tag}->{$subfield}->{mandatory} ); 1667 push @authorised_values, "" 1668 unless ( $tagslib->{$tag}->{$subfield}->{mandatory} ); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21927 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- If these are the lines for hombranch, holdingbranch - check the linked bug. We decided branch should not have empty entries, so I kept the same behaviour here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21927 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=21927 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #103632|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 103682 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103682&action=edit Bug 21927: Acq - Add blank values in pull downs of mandatory item subfields This is the same fix as on bug 14662, which fixed the behaviour in cataloguing, but for the item form in acquisitions. The code assumes that if a subfield is marked as mandatory, there should be no empty entry in the pull downs. This assumption is not correct, as it leads to the first entry of the pull down being preselected if there is no default set. As the field can never be 'unset', there will never be a 'required' warning. Furthermore, it might be counterproductive to use mandatory fields, as it might be easily forgotten to change the preselected value and those mistakes will be hard to find. Correct behaviour would be to preselect the empty value when there is no default. This means on saving the item an error message is triggered and the cataloger is forced to set the value. To test: - This is best tested with an ACQ framework, but default can be used when no ACQ framework was created. - In your MARC bibliographic framework: - In 952 make itemtype, classification source and some other pull downs like location or collection mandatory and set them to visibel if needed - Create a new basket with 'items created while ordering' - Add a new order, an existing record with 942$c set will work best - Add items for your order line - Verify that the first value of each pull down is preselected, there is no way to trigger the 'required' error - Apply patch - Add a new order line - Verify that classification source is preselected according to the DefaultClassificationSource system preference (try unsetting it later) - Verify all mandatory fields can be set to empty - Verify that you can't save before correctly setting them - Change your frameworks and set a default for itemtype (Ex: BK) and another mandatory and non-mandatory field of your choice - Add a new order line and item and verify the defaults are selected Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21927 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.05.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=21927 --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21927 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|20.05.00 |20.05.00, 19.11.06 released in| | CC| |joy@bywatersolutions.com --- Comment #8 from Joy Nelson <joy@bywatersolutions.com> --- Backported to 19.11.x for 19.11.06 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org