See bug 32478. You could even add a field 'delete' in the pref. This is really bad.
Created attachment 151759 [details] [review] Bug 33844: Modify test to show problem Add delete key. Without the follow-up, this triggers a delete. Test fails. DBIx::Class::Row::delete(): Not in database at /usr/share/koha/Koha/Object.pm line 234 Test plan: Run t/db_dependent/Koha/Item.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 151760 [details] [review] Bug 33844: Fix is_denied_renewal Going via result_set->has_column does cost actually nothing if the object is already there. Test plan: Run again t/db_dependent/Koha/Item.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 151785 [details] [review] Bug 33844: Modify test to show problem Add delete key. Without the follow-up, this triggers a delete. Test fails. DBIx::Class::Row::delete(): Not in database at /usr/share/koha/Koha/Object.pm line 234 Test plan: Run t/db_dependent/Koha/Item.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 151786 [details] [review] Bug 33844: Fix is_denied_renewal Going via result_set->has_column does cost actually nothing if the object is already there. Test plan: Run again t/db_dependent/Koha/Item.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
We usually use Koha::Objects->columns to retrieve the exist columns. Not sure what's the fastest here however.
(In reply to Jonathan Druart from comment #5) > We usually use Koha::Objects->columns to retrieve the exist columns. Not > sure what's the fastest here however. This is the fastest. Timed a few things here.
Created attachment 152110 [details] [review] Bug 33844: Modify test to show problem Add delete key. Without the follow-up, this triggers a delete. Test fails. DBIx::Class::Row::delete(): Not in database at /usr/share/koha/Koha/Object.pm line 234 Test plan: Run t/db_dependent/Koha/Item.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 152111 [details] [review] Bug 33844: Fix is_denied_renewal Going via result_set->has_column does cost actually nothing if the object is already there. Test plan: Run again t/db_dependent/Koha/Item.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Pushed to master for 23.11. Nice work everyone, thanks!
Pushed to master for 23.05. Nice work everyone, thanks!
Nice work everyone! Pushed to 22.11.x for next release