Created attachment 3561 [details] [review] Proposed Patch
Created attachment 3562 [details] [review] Followup patch
MT3269 : BatchMod Feature blanking subfields there is now a checkbox after each label that you can check in order to wipe out the corresponding subfield in all the items MT3269 Fixing tools/batchMod.pl tags/subfields display display all the subfields used in framework no matter if they are hidden or shown
On testing the first patch I find that only the first item has it's value changed. I had 2 items and chose a shelving location value and it only applied to the first item - not both of them. I also chose to remove that shelving location using the checkbox and nothing happened ... when I applied the follow up I got the following on the batch item mod page: Software error: syntax error at /home/nengard/kohaclone/tools/batchMod.pl line 326, near "elsif" Global symbol "@authorised_values" requires explicit package name at /home/nengard/kohaclone/tools/batchMod.pl line 327. Global symbol "$tag" requires explicit package name at /home/nengard/kohaclone/tools/batchMod.pl line 327. Global symbol "$subfield" requires explicit package name at /home/nengard/kohaclone/tools/batchMod.pl line 327. Global symbol "@authorised_values" requires explicit package name at /home/nengard/kohaclone/tools/batchMod.pl line 331. Global symbol "%authorised_lib" requires explicit package name at /home/nengard/kohaclone/tools/batchMod.pl line 332. syntax error at /home/nengard/kohaclone/tools/batchMod.pl line 336, near "}" Global symbol "$tag" requires explicit package name at /home/nengard/kohaclone/tools/batchMod.pl line 337. Global symbol "$subfield" requires explicit package name at /home/nengard/kohaclone/tools/batchMod.pl line 337. Global symbol "@authorised_values" requires explicit package name at /home/nengard/kohaclone/tools/batchMod.pl line 338. Global symbol "$tag" requires explicit package name at /home/nengard/kohaclone/tools/batchMod.pl line 338. Global symbol "$subfield" requires explicit package name at /home/nengard/kohaclone/tools/batchMod.pl line 338. Global symbol "$value" requires explicit package name at /home/nengard/kohaclone/tools/batchMod.pl line 345. Global symbol "$value" requires explicit package name at /home/nengard/kohaclone/tools/batchMod.pl line 345. Global symbol "@authorised_values" requires explicit package name at /home/nengard/kohaclone/tools/batchMod.pl line 347. Global symbol "%authorised_lib" requires explicit package name at /home/nengard/kohaclone/tools/batchMod.pl line 348. Global symbol "$value" requires explicit package name at /home/nengard/kohaclone/tools/batchMod.pl line 350. Global symbol "$value" requires explicit package name at /home/nengard/kohaclone/tools/batchMod.pl line 350. syntax error at /home/nengard/kohaclone/tools/batchMod.pl line 353, near "}" /home/nengard/kohaclone/tools/batchMod.pl has too many errors.
I tested without the patches to confirm that modification did work before the patch and when I modified both items both items were changed - so this patch breaks the tool.
This bug is mentioned in: Bug 6018 : MT3269 : BatchMod Feature blanking subfields http://lists.koha-community.org/pipermail/koha-patches/2011-March/014386.html Bug 6018 : MT3269 Fixing tools/batchMod.pl tags/subfields display http://lists.koha-community.org/pipermail/koha-patches/2011-March/014387.html
Julian, can you have a look please ? It works well on biblibre/master, libraries have used this for months and on thousands of items at once. (Or maybe bug chris_c)
It seems that the first patch is already in master (see bug 6068). But the second patch does not apply on master. Applying: Bug 6018 : MT3269 Fixing tools/batchMod.pl tags/subfields display /home/julian/koha/versions/community-master/.git/rebase-apply/patch:14: trailing whitespace. use C4::Branch; /home/julian/koha/versions/community-master/.git/rebase-apply/patch:50: space before tab in indent. next if ($tag ne $itemtagfield); /home/julian/koha/versions/community-master/.git/rebase-apply/patch:56: space before tab in indent. next if (!defined ($tagslib->{$tag}->{$subfield}->{'tab'}) || $tagslib->{$tag}->{$subfield}->{'tab'} eq -1); /home/julian/koha/versions/community-master/.git/rebase-apply/patch:89: trailing whitespace. $attributes_no_value = qq(disabled="disabled"); /home/julian/koha/versions/community-master/.git/rebase-apply/patch:162: trailing whitespace. error: patch failed: tools/batchMod.pl:27 error: tools/batchMod.pl: patch does not apply Patch failed at 0001 Bug 6018 : MT3269 Fixing tools/batchMod.pl tags/subfields display
I think the second patch is still needed. I tried batch editing an item from the fast add framework and for example $i does not show up in the list of item fields.
Second patch does not apply and can't fix the conflict.
It's an old patch and I don't remember what it does... Is the only need to display all subfields, whatever the hidden value is? In this case I can make another patch much more simple.
I think it might be good to show all subfields, because you can have items from different frameworks on your list easily. Not sure which framework is used in this case currently? There are also fields like onloan you don't want people to batch edit. I am not sure, what the best solution here is.
Still valid?
No activity since 2012, and it's not clear what the patch is supposed to do. I think we can close this bug.