When trying to add an order using the ACQ framework with a 008@ tag, Koha explodes: Control fields (generally, just tags below 010) do not have subfields, use data() at /home/vagrant/kohaclone/C4/Acquisition.pm line 3272. at /usr/share/perl/5.24/Carp.pm line 167
I do not recreate. Do you have a default value in ACQ for 008?
Hi Jonathan, sorry, running out of time to retest right now - yes, I was using a default value as I ran into this testing the new placeholder (bug 24134)
Created attachment 96732 [details] [review] Bug 24294: Add default value support for control fields in ACQ framework When trying to add an order using the ACQ framework with a 008@ tag, Koha explodes: Control fields (generally, just tags below 010) do not have subfields, use data() at /home/vagrant/kohaclone/C4/Acquisition.pm line 3272. Test plan: Set a default value for a control field in the ACQ framework Turn on UseACQFrameworkForBiblioRecords Create a new order from a new record The default value should be displayed Save => No crash
Created attachment 96777 [details] [review] Bug 24294: Add default value support for control fields in ACQ framework When trying to add an order using the ACQ framework with a 008@ tag, Koha explodes: Control fields (generally, just tags below 010) do not have subfields, use data() at /home/vagrant/kohaclone/C4/Acquisition.pm line 3272. Test plan: Set a default value for a control field in the ACQ framework Turn on UseACQFrameworkForBiblioRecords Create a new order from a new record The default value should be displayed Save => No crash Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
'008' => { x => { defaultvalue => 'xxx' }, }, This works too, telling me that the test does not verify it..
(In reply to Marcel de Rooy from comment #5) > '008' => { > x => { defaultvalue => 'xxx' }, > }, > This works too, telling me that the test does not verify it.. I do not understand what you mean. The test fails without the change to FillWithDefaultValues.
Ok got it. Here 008 has a default value, and the record has a 008. So the default value will not be used.
Switching back to NQA as the QA question has been answered.
Will have a look
Created attachment 99582 [details] [review] Bug 24294: Add default value support for control fields in ACQ framework When trying to add an order using the ACQ framework with a 008@ tag, Koha explodes: Control fields (generally, just tags below 010) do not have subfields, use data() at /home/vagrant/kohaclone/C4/Acquisition.pm line 3272. Test plan: Set a default value for a control field in the ACQ framework Turn on UseACQFrameworkForBiblioRecords Create a new order from a new record The default value should be displayed Save => No crash Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 99583 [details] [review] Bug 24294: (QA follow-up) Add rollback and 008 default test Default for 008 was not tested yet. Only wondering if we should insert default values only when we meet an undefined value. Or should we also add if we meet an empty string? Is the latter not more realistic in MARC? Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thx Marcel!
Nice work everyone! Pushed to master for 20.05
backported to 19.11.x branch for 19.11.05
backported to 19.05.x for 19.05.10
I am having trouble recreating, is somebody able to confirm that this patch works for 18.11.x?