Bug 30228 - Batch item modification fails if only action is deleting subfields
Summary: Batch item modification fails if only action is deleting subfields
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: 21.11
Hardware: All Linux
: P5 - low minor
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-04 18:26 UTC by Hannah Co
Modified: 2022-03-10 23:23 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hannah Co 2022-03-04 18:26:35 UTC
When running batch item modification, if the only action is checked box(es) to delete a subfield, the batch item modification fails. The "Job has been enqueued" screen appears. On clicking "View detail of the enqueued job", we receive a 500 error. On checking the item(s), the subfields we've tried to delete are still populated with the previous data.
If any values are added/edited, or dropdowns selected for any subfields, the subfields with checked boxes will be correctly deleted. Subfield deletion without any other edits does not work.
Comment 1 Fridolin Somers 2022-03-10 04:30:14 UTC
Hi, I can't reproduce on master.

Can you ?
Maybe on a sandbox :
https://wiki.koha-community.org/wiki/Sandboxes
Comment 2 Hannah Co 2022-03-10 23:23:44 UTC
Error messages from my logs:

AH01215: Can't use an undefined value as an ARRAY reference at /usr/share/koha/lib/Koha/BackgroundJob/BatchUpdateItem.pm line 179.: /usr/share/koha/intranet/cgi-bin/admin/background_jobs.pl, referer: https://koha-staff.northwestu.edu/cgi-bin/koha/tools/batchMod.pl
End of script output before headers: background_jobs.pl, referer: https://koha-staff.northwestu.edu/cgi-bin/koha/tools/batchMod.pl

A Bywater sandbox gives me the same error when I click into "View detail of the enqueued job" too quickly. In the sandbox I can refresh the page and the batch job will complete, but that doesn't happen on my instance.