Bug 29149

Summary: Background job detail view needs more flexibility
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: System AdministrationAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, kyle, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00
Bug Depends on: 26080    
Bug Blocks: 23678    
Attachments: Bug 29149: Add the capability to provide more info to the background job detail view
Bug 29149: Add the capability to provide more info to the background job detail view
Bug 29149: (QA follow-up) Reorganize mapping

Description Jonathan Druart 2021-10-01 08:43:51 UTC

    
Comment 1 Jonathan Druart 2021-10-01 09:00:10 UTC
Created attachment 125581 [details] [review]
Bug 29149: Add the capability to provide more info to the background job detail view

(Patch extracted from bug 28445 to make it reusable for bug 23678)
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 (in 28445) we will want to pass the infos of the items that have been modified
to display a table.

Test plan:
0. Create at least one list (virtual shelf)
1. batch update biblios
2. Go to the job detail
3. Notice that dropdown list to add the record to a list
=> No regression found!
Comment 2 Tomás Cohen Arazi 2021-10-01 13:04:00 UTC
Created attachment 125625 [details] [review]
Bug 29149: Add the capability to provide more info to the background job detail view

(Patch extracted from bug 28445 to make it reusable for bug 23678)
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 (in 28445) we will want to pass the infos of the items that have been modified
to display a table.

Test plan:
0. Create at least one list (virtual shelf)
1. batch update biblios
2. Go to the job detail
3. Notice that dropdown list to add the record to a list
=> No regression found!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 3 Tomás Cohen Arazi 2021-10-01 13:04:04 UTC
Created attachment 125626 [details] [review]
Bug 29149: (QA follow-up) Reorganize mapping

This patch changes the mapping so it is more readable, and also allows
adding things there more easily, like allowing to add code => class
mappings from plugins, when time comes.

To test:
1. Just verify things still work
Comment 4 Jonathan Druart 2021-10-01 14:17:29 UTC
+sub type_to_class_mapping {

 FAIL   Koha/BackgroundJob.pm
   FAIL   forbidden patterns                                                                              
                forbidden pattern: Warning: The 'sub type' may be wrong is declared in a Koha::* package (see bug 15446) (line 253)     

False positive, fixed by 
https://gitlab.com/koha-community/qa-test-tools/-/merge_requests/40
Comment 5 Jonathan Druart 2021-10-01 14:30:42 UTC
Pushed to master for 21.11, thanks to everybody involved!