[Bug 30376] New: Unable to save item if field date acquired is set mandatory
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30376 Bug ID: 30376 Summary: Unable to save item if field date acquired is set mandatory Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: lari.taskula@hypernova.fi QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl If you set 952$d (date acquired or "dateaccessioned") as mandatory in your MARC framework, you'll be unable to edit or add items because item form validation fails with error "1 mandatory fields empty". To reproduce: 1. Edit a MARC framework of your choice (e.g. Default) 2. Locate 952$d "Date acquired" and click Edit /cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield=952&frameworkcode=#subdfield 3. Tick "Mandatory" checkbox 4. Save changes 5. Edit any item using MARC framework you edited in step 1 /cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=123&itemnumber=456 6. Set "Date acquired" to any date 7. Click Save 8. Observe error "- 1 mandatory fields empty (highlighted)" (JavaScript alert) -- 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=30376 Lari Taskula <lari.taskula@hypernova.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=30376 --- Comment #1 from Lari Taskula <lari.taskula@hypernova.fi> --- Created attachment 132317 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132317&action=edit Bug 30376: Fix missing mandatory date acquired error on item save If you set 952$d (date acquired or "dateaccessioned") as mandatory in your MARC framework, you'll be unable to edit or add items because item form validation fails with error "1 mandatory fields empty". To test: 1. Edit a MARC framework of your choice (e.g. Default) 2. Locate 952$d "Date acquired" and click Edit /cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield=952&frameworkcode=#subdfield 3. Tick "Mandatory" checkbox 4. Save changes 5. Edit any item using MARC framework you edited in step 1 /cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=123&itemnumber=456 6. Set "Date acquired" to any date 7. Click Save 8. Observe error "- 1 mandatory fields empty (highlighted)" (JavaScript alert) 9. Apply patch 10. Repeat steps 5-7 11. Observe no error, item saves as expected -- 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=30376 Johanna Räisä <johanna.raisa@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #132317|0 |1 is obsolete| | CC| |johanna.raisa@koha-suomi.fi --- Comment #2 from Johanna Räisä <johanna.raisa@koha-suomi.fi> --- Created attachment 132985 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132985&action=edit Bug 30376: Fix missing mandatory date acquired error on item save If you set 952$d (date acquired or "dateaccessioned") as mandatory in your MARC framework, you'll be unable to edit or add items because item form validation fails with error "1 mandatory fields empty". To test: 1. Edit a MARC framework of your choice (e.g. Default) 2. Locate 952$d "Date acquired" and click Edit /cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield=952&frameworkcode=#subdfield 3. Tick "Mandatory" checkbox 4. Save changes 5. Edit any item using MARC framework you edited in step 1 /cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=123&itemnumber=456 6. Set "Date acquired" to any date 7. Click Save 8. Observe error "- 1 mandatory fields empty (highlighted)" (JavaScript alert) 9. Apply patch 10. Repeat steps 5-7 11. Observe no error, item saves as expected Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com> -- 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=30376 Johanna Räisä <johanna.raisa@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- 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=30376 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com Status|Signed Off |Failed QA --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- This patch does not work for me, I get an error in the console Uncaught ReferenceError: flatpick_editor is not defined -- 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=30376 --- Comment #4 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Well, the patch is actually working if you follow your test plan, but you forgot a regression step: don't fill in a date and expect the alert. -- 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=30376 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lari.taskula@hypernova.fi |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=30376 --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 133043 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=133043&action=edit Bug 30376: [ALTERNATIVE PATCH] Fix missing mandatory date acquired error on item save -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30376 --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- This patch seems to work as expected. Please confirm. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30376 Johanna Räisä <johanna.raisa@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #133043|0 |1 is obsolete| | --- Comment #7 from Johanna Räisä <johanna.raisa@koha-suomi.fi> --- Created attachment 133054 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=133054&action=edit Bug 30376: [ALTERNATIVE PATCH] Fix missing mandatory date acquired error on item save Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com> This alternative patch works better. After testing the first patch more there was a problem of saving mandatory fields, it allowed to save all empty mandatory fields. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30376 Johanna Räisä <johanna.raisa@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30376 Joonas Kylmälä <joonas.kylmala@iki.fi> 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=30376 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #132985|0 |1 is obsolete| | Attachment #133054|0 |1 is obsolete| | --- Comment #8 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- Created attachment 133134 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=133134&action=edit Bug 30376: Fix missing mandatory date acquired error on item save Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30376 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joonas.kylmala@iki.fi QA Contact|testopia@bugs.koha-communit |joonas.kylmala@iki.fi |y.org | --- Comment #9 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30376 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30376 --- Comment #10 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, thanks to everybody involved 🦄 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30376 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Resolution|--- |FIXED Status|Pushed to master |RESOLVED --- Comment #11 from Kyle M Hall <kyle@bywatersolutions.com> --- Unable to replicate bug in 21.11.x. If I am mistaken please let me know! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30376 --- Comment #12 from Johanna Räisä <johanna.raisa@koha-suomi.fi> --- (In reply to Kyle M Hall from comment #11)
Unable to replicate bug in 21.11.x. If I am mistaken please let me know!
I tested on 21.11.x and the bug was also in it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30376 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |--- Status|RESOLVED |REOPENED --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Johanna Räisä from comment #12)
(In reply to Kyle M Hall from comment #11)
Unable to replicate bug in 21.11.x. If I am mistaken please let me know!
I tested on 21.11.x and the bug was also in it.
Thanks for the confirmation! I'll get this backported. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30376 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30376 Kyle M Hall <kyle@bywatersolutions.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=30376 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=30376 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30376 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.05.00 |22.05.00,21.11.05 released in| | Status|Pushed to master |Pushed to stable --- Comment #14 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.11.x for 21.11.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30376 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com Status|Pushed to stable |RESOLVED Resolution|--- |FIXED --- Comment #15 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Unable to recreate on 21.05. Not backporting. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org