[Bug 13465] New: Fields controlled by authorized values cannot be unset
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13465 Bug ID: 13465 Summary: Fields controlled by authorized values cannot be unset Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: gmcharlt@gmail.com Reporter: mirko@abunchofthings.net QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl In item cataloguing, if you set a field controlled by an authorized value, changing it back to '<empty>' does not work. The field cannot be reset. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13465 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Severity|normal |critical -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13465 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I confirmed the bug in our 3.18.1 database - you can't unset not for loan, damaged or smilar values once you have set them. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13465 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Fields controlled by |Fields controlled by |authorized values cannot be |authorized values cannot be |unset |unset (Lost, damaged, not | |for loan status, ...) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13465 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #2 from Jonathan Druart <jonathan.druart@biblibre.com> --- Could you please give more detail, I don't reproduce (but not sure to understand how to reproduce). Does the problem still exist on master? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13465 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- To test: - edit an item, set a status that is controlled by an authorized value examples tested: damaged, not for loan - check the status saved correctly - edit the item again, try to reset the status to empty - verify the item is saved, but the status remains -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13465 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Depends on| |12874 Assignee|gmcharlt@gmail.com |jonathan.druart@biblibre.co | |m --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- Thanks. Related to bug 12874. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13465 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13465 --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 34478 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34478&action=edit Bug 13465: Fix silly regex on generating default values hash This is introduced by Bug 12874. Without this patch, it's not possible to clear (set to an empty string) an item field. This appended for field linked to an AV list but even if it's not. The regex tried to prefix 'my_field' with 'items.' to have 'items.my_field'. It wanted to take care of the case where the prefix already exists (Actually only 1: 'items.cn_source'). The regex is changed to: "add the prefix only if the string does not contain a dot". Test plan: - edit an item, set a status that is controlled by an authorized value examples tested: damaged, not for loan - check the status saved correctly - edit the item again, reset the status to empty - check the status saved correctly -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13465 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13465 Mirko Tietgen <mirko@abunchofthings.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #6 from Mirko Tietgen <mirko@abunchofthings.net> --- With this patch applied, situation is worse. I can't save most fields. »damaged« does stay when set, other fields forget/ delete the value on save. But deleting a value that has been set before applying the patch works ;) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13465 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13465 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #34478|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 34508 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34508&action=edit Bug 13465: Correct the field prefix ambiguity This is introduced by Bug 12874. Without this patch, it's not possible to clear (set to an empty string) an item field. This appended for field linked to an AV list but even if it's not. The regex tried to prefix 'my_field' with 'items.' to have 'items.my_field'. It wanted to take care of the case where the prefix already exists (Actually only 1: 'items.cn_source'). The regex is changed to: "add the prefix only if the string does not contain a dot". Moreover an ambiguity existed on the prefix: in marc_subfield_structure, the kohafield is prefixed, but not in the key of the hash sent to ModItemFromMarc. Test plan: - edit an item, set a status that is controlled by an authorized value examples tested: damaged, not for loan - check the status saved correctly - edit the item again, reset the status to empty - check the status saved correctly - edit the item again, reset fields, edit fields - check the fields saved correctly -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13465 --- Comment #8 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Mirko Tietgen from comment #6)
With this patch applied, situation is worse. I can't save most fields. »damaged« does stay when set, other fields forget/ delete the value on save.
But deleting a value that has been set before applying the patch works ;)
Sorry, Mirko, it's was a quick fix and I did not test it deeply. This one should be better. Thanks for testing! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13465 Mirko Tietgen <mirko@abunchofthings.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #34508|0 |1 is obsolete| | --- Comment #9 from Mirko Tietgen <mirko@abunchofthings.net> --- Created attachment 34511 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34511&action=edit Bug 13465: Correct the field prefix ambiguity This is introduced by Bug 12874. Without this patch, it's not possible to clear (set to an empty string) an item field. This appended for field linked to an AV list but even if it's not. The regex tried to prefix 'my_field' with 'items.' to have 'items.my_field'. It wanted to take care of the case where the prefix already exists (Actually only 1: 'items.cn_source'). The regex is changed to: "add the prefix only if the string does not contain a dot". Moreover an ambiguity existed on the prefix: in marc_subfield_structure, the kohafield is prefixed, but not in the key of the hash sent to ModItemFromMarc. Test plan: - edit an item, set a status that is controlled by an authorized value examples tested: damaged, not for loan - check the status saved correctly - edit the item again, reset the status to empty - check the status saved correctly - edit the item again, reset fields, edit fields - check the fields saved correctly Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13465 Mirko Tietgen <mirko@abunchofthings.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13465 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13465 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #34511|0 |1 is obsolete| | --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 34519 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34519&action=edit [PASSED QA] Bug 13465: Correct the field prefix ambiguity This is introduced by Bug 12874. Without this patch, it's not possible to clear (set to an empty string) an item field. This appended for field linked to an AV list but even if it's not. The regex tried to prefix 'my_field' with 'items.' to have 'items.my_field'. It wanted to take care of the case where the prefix already exists (Actually only 1: 'items.cn_source'). The regex is changed to: "add the prefix only if the string does not contain a dot". Moreover an ambiguity existed on the prefix: in marc_subfield_structure, the kohafield is prefixed, but not in the key of the hash sent to ModItemFromMarc. Test plan: - edit an item, set a status that is controlled by an authorized value examples tested: damaged, not for loan - check the status saved correctly - edit the item again, reset the status to empty - check the status saved correctly - edit the item again, reset fields, edit fields - check the fields saved correctly Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13465 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13465 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |chris@bigballofwax.co.nz --- Comment #12 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.18.x will be in 3.18.2 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13465 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com --- Comment #13 from Mason James <mtj@kohaaloha.com> --- (In reply to Chris Cormack from comment #12)
Pushed to 3.18.x will be in 3.18.2
skipping patch for 3.16.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org