[Bug 28445] New: Use the task queue for the batch delete and update items tool
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Bug ID: 28445 Summary: Use the task queue for the batch delete and update items tool Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart+koha@gmail.com QA Contact: testopia@bugs.koha-community.org Blocks: 22417 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22417 [Bug 22417] Add a task queue -- 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=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |28158, 26080, 22417 Blocks|22417 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22417 [Bug 22417] Add a task queue https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26080 [Bug 26080] Use the task queue for the batch delete records tool https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28158 [Bug 28158] Lost items not charging when marked lost from batch item modification -- 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=28445 --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 121372 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121372&action=edit Bug 28445: WIP - Use the task queue for the batch delete and update items tool -- 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=28445 Bug 28445 depends on bug 28158, which changed state. Bug 28158 Summary: Lost items not charging when marked lost from batch item modification https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28158 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED Resolution|--- |FIXED -- 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=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |28765 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28765 [Bug 28765] sub find_value not used in tools/batchMod.pl -- 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=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |28769 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28769 [Bug 28769] tabloop not used in cataloguing plugins -- 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=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |27526 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27526 [Bug 27526] Remove Mod/AddItemFromMarc from additem.pl -- 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=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |ity.org |com Status|NEW |ASSIGNED -- 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=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au, | |katrin.fischer@bsz-bw.de, | |kyle@bywatersolutions.com, | |m.de.rooy@rijksmuseum.nl, | |martin.renvoize@ptfs-europe | |.com, | |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121372|0 |1 is obsolete| | --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 123221 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123221&action=edit Bug 28445: Isolate add item form to an include file To ease reusability -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 123222 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123222&action=edit Bug 28445: Move controller code to Koha::UI::Form::Builder::Item To ease reusability -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #4 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 123223 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123223&action=edit Bug 28445: Use Koha::UI::Form::Builder::Item from batchmod as well Now that it's reusable, let use it somewhere else! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 123224 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123224&action=edit Bug 28445: Adjust code to handle regexs -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 123225 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123225&action=edit Bug 28445: Start form with empty library for batch mod -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 123226 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123226&action=edit Bug 28445: Add the capability to provide more info to the background job detail view We already had the need for that, when bibliographic records are modified in batch we wanted to add a "Add to list" feature, and so pass a list of lists/virtual shelves to the template. Here we will want to pass the infos of the items that have been modified to display a table. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #8 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 123227 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123227&action=edit Bug 28445: Use the task queue for the batch delete and update items tool Here we go! Disclaimer: this patch is huge and does many things, but splitting it in several chunks would be time consuming and painful to rebase. However it adds many tests and isolate/refactor code to make it way more reusable. This patchset will make the "batch item modification" and "batch item deletion" features use the task queue (reminder: Since bug 28158, and so 21.05.00, we do no longer use the old "background job" functionality and the user does not get any info about the progress of the job). More than that, more of the code to build an item form and a list of items is now isolated in module (.pm) and include files (.inc) We are reusing the changes made by bug 27526 that simplifies the way we edit/create items (no more unecessary serialization Koha > MARC > MARCXML
XML > HTML)
New module: * Koha::BackgroundJob::BatchDeleteItem Subclass for process item deletion in batch * Koha::BackgroundJob::BatchUpdateItem Subclass for process item modification in batch * Koha::Item::Attributes We needed an object to represent item's attributes that are not mapped with a koha field (aka "more subfields xml") This module will help us to create the marcxml from a hashref and the reverse. * Koha::UI::Form::Builder::Item The code that was used to build the add/edit item form is centralised in this module. In conjunction with the subfields_for_item BLOCK (from html_helpers.inc) it will be really easy to reuse this code in other places where the item form is used (acquisition and serials modules) * Koha::UI::Table::Builder::Items Same as previously for the table. We are now using this table from 3 different places (batch item mod, batch item del, backgroung job detail view) and the code is only in one place. To use with items_table_batchmod BLOCK (still from html_helpers.inc) This patch is fixing some bugs about repeatable subfields and regex. A UI change will reflect the limitation: if you want to apply a regex on a subfield you cannot add several subfields for the same subfield code. Test plan: Prepare the ground: - Make sure you are always using a bibliographic/item record using the framework you are modifying! - Add some subfields for items that are not mapped with a koha field (note that you can use 'é' for more fun, don't try more funny characters) - Make some subfields (mapped and not mapped with a kohafield) repeatable - Add default values to some of your subfields There are 4 main screens to test: 1. Add/edit item form The behaviour should be the same before and after this patch. See test plan from bug 27526. Those 2 prefs must be tested: * SubfieldsToAllowForRestrictedEditing * SubfieldsToUseWhenPrefill 2. Batch modification a. Fill some values, play with repeatable and regex. Note that the behaviour in master was buggy, only the first value was modified by the regex: * With subfield = "a | b" 1 value added with "new" => "new | b" * With subfield = "a | b" 2 new fields "new1","new2" => "new2 | b" Important note: For repeatable subfields, a regex will apply on the subfields in the "concatenated form". To apply the regex on all the different subfields of a given subfield code you must use the "g" modifier. This could be improved later, but keep in mind that it's not a regression or behaviour change. b. Play with the "Populate fields with default values from default framework" checkbox c. Use this tool to modify items and play with the different sysprefs that interfer with it: * NewItemsDefaultLocation * SubfieldsToAllowForRestrictedBatchmod * MaxItemsToDisplayForBatchMod * MaxItemsToProcessForBatchMod 3. Batch deletion a. Batch delete some items b. Check items out and try to delete them c. Use the "Delete records if no items remain" checkbox to delete bibliographic records without remaining items. d. Play with the following sysprefs and confirm that it works as expected: * MaxItemsToDisplayForBatchDel e. Stress the tool: Go to the confirmation screen with items that can be deleted, don't request the job to be processed right away, but check the item out before. 4. Background job detail view You must have seen it already if you are curious and tested the above. When a new modification or deletion batch is requested, the confirmation screen will tell you that the job has enqueued. A link to the progress of the job can be followed. On this screen you will be able to see the result of the job once it's fully processed. QA notes: * There are some FIXME's that are not blocker in my opinion. Feel free to discuss them if you have suggestions. * Do we still need MaxItemsToProcessForBatchMod? * Prior to this patchset we had a "Return to the cataloging module" link if we went from the cataloguing module and that the biblio was deleted. We cannot longer know if the biblio will be deleted but we could display a "Go to the cataloging module" link on the "job has been enqueued" screen regardless from where we were coming from. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #9 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 123228 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123228&action=edit Bug 28445: UI change for repeatable and regex This patch applies the changes describe in the main commit message about the "limitation" and "the behaviour in master was buggy". -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #10 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 123229 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123229&action=edit Bug 28445: Fix encoding issue with the background job's report -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- URL| |https://gitlab.com/joubu/Ko | |ha/-/commits/bug_28445 --- Comment #11 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Remote branch, with all the dependencies applied, available for testing: https://gitlab.com/joubu/Koha/-/commits/bug_28445 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123229|0 |1 is obsolete| | --- Comment #12 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 123239 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123239&action=edit Bug 28445: Fix encoding issue with the background job's report -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #13 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 123240 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123240&action=edit Bug 28445: Don't display the items if not finished yet -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=28687 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #14 from Jonathan Druart <jonathan.druart+koha@gmail.com> ---
(note that you can use 'é' for more fun, don't try more funny characters)
This is not correct, any 4-byte character is supposed to work. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #15 from David Cook <dcook@prosentient.com.au> --- (In reply to Jonathan Druart from comment #14)
(note that you can use 'é' for more fun, don't try more funny characters)
This is not correct, any 4-byte character is supposed to work.
Should that be 1-4 byte character since UTF-8 characters are all between 1-4 bytes long? (J'adore couper les cheveux en quatre... 😅) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #16 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to David Cook from comment #15)
(In reply to Jonathan Druart from comment #14)
(note that you can use 'é' for more fun, don't try more funny characters)
This is not correct, any 4-byte character is supposed to work.
Should that be 1-4 byte character since UTF-8 characters are all between 1-4 bytes long?
Oui mais, "qui peut le plus peut le moins!" (who can do more, can do less) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #17 from Kyle M Hall <kyle@bywatersolutions.com> --- I'm a bit concerned by the way this patch set is handling the UI. A UI form builder module feels pretty regressive. I'm even seeing CSS embedded in a Perl module, which feels like it should be a hard no. What I'm seeing here is re-enforces the problem that we are coming up on in Koha over and over. Scalability. For 20 years Koha has been processing all data monolithically on the back end, and then presenting it to the user on page load. This worked fine when Koha was being used by small libraries. Now, Koha is being adopted by huge library system, and those designs that were great in the past are showing their age. Time and time again we find areas of Koha where a page simply cannot load because a library has so much data. That is why we as a community chose to implement a REST API. This is what allows us to make pages load quickly and dynamically using DataTables and other tools. I guess my question is, why? Why add a Perl module that's so tightly integrated with html generation that it has CSS embedded in it's code? Why not use the API? Why not make smarter objects and make cleaner TT templates? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #18 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Thanks for your input. These patches are more from perfect, I agree. But the idea is to improve the current situation. And I think this move goes toward the following goals: isolate the code, centralise it, make it more robust by providing tests. These item form and table are used in several places over the code, and having this code in a module makes it reusable easily. After this move the idea is to reuse it where this code is duplicated. Once everything will use the same code it will be easier to move to a better solution. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #19 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Jonathan Druart from comment #18)
These patches are more from perfect, I agree.
*Far* from perfect! :D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #20 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- As I didn't get a reply I will try to provide a more complete, and maybe more convincing, answer. I would like to highlight that those patches are not adding *new* code to Koha::UI. The code there is moved from current code that is duplicated in several places: additem and batchmod so far (for the add item form and the items table). To make the item batchmod tool use the task queue I had to reuse the same code from batchmod.pl, and instead of reusing the code as it, I preferred to make it more robust, and reusable from other places. The code is now in a module, covered by test, and centralized in a single place. The next move should be to reuse the same code (methods and BLOCK from inc) from the remaining places (acq and serial, detail pages, etc.) If we reach this point we will have all our add item forms and items tables using the exact same code, covered by tests. That will make any other improvements easier to implement. Please see this as a continuous improvement of the current situation, not as the perfect solution we want to have at the end. I totally agree we should be using the REST API routes to achieve that goal, but we are not ready at all for that. Building the table like it's done here is not achievable right now using the REST API, and was not the point anyway. We need the item batch mod tool back running in background mode for 21.11. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #21 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #20) I understand your intentions. I'm sure we have as many possible solutions as we do developers. If Koha and its community are to continue to be successful we need to adapt as technology and trends change. It's important that we keep that in mind is all. I have reservations but this is definitely an improvement nevertheless. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123221|0 |1 is obsolete| | --- Comment #22 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 125801 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125801&action=edit Bug 28445: Isolate add item form to an include file To ease reusability -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123222|0 |1 is obsolete| | --- Comment #23 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 125802 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125802&action=edit Bug 28445: Move controller code to Koha::UI::Form::Builder::Item To ease reusability -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123223|0 |1 is obsolete| | --- Comment #24 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 125803 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125803&action=edit Bug 28445: Use Koha::UI::Form::Builder::Item from batchmod as well Now that it's reusable, let use it somewhere else! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123224|0 |1 is obsolete| | --- Comment #25 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 125804 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125804&action=edit Bug 28445: Adjust code to handle regexs -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123225|0 |1 is obsolete| | --- Comment #26 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 125805 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125805&action=edit Bug 28445: Start form with empty library for batch mod -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123227|0 |1 is obsolete| | --- Comment #27 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 125808 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125808&action=edit Bug 28445: Use the task queue for the batch delete and update items tool Here we go! Disclaimer: this patch is huge and does many things, but splitting it in several chunks would be time consuming and painful to rebase. However it adds many tests and isolate/refactor code to make it way more reusable. This patchset will make the "batch item modification" and "batch item deletion" features use the task queue (reminder: Since bug 28158, and so 21.05.00, we do no longer use the old "background job" functionality and the user does not get any info about the progress of the job). More than that, more of the code to build an item form and a list of items is now isolated in module (.pm) and include files (.inc) We are reusing the changes made by bug 27526 that simplifies the way we edit/create items (no more unecessary serialization Koha > MARC > MARCXML
XML > HTML)
New module: * Koha::BackgroundJob::BatchDeleteItem Subclass for process item deletion in batch * Koha::BackgroundJob::BatchUpdateItem Subclass for process item modification in batch * Koha::Item::Attributes We needed an object to represent item's attributes that are not mapped with a koha field (aka "more subfields xml") This module will help us to create the marcxml from a hashref and the reverse. * Koha::UI::Form::Builder::Item The code that was used to build the add/edit item form is centralised in this module. In conjunction with the subfields_for_item BLOCK (from html_helpers.inc) it will be really easy to reuse this code in other places where the item form is used (acquisition and serials modules) * Koha::UI::Table::Builder::Items Same as previously for the table. We are now using this table from 3 different places (batch item mod, batch item del, backgroung job detail view) and the code is only in one place. To use with items_table_batchmod BLOCK (still from html_helpers.inc) This patch is fixing some bugs about repeatable subfields and regex. A UI change will reflect the limitation: if you want to apply a regex on a subfield you cannot add several subfields for the same subfield code. Test plan: Prepare the ground: - Make sure you are always using a bibliographic/item record using the framework you are modifying! - Add some subfields for items that are not mapped with a koha field (note that you can use 'é' for more fun, don't try more funny characters) - Make some subfields (mapped and not mapped with a kohafield) repeatable - Add default values to some of your subfields There are 4 main screens to test: 1. Add/edit item form The behaviour should be the same before and after this patch. See test plan from bug 27526. Those 2 prefs must be tested: * SubfieldsToAllowForRestrictedEditing * SubfieldsToUseWhenPrefill 2. Batch modification a. Fill some values, play with repeatable and regex. Note that the behaviour in master was buggy, only the first value was modified by the regex: * With subfield = "a | b" 1 value added with "new" => "new | b" * With subfield = "a | b" 2 new fields "new1","new2" => "new2 | b" Important note: For repeatable subfields, a regex will apply on the subfields in the "concatenated form". To apply the regex on all the different subfields of a given subfield code you must use the "g" modifier. This could be improved later, but keep in mind that it's not a regression or behaviour change. b. Play with the "Populate fields with default values from default framework" checkbox c. Use this tool to modify items and play with the different sysprefs that interfer with it: * NewItemsDefaultLocation * SubfieldsToAllowForRestrictedBatchmod * MaxItemsToDisplayForBatchMod * MaxItemsToProcessForBatchMod 3. Batch deletion a. Batch delete some items b. Check items out and try to delete them c. Use the "Delete records if no items remain" checkbox to delete bibliographic records without remaining items. d. Play with the following sysprefs and confirm that it works as expected: * MaxItemsToDisplayForBatchDel e. Stress the tool: Go to the confirmation screen with items that can be deleted, don't request the job to be processed right away, but check the item out before. 4. Background job detail view You must have seen it already if you are curious and tested the above. When a new modification or deletion batch is requested, the confirmation screen will tell you that the job has enqueued. A link to the progress of the job can be followed. On this screen you will be able to see the result of the job once it's fully processed. QA notes: * There are some FIXME's that are not blocker in my opinion. Feel free to discuss them if you have suggestions. * Do we still need MaxItemsToProcessForBatchMod? * Prior to this patchset we had a "Return to the cataloging module" link if we went from the cataloguing module and that the biblio was deleted. We cannot longer know if the biblio will be deleted but we could display a "Go to the cataloging module" link on the "job has been enqueued" screen regardless from where we were coming from. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123228|0 |1 is obsolete| | --- Comment #28 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 125810 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125810&action=edit Bug 28445: UI change for repeatable and regex This patch applies the changes describe in the main commit message about the "limitation" and "the behaviour in master was buggy". -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123239|0 |1 is obsolete| | --- Comment #29 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 125811 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125811&action=edit Bug 28445: Fix encoding issue with the background job's report -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123240|0 |1 is obsolete| | --- Comment #30 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 125812 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125812&action=edit Bug 28445: Don't display the items if not finished yet -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #31 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 125817 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125817&action=edit Bug 28445: Improve robustness of tests * Could fail if not using the original sample data: build the AV we need instead of relying on what is in the DB * Libraries are ordered by name by default but if others have been added the test may fail -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #32 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Patches rebased on top of bug 23678 and bug 29149, also fixed some minor bugs and fragile tests. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123226|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125817|0 |1 is obsolete| | --- Comment #33 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 125865 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125865&action=edit Bug 28445: Improve robustness of tests * Libraries are ordered by name by default but if others have been added the test may fail -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #34 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Jonathan Druart from comment #33)
Created attachment 125865 [details] [review] Bug 28445: Improve robustness of tests
* Libraries are ordered by name by default but if others have been added the test may fail
Part of this patch has been moved out as a follow-up of bug 27526. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Bug 28445 depends on bug 26080, which changed state. Bug 26080 Summary: Use the task queue for the batch delete records tool https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26080 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Bug 28445 depends on bug 27526, which changed state. Bug 27526 Summary: Remove Mod/AddItemFromMarc from additem.pl https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27526 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #35 from Nick Clemens <nick@bywatersolutions.com> --- Notes for testing: Edit the Default framework in order to ensure the new fields show during batch modification Results: Overall, things worked well, sent to background_jobs after an update, can return to batch mod On additem.pl attempting to edit a repeated field only adds the value from the first field to all the repeated attempts, this is true on master as well Blockers: - Checkbox to 'delete' a subfield does not work, no changes are made - If number of items to edit is over MaxItemsToDisplayForBatchMod, but below MaxItemsToProcessForBatchMod the form does not show and no edits can be made - MaxItemsToDisplayForBatchMod is not respected on background_jobs.pl, all items are displayed - Progress may not be updated - hard to tell, was 0 until page reload loaded the full item list - Batch deletion failed: Cannot enqueue this job. (The error was: Can't use string ("on") as an ARRAY ref while "strict refs" in use at /kohadevbox/koha/Koha/BackgroundJob/BatchDeleteItem.pm line 214. , see the Koha log file for more information). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #36 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126046 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126046&action=edit Bug 28445: Fix subfields to blank The value of the checkbox was not correct -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #37 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126047 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126047&action=edit Bug 28445: Don't surround the whole batch with a transaction It makes more sense to commit when an item has successfully been modified and so move the transaction inside the loop. It also fixes the progress of the whole job. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #38 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Thanks Nick! (In reply to Nick Clemens from comment #35)
On additem.pl attempting to edit a repeated field only adds the value from the first field to all the repeated attempts, this is true on master as well
I don't understand. Can you detail please? I made 952$u repeatable and I can create several subfields, edit, save. And it is working as I expect.
Blockers: - Checkbox to 'delete' a subfield does not work, no changes are made
Will be fixed!
- If number of items to edit is over MaxItemsToDisplayForBatchMod, but below MaxItemsToProcessForBatchMod the form does not show and no edits can be made
Cannot recreate. Set MaxItemsToDisplayForBatchMod=2, MaxItemsToProcessForBatchMod=4, edit 3 barcodes. I see "Too many items (3): You are editing more than 2 items in a batch, items will not be shown." and there is the form.
- MaxItemsToDisplayForBatchMod is not respected on background_jobs.pl, all items are displayed
On purpose, do you think we should restore it? In my understanding it was to avoid the table on the first screen.
- Progress may not be updated - hard to tell, was 0 until page reload loaded the full item list
It actually hide something different, the transaction was not made at the correct level. I think we should commit when an item has been modified. The previous behaviour was failing the whole job if something went wrong for an item. It's fixed now.
- Batch deletion failed: Cannot enqueue this job. (The error was: Can't use string ("on") as an ARRAY ref while "strict refs" in use at /kohadevbox/koha/Koha/BackgroundJob/BatchDeleteItem.pm line 214. , see the Koha log file for more information).
Hum, cannot recreate that, but line 214 is: 214 my $delete_biblios = @{ $args->{delete_biblios} || [] }; That does not seem related at all, can you retry please? Note that I have tested on top of the bug 27526 follow-up, not pushed yet. So results may vary. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #39 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Patchrs applied for me. Did you try the remote branch, Nick? Otherwise I will resubmit tomorrow. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125808|0 |1 is obsolete| | --- Comment #40 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126136 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126136&action=edit Bug 28445: Use the task queue for the batch delete and update items tool Here we go! Disclaimer: this patch is huge and does many things, but splitting it in several chunks would be time consuming and painful to rebase. However it adds many tests and isolate/refactor code to make it way more reusable. This patchset will make the "batch item modification" and "batch item deletion" features use the task queue (reminder: Since bug 28158, and so 21.05.00, we do no longer use the old "background job" functionality and the user does not get any info about the progress of the job). More than that, more of the code to build an item form and a list of items is now isolated in module (.pm) and include files (.inc) We are reusing the changes made by bug 27526 that simplifies the way we edit/create items (no more unecessary serialization Koha > MARC > MARCXML
XML > HTML)
New module: * Koha::BackgroundJob::BatchDeleteItem Subclass for process item deletion in batch * Koha::BackgroundJob::BatchUpdateItem Subclass for process item modification in batch * Koha::Item::Attributes We needed an object to represent item's attributes that are not mapped with a koha field (aka "more subfields xml") This module will help us to create the marcxml from a hashref and the reverse. * Koha::UI::Form::Builder::Item The code that was used to build the add/edit item form is centralised in this module. In conjunction with the subfields_for_item BLOCK (from html_helpers.inc) it will be really easy to reuse this code in other places where the item form is used (acquisition and serials modules) * Koha::UI::Table::Builder::Items Same as previously for the table. We are now using this table from 3 different places (batch item mod, batch item del, backgroung job detail view) and the code is only in one place. To use with items_table_batchmod BLOCK (still from html_helpers.inc) This patch is fixing some bugs about repeatable subfields and regex. A UI change will reflect the limitation: if you want to apply a regex on a subfield you cannot add several subfields for the same subfield code. Test plan: Prepare the ground: - Make sure you are always using a bibliographic/item record using the framework you are modifying! - Add some subfields for items that are not mapped with a koha field (note that you can use 'é' for more fun, don't try more funny characters) - Make some subfields (mapped and not mapped with a kohafield) repeatable - Add default values to some of your subfields There are 4 main screens to test: 1. Add/edit item form The behaviour should be the same before and after this patch. See test plan from bug 27526. Those 2 prefs must be tested: * SubfieldsToAllowForRestrictedEditing * SubfieldsToUseWhenPrefill 2. Batch modification a. Fill some values, play with repeatable and regex. Note that the behaviour in master was buggy, only the first value was modified by the regex: * With subfield = "a | b" 1 value added with "new" => "new | b" * With subfield = "a | b" 2 new fields "new1","new2" => "new2 | b" Important note: For repeatable subfields, a regex will apply on the subfields in the "concatenated form". To apply the regex on all the different subfields of a given subfield code you must use the "g" modifier. This could be improved later, but keep in mind that it's not a regression or behaviour change. b. Play with the "Populate fields with default values from default framework" checkbox c. Use this tool to modify items and play with the different sysprefs that interfer with it: * NewItemsDefaultLocation * SubfieldsToAllowForRestrictedBatchmod * MaxItemsToDisplayForBatchMod * MaxItemsToProcessForBatchMod 3. Batch deletion a. Batch delete some items b. Check items out and try to delete them c. Use the "Delete records if no items remain" checkbox to delete bibliographic records without remaining items. d. Play with the following sysprefs and confirm that it works as expected: * MaxItemsToDisplayForBatchDel e. Stress the tool: Go to the confirmation screen with items that can be deleted, don't request the job to be processed right away, but check the item out before. 4. Background job detail view You must have seen it already if you are curious and tested the above. When a new modification or deletion batch is requested, the confirmation screen will tell you that the job has enqueued. A link to the progress of the job can be followed. On this screen you will be able to see the result of the job once it's fully processed. QA notes: * There are some FIXME's that are not blocker in my opinion. Feel free to discuss them if you have suggestions. * Do we still need MaxItemsToProcessForBatchMod? * Prior to this patchset we had a "Return to the cataloging module" link if we went from the cataloguing module and that the biblio was deleted. We cannot longer know if the biblio will be deleted but we could display a "Go to the cataloging module" link on the "job has been enqueued" screen regardless from where we were coming from. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125810|0 |1 is obsolete| | --- Comment #41 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126137 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126137&action=edit Bug 28445: UI change for repeatable and regex This patch applies the changes describe in the main commit message about the "limitation" and "the behaviour in master was buggy". -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125811|0 |1 is obsolete| | --- Comment #42 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126138 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126138&action=edit Bug 28445: Fix encoding issue with the background job's report -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125812|0 |1 is obsolete| | --- Comment #43 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126139 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126139&action=edit Bug 28445: Don't display the items if not finished yet -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125865|0 |1 is obsolete| | --- Comment #44 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126140 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126140&action=edit Bug 28445: Improve robustness of tests * Libraries are ordered by name by default but if others have been added the test may fail -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126046|0 |1 is obsolete| | --- Comment #45 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126141 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126141&action=edit Bug 28445: Fix subfields to blank The value of the checkbox was not correct -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126047|0 |1 is obsolete| | --- Comment #46 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126142 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126142&action=edit Bug 28445: Don't surround the whole batch with a transaction It makes more sense to commit when an item has successfully been modified and so move the transaction inside the loop. It also fixes the progress of the whole job. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #47 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #38)
(In reply to Nick Clemens from comment #35)
On additem.pl attempting to edit a repeated field only adds the value from the first field to all the repeated attempts, this is true on master as well
I don't understand. Can you detail please? I made 952$u repeatable and I can create several subfields, edit, save. And it is working as I expect.
I added new subfield "A" - the values repeat On master I also made "o" repeatable and had same issue With these patches "o" worked fine, "A" always repeated first value and during batch mod when I used the "A" field with two values a single record was often skipped (18 of 19 items updated), or all 19 would be updated, but 18 would repeat first value and the 19th would get the second Something is weird there
- MaxItemsToDisplayForBatchMod is not respected on background_jobs.pl, all items are displayed
On purpose, do you think we should restore it? In my understanding it was to avoid the table on the first screen.
On master the items are not shown in results, I think we should do the same here - don't show more items than allowed in a batch modify job result
- Batch deletion failed: Cannot enqueue this job. (The error was: Can't use string ("on") as an ARRAY ref while "strict refs" in use at /kohadevbox/koha/Koha/BackgroundJob/BatchDeleteItem.pm line 214. , see the Koha log file for more information).
Hum, cannot recreate that, but line 214 is: 214 my $delete_biblios = @{ $args->{delete_biblios} || [] };
That does not seem related at all, can you retry please?
I get the error when I check "Delete records if no items remain." -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |ASSIGNED --- Comment #48 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Nick Clemens from comment #47)
(In reply to Jonathan Druart from comment #38)
(In reply to Nick Clemens from comment #35)
On additem.pl attempting to edit a repeated field only adds the value from the first field to all the repeated attempts, this is true on master as well
I don't understand. Can you detail please? I made 952$u repeatable and I can create several subfields, edit, save. And it is working as I expect.
I added new subfield "A" - the values repeat On master I also made "o" repeatable and had same issue With these patches "o" worked fine, "A" always repeated first value and during batch mod when I used the "A" field with two values a single record was often skipped (18 of 19 items updated), or all 19 would be updated, but 18 would repeat first value and the 19th would get the second Something is weird there
I do recreate, but it's the expected behaviour I think. If you have "A" defined for the default framework, but not for BK, then the items using BK won't have the values added to "A".
- MaxItemsToDisplayForBatchMod is not respected on background_jobs.pl, all items are displayed
On purpose, do you think we should restore it? In my understanding it was to avoid the table on the first screen.
On master the items are not shown in results, I think we should do the same here - don't show more items than allowed in a batch modify job result
Ok, will follow-up.
- Batch deletion failed: Cannot enqueue this job. (The error was: Can't use string ("on") as an ARRAY ref while "strict refs" in use at /kohadevbox/koha/Koha/BackgroundJob/BatchDeleteItem.pm line 214. , see the Koha log file for more information).
Hum, cannot recreate that, but line 214 is: 214 my $delete_biblios = @{ $args->{delete_biblios} || [] };
That does not seem related at all, can you retry please?
I get the error when I check "Delete records if no items remain."
Oops, silly mistake. Will fix. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126142|0 |1 is obsolete| | --- Comment #49 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126217 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126217&action=edit Bug 28445: Don't surround the whole batch with a transaction It makes more sense to commit when an item has successfully been modified and so move the transaction inside the loop. It also fixes the progress of the whole job. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #50 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126218 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126218&action=edit Bug 28445: delete_biblios is a boolean Will fix: Batch deletion failed: Cannot enqueue this job. (The error was: Can't use string ("on") as an ARRAY ref while "strict refs" in use at /kohadevbox/koha/Koha/BackgroundJob/BatchDeleteItem.pm line 214. , see the Koha log file for more information). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #51 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126219 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126219&action=edit Bug 28445: Respect MaxItemsToDisplayForBatchMod from job detail view -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #52 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126223 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126223&action=edit Bug 28445: Split and join on ' | ' instead of '|' for repeatable Is that correct?! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff --- Comment #53 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Jonathan Druart from comment #48)
(In reply to Nick Clemens from comment #47)
(In reply to Jonathan Druart from comment #38)
(In reply to Nick Clemens from comment #35)
On additem.pl attempting to edit a repeated field only adds the value from the first field to all the repeated attempts, this is true on master as well
I don't understand. Can you detail please? I made 952$u repeatable and I can create several subfields, edit, save. And it is working as I expect.
I added new subfield "A" - the values repeat On master I also made "o" repeatable and had same issue With these patches "o" worked fine, "A" always repeated first value and during batch mod when I used the "A" field with two values a single record was often skipped (18 of 19 items updated), or all 19 would be updated, but 18 would repeat first value and the 19th would get the second Something is weird there
I do recreate, but it's the expected behaviour I think. If you have "A" defined for the default framework, but not for BK, then the items using BK won't have the values added to "A".
The problem was when using the background job then the cataloguing edit form. There was a mismatch with the separator for repeatable subfields. It's fixed now, but I am wondering if split/join on ' | ' instead of '|' is correct. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #54 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Jonathan Druart from comment #53)
It's fixed now, but I am wondering if split/join on ' | ' instead of '|' is correct.
Confirmed on 21.05, we were using spaces prior to bug 27526 and this one. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125804|0 |1 is obsolete| | Attachment #125805|0 |1 is obsolete| | Attachment #126136|0 |1 is obsolete| | Attachment #126137|0 |1 is obsolete| | Attachment #126138|0 |1 is obsolete| | Attachment #126139|0 |1 is obsolete| | Attachment #126140|0 |1 is obsolete| | Attachment #126141|0 |1 is obsolete| | Attachment #126217|0 |1 is obsolete| | Attachment #126218|0 |1 is obsolete| | Attachment #126219|0 |1 is obsolete| | Attachment #126223|0 |1 is obsolete| | --- Comment #55 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126328 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126328&action=edit Bug 28445: Adjust code to handle regexs -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #56 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126329 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126329&action=edit Bug 28445: Start form with empty library for batch mod -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #57 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126330 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126330&action=edit Bug 28445: Use the task queue for the batch delete and update items tool Here we go! Disclaimer: this patch is huge and does many things, but splitting it in several chunks would be time consuming and painful to rebase. However it adds many tests and isolate/refactor code to make it way more reusable. This patchset will make the "batch item modification" and "batch item deletion" features use the task queue (reminder: Since bug 28158, and so 21.05.00, we do no longer use the old "background job" functionality and the user does not get any info about the progress of the job). More than that, more of the code to build an item form and a list of items is now isolated in module (.pm) and include files (.inc) We are reusing the changes made by bug 27526 that simplifies the way we edit/create items (no more unecessary serialization Koha > MARC > MARCXML
XML > HTML)
New module: * Koha::BackgroundJob::BatchDeleteItem Subclass for process item deletion in batch * Koha::BackgroundJob::BatchUpdateItem Subclass for process item modification in batch * Koha::Item::Attributes We needed an object to represent item's attributes that are not mapped with a koha field (aka "more subfields xml") This module will help us to create the marcxml from a hashref and the reverse. * Koha::UI::Form::Builder::Item The code that was used to build the add/edit item form is centralised in this module. In conjunction with the subfields_for_item BLOCK (from html_helpers.inc) it will be really easy to reuse this code in other places where the item form is used (acquisition and serials modules) * Koha::UI::Table::Builder::Items Same as previously for the table. We are now using this table from 3 different places (batch item mod, batch item del, backgroung job detail view) and the code is only in one place. To use with items_table_batchmod BLOCK (still from html_helpers.inc) This patch is fixing some bugs about repeatable subfields and regex. A UI change will reflect the limitation: if you want to apply a regex on a subfield you cannot add several subfields for the same subfield code. Test plan: Prepare the ground: - Make sure you are always using a bibliographic/item record using the framework you are modifying! - Add some subfields for items that are not mapped with a koha field (note that you can use 'é' for more fun, don't try more funny characters) - Make some subfields (mapped and not mapped with a kohafield) repeatable - Add default values to some of your subfields There are 4 main screens to test: 1. Add/edit item form The behaviour should be the same before and after this patch. See test plan from bug 27526. Those 2 prefs must be tested: * SubfieldsToAllowForRestrictedEditing * SubfieldsToUseWhenPrefill 2. Batch modification a. Fill some values, play with repeatable and regex. Note that the behaviour in master was buggy, only the first value was modified by the regex: * With subfield = "a | b" 1 value added with "new" => "new | b" * With subfield = "a | b" 2 new fields "new1","new2" => "new2 | b" Important note: For repeatable subfields, a regex will apply on the subfields in the "concatenated form". To apply the regex on all the different subfields of a given subfield code you must use the "g" modifier. This could be improved later, but keep in mind that it's not a regression or behaviour change. b. Play with the "Populate fields with default values from default framework" checkbox c. Use this tool to modify items and play with the different sysprefs that interfer with it: * NewItemsDefaultLocation * SubfieldsToAllowForRestrictedBatchmod * MaxItemsToDisplayForBatchMod * MaxItemsToProcessForBatchMod 3. Batch deletion a. Batch delete some items b. Check items out and try to delete them c. Use the "Delete records if no items remain" checkbox to delete bibliographic records without remaining items. d. Play with the following sysprefs and confirm that it works as expected: * MaxItemsToDisplayForBatchDel e. Stress the tool: Go to the confirmation screen with items that can be deleted, don't request the job to be processed right away, but check the item out before. 4. Background job detail view You must have seen it already if you are curious and tested the above. When a new modification or deletion batch is requested, the confirmation screen will tell you that the job has enqueued. A link to the progress of the job can be followed. On this screen you will be able to see the result of the job once it's fully processed. QA notes: * There are some FIXME's that are not blocker in my opinion. Feel free to discuss them if you have suggestions. * Do we still need MaxItemsToProcessForBatchMod? * Prior to this patchset we had a "Return to the cataloging module" link if we went from the cataloguing module and that the biblio was deleted. We cannot longer know if the biblio will be deleted but we could display a "Go to the cataloging module" link on the "job has been enqueued" screen regardless from where we were coming from. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #58 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126331 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126331&action=edit Bug 28445: UI change for repeatable and regex This patch applies the changes describe in the main commit message about the "limitation" and "the behaviour in master was buggy". -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #59 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126332 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126332&action=edit Bug 28445: Fix encoding issue with the background job's report -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #60 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126333 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126333&action=edit Bug 28445: Don't display the items if not finished yet -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #61 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126334 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126334&action=edit Bug 28445: Improve robustness of tests * Libraries are ordered by name by default but if others have been added the test may fail -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #62 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126335 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126335&action=edit Bug 28445: Fix subfields to blank The value of the checkbox was not correct -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #63 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126336 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126336&action=edit Bug 28445: Don't surround the whole batch with a transaction It makes more sense to commit when an item has successfully been modified and so move the transaction inside the loop. It also fixes the progress of the whole job. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #64 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126337 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126337&action=edit Bug 28445: delete_biblios is a boolean Will fix: Batch deletion failed: Cannot enqueue this job. (The error was: Can't use string ("on") as an ARRAY ref while "strict refs" in use at /kohadevbox/koha/Koha/BackgroundJob/BatchDeleteItem.pm line 214. , see the Koha log file for more information). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #65 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126338 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126338&action=edit Bug 28445: Respect MaxItemsToDisplayForBatchMod from job detail view -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #66 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126339 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126339&action=edit Bug 28445: Split and join on ' | ' instead of '|' for repeatable Is that correct?! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Nick Clemens <nick@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=28445 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125801|0 |1 is obsolete| | Attachment #125802|0 |1 is obsolete| | Attachment #125803|0 |1 is obsolete| | Attachment #126328|0 |1 is obsolete| | Attachment #126329|0 |1 is obsolete| | Attachment #126330|0 |1 is obsolete| | Attachment #126331|0 |1 is obsolete| | Attachment #126332|0 |1 is obsolete| | Attachment #126333|0 |1 is obsolete| | Attachment #126334|0 |1 is obsolete| | Attachment #126335|0 |1 is obsolete| | Attachment #126336|0 |1 is obsolete| | Attachment #126337|0 |1 is obsolete| | Attachment #126338|0 |1 is obsolete| | Attachment #126339|0 |1 is obsolete| | --- Comment #67 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 126352 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126352&action=edit Bug 28445: Isolate add item form to an include file To ease reusability Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #68 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 126353 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126353&action=edit Bug 28445: Move controller code to Koha::UI::Form::Builder::Item To ease reusability Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #69 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 126354 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126354&action=edit Bug 28445: Use Koha::UI::Form::Builder::Item from batchmod as well Now that it's reusable, let use it somewhere else! Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #70 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 126355 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126355&action=edit Bug 28445: Adjust code to handle regexs Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #71 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 126356 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126356&action=edit Bug 28445: Start form with empty library for batch mod Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #72 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 126357 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126357&action=edit Bug 28445: Use the task queue for the batch delete and update items tool Here we go! Disclaimer: this patch is huge and does many things, but splitting it in several chunks would be time consuming and painful to rebase. However it adds many tests and isolate/refactor code to make it way more reusable. This patchset will make the "batch item modification" and "batch item deletion" features use the task queue (reminder: Since bug 28158, and so 21.05.00, we do no longer use the old "background job" functionality and the user does not get any info about the progress of the job). More than that, more of the code to build an item form and a list of items is now isolated in module (.pm) and include files (.inc) We are reusing the changes made by bug 27526 that simplifies the way we edit/create items (no more unecessary serialization Koha > MARC > MARCXML
XML > HTML)
New module: * Koha::BackgroundJob::BatchDeleteItem Subclass for process item deletion in batch * Koha::BackgroundJob::BatchUpdateItem Subclass for process item modification in batch * Koha::Item::Attributes We needed an object to represent item's attributes that are not mapped with a koha field (aka "more subfields xml") This module will help us to create the marcxml from a hashref and the reverse. * Koha::UI::Form::Builder::Item The code that was used to build the add/edit item form is centralised in this module. In conjunction with the subfields_for_item BLOCK (from html_helpers.inc) it will be really easy to reuse this code in other places where the item form is used (acquisition and serials modules) * Koha::UI::Table::Builder::Items Same as previously for the table. We are now using this table from 3 different places (batch item mod, batch item del, backgroung job detail view) and the code is only in one place. To use with items_table_batchmod BLOCK (still from html_helpers.inc) This patch is fixing some bugs about repeatable subfields and regex. A UI change will reflect the limitation: if you want to apply a regex on a subfield you cannot add several subfields for the same subfield code. Test plan: Prepare the ground: - Make sure you are always using a bibliographic/item record using the framework you are modifying! - Add some subfields for items that are not mapped with a koha field (note that you can use 'é' for more fun, don't try more funny characters) - Make some subfields (mapped and not mapped with a kohafield) repeatable - Add default values to some of your subfields There are 4 main screens to test: 1. Add/edit item form The behaviour should be the same before and after this patch. See test plan from bug 27526. Those 2 prefs must be tested: * SubfieldsToAllowForRestrictedEditing * SubfieldsToUseWhenPrefill 2. Batch modification a. Fill some values, play with repeatable and regex. Note that the behaviour in master was buggy, only the first value was modified by the regex: * With subfield = "a | b" 1 value added with "new" => "new | b" * With subfield = "a | b" 2 new fields "new1","new2" => "new2 | b" Important note: For repeatable subfields, a regex will apply on the subfields in the "concatenated form". To apply the regex on all the different subfields of a given subfield code you must use the "g" modifier. This could be improved later, but keep in mind that it's not a regression or behaviour change. b. Play with the "Populate fields with default values from default framework" checkbox c. Use this tool to modify items and play with the different sysprefs that interfer with it: * NewItemsDefaultLocation * SubfieldsToAllowForRestrictedBatchmod * MaxItemsToDisplayForBatchMod * MaxItemsToProcessForBatchMod 3. Batch deletion a. Batch delete some items b. Check items out and try to delete them c. Use the "Delete records if no items remain" checkbox to delete bibliographic records without remaining items. d. Play with the following sysprefs and confirm that it works as expected: * MaxItemsToDisplayForBatchDel e. Stress the tool: Go to the confirmation screen with items that can be deleted, don't request the job to be processed right away, but check the item out before. 4. Background job detail view You must have seen it already if you are curious and tested the above. When a new modification or deletion batch is requested, the confirmation screen will tell you that the job has enqueued. A link to the progress of the job can be followed. On this screen you will be able to see the result of the job once it's fully processed. QA notes: * There are some FIXME's that are not blocker in my opinion. Feel free to discuss them if you have suggestions. * Do we still need MaxItemsToProcessForBatchMod? * Prior to this patchset we had a "Return to the cataloging module" link if we went from the cataloguing module and that the biblio was deleted. We cannot longer know if the biblio will be deleted but we could display a "Go to the cataloging module" link on the "job has been enqueued" screen regardless from where we were coming from. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #73 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 126358 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126358&action=edit Bug 28445: UI change for repeatable and regex This patch applies the changes describe in the main commit message about the "limitation" and "the behaviour in master was buggy". Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #74 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 126359 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126359&action=edit Bug 28445: Fix encoding issue with the background job's report Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #75 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 126360 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126360&action=edit Bug 28445: Don't display the items if not finished yet Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #76 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 126361 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126361&action=edit Bug 28445: Improve robustness of tests * Libraries are ordered by name by default but if others have been added the test may fail Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #77 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 126362 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126362&action=edit Bug 28445: Fix subfields to blank The value of the checkbox was not correct Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #78 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 126363 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126363&action=edit Bug 28445: Don't surround the whole batch with a transaction It makes more sense to commit when an item has successfully been modified and so move the transaction inside the loop. It also fixes the progress of the whole job. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #79 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 126364 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126364&action=edit Bug 28445: delete_biblios is a boolean Will fix: Batch deletion failed: Cannot enqueue this job. (The error was: Can't use string ("on") as an ARRAY ref while "strict refs" in use at /kohadevbox/koha/Koha/BackgroundJob/BatchDeleteItem.pm line 214. , see the Koha log file for more information). Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #80 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 126365 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126365&action=edit Bug 28445: Respect MaxItemsToDisplayForBatchMod from job detail view Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #81 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 126366 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126366&action=edit Bug 28445: Split and join on ' | ' instead of '|' for repeatable Is that correct?! Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #82 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 126367 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126367&action=edit Bug 28445: (follow-up) Display count of modified items when too many to display -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_21_11_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Tomás Cohen Arazi <tomascohen@gmail.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=28445 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126352|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126353|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126354|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126355|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126356|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126357|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126358|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126359|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126360|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126361|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126362|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126363|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126364|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126365|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126366|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126367|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #83 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 126374 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126374&action=edit Bug 28445: Isolate add item form to an include file To ease reusability Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #84 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 126375 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126375&action=edit Bug 28445: Move controller code to Koha::UI::Form::Builder::Item To ease reusability Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #85 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 126376 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126376&action=edit Bug 28445: Use Koha::UI::Form::Builder::Item from batchmod as well Now that it's reusable, let use it somewhere else! Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #86 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 126377 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126377&action=edit Bug 28445: Adjust code to handle regexs Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #87 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 126378 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126378&action=edit Bug 28445: Start form with empty library for batch mod Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #88 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 126379 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126379&action=edit Bug 28445: Use the task queue for the batch delete and update items tool Here we go! Disclaimer: this patch is huge and does many things, but splitting it in several chunks would be time consuming and painful to rebase. However it adds many tests and isolate/refactor code to make it way more reusable. This patchset will make the "batch item modification" and "batch item deletion" features use the task queue (reminder: Since bug 28158, and so 21.05.00, we do no longer use the old "background job" functionality and the user does not get any info about the progress of the job). More than that, more of the code to build an item form and a list of items is now isolated in module (.pm) and include files (.inc) We are reusing the changes made by bug 27526 that simplifies the way we edit/create items (no more unecessary serialization Koha > MARC > MARCXML
XML > HTML)
New module: * Koha::BackgroundJob::BatchDeleteItem Subclass for process item deletion in batch * Koha::BackgroundJob::BatchUpdateItem Subclass for process item modification in batch * Koha::Item::Attributes We needed an object to represent item's attributes that are not mapped with a koha field (aka "more subfields xml") This module will help us to create the marcxml from a hashref and the reverse. * Koha::UI::Form::Builder::Item The code that was used to build the add/edit item form is centralised in this module. In conjunction with the subfields_for_item BLOCK (from html_helpers.inc) it will be really easy to reuse this code in other places where the item form is used (acquisition and serials modules) * Koha::UI::Table::Builder::Items Same as previously for the table. We are now using this table from 3 different places (batch item mod, batch item del, backgroung job detail view) and the code is only in one place. To use with items_table_batchmod BLOCK (still from html_helpers.inc) This patch is fixing some bugs about repeatable subfields and regex. A UI change will reflect the limitation: if you want to apply a regex on a subfield you cannot add several subfields for the same subfield code. Test plan: Prepare the ground: - Make sure you are always using a bibliographic/item record using the framework you are modifying! - Add some subfields for items that are not mapped with a koha field (note that you can use 'é' for more fun, don't try more funny characters) - Make some subfields (mapped and not mapped with a kohafield) repeatable - Add default values to some of your subfields There are 4 main screens to test: 1. Add/edit item form The behaviour should be the same before and after this patch. See test plan from bug 27526. Those 2 prefs must be tested: * SubfieldsToAllowForRestrictedEditing * SubfieldsToUseWhenPrefill 2. Batch modification a. Fill some values, play with repeatable and regex. Note that the behaviour in master was buggy, only the first value was modified by the regex: * With subfield = "a | b" 1 value added with "new" => "new | b" * With subfield = "a | b" 2 new fields "new1","new2" => "new2 | b" Important note: For repeatable subfields, a regex will apply on the subfields in the "concatenated form". To apply the regex on all the different subfields of a given subfield code you must use the "g" modifier. This could be improved later, but keep in mind that it's not a regression or behaviour change. b. Play with the "Populate fields with default values from default framework" checkbox c. Use this tool to modify items and play with the different sysprefs that interfer with it: * NewItemsDefaultLocation * SubfieldsToAllowForRestrictedBatchmod * MaxItemsToDisplayForBatchMod * MaxItemsToProcessForBatchMod 3. Batch deletion a. Batch delete some items b. Check items out and try to delete them c. Use the "Delete records if no items remain" checkbox to delete bibliographic records without remaining items. d. Play with the following sysprefs and confirm that it works as expected: * MaxItemsToDisplayForBatchDel e. Stress the tool: Go to the confirmation screen with items that can be deleted, don't request the job to be processed right away, but check the item out before. 4. Background job detail view You must have seen it already if you are curious and tested the above. When a new modification or deletion batch is requested, the confirmation screen will tell you that the job has enqueued. A link to the progress of the job can be followed. On this screen you will be able to see the result of the job once it's fully processed. QA notes: * There are some FIXME's that are not blocker in my opinion. Feel free to discuss them if you have suggestions. * Do we still need MaxItemsToProcessForBatchMod? * Prior to this patchset we had a "Return to the cataloging module" link if we went from the cataloguing module and that the biblio was deleted. We cannot longer know if the biblio will be deleted but we could display a "Go to the cataloging module" link on the "job has been enqueued" screen regardless from where we were coming from. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #89 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 126380 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126380&action=edit Bug 28445: UI change for repeatable and regex This patch applies the changes describe in the main commit message about the "limitation" and "the behaviour in master was buggy". Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #90 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 126381 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126381&action=edit Bug 28445: Fix encoding issue with the background job's report Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #91 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 126382 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126382&action=edit Bug 28445: Don't display the items if not finished yet Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #92 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 126383 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126383&action=edit Bug 28445: Improve robustness of tests * Libraries are ordered by name by default but if others have been added the test may fail Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #93 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 126384 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126384&action=edit Bug 28445: Fix subfields to blank The value of the checkbox was not correct Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #94 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 126385 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126385&action=edit Bug 28445: Don't surround the whole batch with a transaction It makes more sense to commit when an item has successfully been modified and so move the transaction inside the loop. It also fixes the progress of the whole job. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #95 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 126386 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126386&action=edit Bug 28445: delete_biblios is a boolean Will fix: Batch deletion failed: Cannot enqueue this job. (The error was: Can't use string ("on") as an ARRAY ref while "strict refs" in use at /kohadevbox/koha/Koha/BackgroundJob/BatchDeleteItem.pm line 214. , see the Koha log file for more information). Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #96 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 126387 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126387&action=edit Bug 28445: Respect MaxItemsToDisplayForBatchMod from job detail view Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #97 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 126388 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126388&action=edit Bug 28445: Split and join on ' | ' instead of '|' for repeatable Is that correct?! Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #98 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 126389 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126389&action=edit Bug 28445: (follow-up) Display count of modified items when too many to display Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #99 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.11, 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=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_21_11_candidate |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Bug 28445 depends on bug 28769, which changed state. Bug 28769 Summary: tabloop not used in cataloguing plugins https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28769 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=29331 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #100 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 127033 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127033&action=edit Bug 28445: Add tests for subfields_to_prefill I first wrote test for another thing but the code was actually correct. So submitting the tests. Note that the marc for more_subfields does not need to be passed, we can build it when needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #101 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Last patch 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=28445 --- Comment #102 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 127037 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127037&action=edit Bug 28445: Correctly count modified items -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #103 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 127038 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127038&action=edit Bug 28445: Remove modified_itemitemnumbers Wrong substitution -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #104 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 127039 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127039&action=edit Bug 28445: Fix LostItem call and display errors Never a try without a catch, ever! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #105 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Last three patches 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=28445 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Text to go in the| |This enhancement changes release notes| |the batch item modification | |and deletion tools so that | |they now use the task queue | |feature (added in Koha | |21.05) instead of using | |background jobs. For the | |library staff member this | |provides more information | |on the progress of the | |task. Keywords|release-notes-needed |Manual -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29567 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29567 [Bug 29567] Cataloguing plugins are broken on the batch item mod toold -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #106 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 128007 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128007&action=edit Bug 28445: Add diag for failing test Temporary patch to help trying to fix the following random error: # Failed test 'Item types should be sorted by description and an empty entries should be shown' # at t/db_dependent/Koha/UI/Form/Builder/Item.t line 121. # Structures begin differing at: # $got->[12] = 'Be9T9FH5aO' # $expected->[12] = 'REF' # Looks like you failed 1 test of 2. # Failed test 'itemtypes' # at t/db_dependent/Koha/UI/Form/Builder/Item.t line 130. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #107 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 128008 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128008&action=edit Bug 28445: (follow-up) Add diag for failing test Last diag was not enough (Koha_Master_D11/457) # Failed test 'Item types should be sorted by description and an empty entries should be shown' # at t/db_dependent/Koha/UI/Form/Builder/Item.t line 127. # Structures begin differing at: # $got->[11] = 'X_vvQE5' # $expected->[11] = 'knHm32' # Itemtypes details: $VAR1 = [ # '', # 'EMVzKcGR', # 'x4S8_BaFCp', # 'Cp2BGkY', # 'BK', # 'CF', # 'CR', # 'bBvgmVAIzD', # 'WKyaQ_l', # 'Cjc0SKQz', # 'liic63', # 'X_vvQE5', # 'knHm32', # 'MP', # 'MX', # 'MU', # 'g_F5eNqA', # 'REF', # 'pkxaMSv', # 'VM' # ]; # $VAR2 = [ # 'bBvgmVAIzD', # 'BK', # 'CF', # 'Cjc0SKQz', # 'Cp2BGkY', # 'CR', # 'EMVzKcGR', # 'g_F5eNqA', # 'knHm32', # 'liic63', # 'MP', # 'MU', # 'MX', # 'pkxaMSv', # 'REF', # 'VM', # 'WKyaQ_l', # 'X_vvQE5', # 'x4S8_BaFCp' # ]; We needed the translated_description. It should be the same actually, but maybe something weird is happening. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #108 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 128009 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128009&action=edit Bug 28445: Prevent UI/Form/Builder/Item.t to fail randomly MySQL and Perl don't order strings with _ identically which cause a mismatch when comparing the itemtypes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 --- Comment #109 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Last 3 patches pushed to master (the first one has been pushed earlier actually). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29689 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 [Bug 29689] Update to 21.11 broken auto-generated barcode in <branchcode>0001 option -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29797 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29797 [Bug 29797] Background job detail for batch delete items not listing the itemnumbers -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 AspenCat Team <aspencatteam@clicweb.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aspencatteam@clicweb.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |30178 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30178 [Bug 30178] Every librarian can edit every item with IndependentBranches on -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Bug 28445 depends on bug 22417, which changed state. Bug 22417 Summary: Add a task queue https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22417 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |30725 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30725 [Bug 30725] BatchDeleteItem job param named wrongly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31066 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31066 [Bug 31066] Can't use regex in batch modification on fields associated with a plugin -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31234 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31234 [Bug 31234] SubfieldsToAllowForRestrictedEditing : data from drop-down menu not stored -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31455 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31455 [Bug 31455] Batch modification tool orders found items by itemnumber -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |32464 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32464 [Bug 32464] Koha::Item->as_marc_field obsolete option mss -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |32550 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32550 [Bug 32550] 'Clear on loan' link on Batch item modification doesn't untick on loan items -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |32710 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32710 [Bug 32710] UI/Form/Builder/Item.t is failing randomly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |37986 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37986 [Bug 37986] Restricted edition of items is broken -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org