Bug 12759 - Add ability to pass list contents to batch record modification/deletion tools
Summary: Add ability to pass list contents to batch record modification/deletion tools
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Lists (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
: 17273 (view as bug list)
Depends on:
Blocks: 18127
  Show dependency treegraph
 
Reported: 2014-08-14 11:10 UTC by Jeremy Evans
Modified: 2018-11-12 17:52 UTC (History)
13 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 12759: Use a list (shelf) for batch record modification and deletion (6.05 KB, patch)
2017-02-15 22:57 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 12759: Use a list (shelf) for batch record modification and deletion (6.69 KB, patch)
2017-02-16 20:02 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 12759: Use a list (shelf) for batch record modification and deletion (7.44 KB, patch)
2017-02-16 21:15 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 12759: Use a list (shelf) for batch record modification and deletion (7.61 KB, patch)
2017-02-21 09:05 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 12759: Use a list (shelf) for batch record modification and deletion (7.67 KB, patch)
2017-03-20 17:26 UTC, sandboxes@biblibre.com
Details | Diff | Splinter Review
Bug 12759: Use a list (shelf) for batch record modification and deletion (7.64 KB, patch)
2018-05-24 18:26 UTC, M. Tompsett
Details | Diff | Splinter Review
Bug 12759: Use a list (shelf) for batch record modification and deletion (7.67 KB, patch)
2018-05-25 21:12 UTC, Charles Farmer
Details | Diff | Splinter Review
Bug 12759: [FOLLOW-UP] Using tabs for diff ways of adding records (23.67 KB, patch)
2018-07-10 04:38 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 12759: [FOLLOW-UP] Using tabs for diff ways of adding records (23.72 KB, patch)
2018-07-10 04:40 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 12759: Use a list (shelf) for batch record modification and deletion (7.66 KB, patch)
2018-11-12 17:52 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12759: (follow-up) Using tabs for diff ways of adding records (10.54 KB, patch)
2018-11-12 17:52 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12759: Pass records from selected tab (8.48 KB, patch)
2018-11-12 17:52 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Evans 2014-08-14 11:10:35 UTC
It would be a great timesaver if the records associated with a particular list can be passed into the Batch item modification and batch item deletion tools.

At the moment I have to run a report to extract the item barcode numbers from the list then open the resulting spreadsheet and copy & paste these into the batch modification tool. 

Ideally the batch modification/deletion tools need another input option to choose a particular list (that you can access),  or alternatively have a new option in the list view screen to pass selected records to batch modification/deletion.
Comment 1 Joy Nelson 2014-11-18 17:57:43 UTC
Along these same lines, it would be great to be able to use the batch modification (or other method) to add a batch of bib/items to a list.
Comment 2 Aleisha Amohia 2017-02-15 22:57:43 UTC Comment hidden (obsolete)
Comment 3 Aleisha Amohia 2017-02-16 02:20:06 UTC
(In reply to Joy Nelson from comment #1)
> Along these same lines, it would be great to be able to use the batch
> modification (or other method) to add a batch of bib/items to a list.

I have added a patch for this suggestion to Bug 18127
Comment 4 Marcel de Rooy 2017-02-16 07:45:59 UTC
Aleisha
Looks good.
But please note that a list only contains biblio records. So you should not offer the option when the user selects Authorities.
Comment 5 Aleisha Amohia 2017-02-16 20:02:07 UTC Comment hidden (obsolete)
Comment 6 Aleisha Amohia 2017-02-16 21:15:17 UTC Comment hidden (obsolete)
Comment 7 Marc Véron 2017-02-21 09:05:55 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2017-02-22 12:47:13 UTC
Aleisha,
2 small things here:
1. Go on Home › Tools › Batch record modification
   Select a list
   Select "authorities"
   Fill the textarea with authid
   Next
=> Id from list is picked

2. I think we should raise a warning (JS side) if 2 sources of ids are filled:
* For biblios: file and list or file and ids or list and ids 
* For authorities: file and ids (list should not be taken into account even if filled)
Comment 9 Aleisha Amohia 2017-02-27 19:56:23 UTC
(In reply to Jonathan Druart from comment #8)
> Aleisha,
> 2 small things here:
> 1. Go on Home › Tools › Batch record modification
>    Select a list
>    Select "authorities"
>    Fill the textarea with authid
>    Next
> => Id from list is picked

I don't understand this... if you select authorities, the option to add biblios from a shelf is hidden by JS. 

> 2. I think we should raise a warning (JS side) if 2 sources of ids are
> filled:
> * For biblios: file and list or file and ids or list and ids 
> * For authorities: file and ids (list should not be taken into account even
> if filled)

That seems slightly out of the scope of this bug. I am happy to make a new patch for this on a separate bug, but it doesn't stop this patch from working.
Comment 10 Jonathan Druart 2017-02-28 08:06:52 UTC
(In reply to Aleisha Amohia from comment #9)
> (In reply to Jonathan Druart from comment #8)
> > Aleisha,
> > 2 small things here:
> > 1. Go on Home › Tools › Batch record modification
> >    Select a list
> >    Select "authorities"
> >    Fill the textarea with authid
> >    Next
> > => Id from list is picked
> 
> I don't understand this... if you select authorities, the option to add
> biblios from a shelf is hidden by JS. 

Yes it's hidden but it's taken into account.

> > 2. I think we should raise a warning (JS side) if 2 sources of ids are
> > filled:
> > * For biblios: file and list or file and ids or list and ids 
> > * For authorities: file and ids (list should not be taken into account even
> > if filled)
> 
> That seems slightly out of the scope of this bug. I am happy to make a new
> patch for this on a separate bug, but it doesn't stop this patch from
> working.

I would not pass QA it without that change, but maybe something else will...
Comment 11 sandboxes@biblibre.com 2017-03-20 17:26:12 UTC
Patch tested with a sandbox, by EricGosselin <eric.gosselin@inLibro.com>
Comment 12 sandboxes@biblibre.com 2017-03-20 17:26:34 UTC
Created attachment 61337 [details] [review]
Bug 12759: Use a list (shelf) for batch record modification and deletion

To test:
1) Create a list, add a record to it by its barcode that you don't mind
deleting
2) Go to Tools -> Batch record modification
3) Select the record type 'Authorities'. Confirm the dropdown to select
a list disappears. Confirm selecting 'Biblios' makes the dropdown show
again.
4) Select the list from the dropdown, select a modification template,
Continue
5) Confirm all of the records in that list show on the page. Click
Modify selected records. Confirm this is successful.
6) Go to Batch record deletion
7) Select the record type 'Authorities'. Confirm the dropdown to select
a list disappears. Confirm selecting 'Biblios' makes the dropdown
show again.
8) Select the list from the dropdown and click Continue
9) Confirm all of the records in that list show on the page. Click
Delete selected records. Confirm this is successful.
10) Go back to your lists. The list should still exist but it will now be
empty.

Sponsored-by: Catalyst IT

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: EricGosselin <eric.gosselin@inLibro.com>
Comment 13 Jonathan Druart 2017-03-20 19:34:02 UTC
As I said previously I am not willing to PQA this one as it (because of the lack of JS checks).

However the patch looks wrong, all lists are listed (even the private ones) and the "Or select a list of records" block is display even if there are no list defined.
Comment 14 Owen Leonard 2018-04-17 15:51:57 UTC
Would it make sense to completely reset the form if someone selects a different input method (file/list/numbers) ?

http://zivotdesign.com/p/#1/15239764835671
Comment 15 Jonathan Druart 2018-04-17 17:26:00 UTC
(In reply to Owen Leonard from comment #14)
> Would it make sense to completely reset the form if someone selects a
> different input method (file/list/numbers) ?
> 
> http://zivotdesign.com/p/#1/15239764835671

why not tabs then?
Comment 16 Owen Leonard 2018-04-17 18:02:15 UTC
(In reply to Jonathan Druart from comment #15)
> why not tabs then?

Tabs work too. But is it going to make someone mad if they paste a list of barcodes, switch tabs, switch back, and find their input gone?
Comment 17 Katrin Fischer 2018-04-17 19:55:02 UTC
I think tabs. Could we keep the content or is that not possible?
Comment 18 Marjorie Barry-Vila 2018-04-19 14:46:41 UTC
(In reply to Katrin Fischer from comment #17)
> I think tabs. Could we keep the content or is that not possible?

Hi Katrin,
When I read Jeremy's first comment, he talks about Batch items modification/deletion.
I understand that patch proposed by Aleisha concerns only thr tool for batch record modification/deletion.
Do I need to open a new bug for tool "batch items modification"?

Regards,
Marjorie
Comment 19 Katrin Fischer 2018-04-21 10:59:50 UTC
Hi Marjorie, thx for updating! I think then instead of displaying an option to send to the batch item edit or download option for a list of itemnumbers could also work.
Comment 20 Marjorie Barry-Vila 2018-05-02 13:07:18 UTC
(In reply to Katrin Fischer from comment #19)
> Hi Marjorie, thx for updating! I think then instead of displaying an option
> to send to the batch item edit or download option for a list of itemnumbers
> could also work.

Hi Katrin,
Yes your idea is great. I guess it's better then to open a new bug report?
Marjorie
Comment 21 Katrin Fischer 2018-05-02 14:56:50 UTC
Yes, I think separate bug is best, clean start and this is about the record level, so both can be worked on independently.
Comment 22 M. Tompsett 2018-05-24 18:26:15 UTC
Created attachment 75548 [details] [review]
Bug 12759: Use a list (shelf) for batch record modification and deletion

To test:
1) Create a list, add a record to it by its barcode that you don't mind
deleting
2) Go to Tools -> Batch record modification
3) Select the record type 'Authorities'. Confirm the dropdown to select
a list disappears. Confirm selecting 'Biblios' makes the dropdown show
again.
4) Select the list from the dropdown, select a modification template,
Continue
5) Confirm all of the records in that list show on the page. Click
Modify selected records. Confirm this is successful.
6) Go to Batch record deletion
7) Select the record type 'Authorities'. Confirm the dropdown to select
a list disappears. Confirm selecting 'Biblios' makes the dropdown
show again.
8) Select the list from the dropdown and click Continue
9) Confirm all of the records in that list show on the page. Click
Delete selected records. Confirm this is successful.
10) Go back to your lists. The list should still exist but it will now be
empty.

Sponsored-by: Catalyst IT

NOTE: Rebased to work -- Mark Tompsett
Comment 23 Charles Farmer 2018-05-25 21:12:31 UTC
Created attachment 75572 [details] [review]
Bug 12759: Use a list (shelf) for batch record modification and deletion

To test:
1) Create a list, add a record to it by its barcode that you don't mind
deleting
2) Go to Tools -> Batch record modification
3) Select the record type 'Authorities'. Confirm the dropdown to select
a list disappears. Confirm selecting 'Biblios' makes the dropdown show
again.
4) Select the list from the dropdown, select a modification template,
Continue
5) Confirm all of the records in that list show on the page. Click
Modify selected records. Confirm this is successful.
6) Go to Batch record deletion
7) Select the record type 'Authorities'. Confirm the dropdown to select
a list disappears. Confirm selecting 'Biblios' makes the dropdown
show again.
8) Select the list from the dropdown and click Continue
9) Confirm all of the records in that list show on the page. Click
Delete selected records. Confirm this is successful.
10) Go back to your lists. The list should still exist but it will now be
empty.

Sponsored-by: Catalyst IT

NOTE: Rebased to work -- Mark Tompsett

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Comment 24 Jonathan Druart 2018-05-30 17:00:54 UTC
Comment 10 and comment 13 are still valid...


Moreover, prefer to pass an iterator to the template:
-my @lists = Koha::Virtualshelves->search({});
-$template->param( lists => \@lists );
+$template->param( virtual_shelves => scalar Koha::Virtualshelves->search );


You will need to adapt the template accordingly ([% IF virtual_shelves.count %], etc.)
Comment 25 Marcel de Rooy 2018-07-02 11:46:49 UTC
*** Bug 17273 has been marked as a duplicate of this bug. ***
Comment 26 Aleisha Amohia 2018-07-10 04:38:15 UTC
Created attachment 76802 [details] [review]
Bug 12759: [FOLLOW-UP] Using tabs for diff ways of adding records

This patch includes the changes for both batch record modification and
deletion.
Checks that all public lists are included and only private lists created
by the logged in user.
Hides the virtualshelves option if authorities are selected.
Comment 27 Aleisha Amohia 2018-07-10 04:40:39 UTC
Created attachment 76803 [details] [review]
Bug 12759: [FOLLOW-UP] Using tabs for diff ways of adding records

This patch includes the changes for both batch record modification and
deletion.
Checks that all public lists are included and only private lists created
by the logged in user.
Hides the virtualshelves option if authorities are selected.
Doesn't show shelf option at all if none exist
Comment 28 Cab Vinton 2018-08-09 14:22:01 UTC
Tested in Biblibre Sandbox no. 2.

Unable to select Authorities radio button under either Batch Record Modification or Deletion tool.

No problems deleting records, or modifying/ adding content to a MARC field appearing in the editor, using a list as a source of records.

Perhaps unrelated, but was unable to add content to a field that was not visible in the MARC editor (e.g., 945, 970).
Comment 29 Katrin Fischer 2018-08-09 23:21:33 UTC
Took a look at this one too. I think the intended behaviour is that when you check the authorities checkbox, the list option is not offered as the lists can only contain bibliographic records. That does work ok when you start at the top, but when you've already switched to the list tab and then switch from bibliographic to authority, your conf remains visible. Maybe needs a little tweaking.
Comment 30 Jonathan Druart 2018-08-10 13:34:26 UTC
(second patch contains .nfs* files that should not have been committed)
Comment 31 Aleisha Amohia 2018-11-08 01:08:02 UTC
(In reply to Katrin Fischer from comment #29)
> Took a look at this one too. I think the intended behaviour is that when you
> check the authorities checkbox, the list option is not offered as the lists
> can only contain bibliographic records. That does work ok when you start at
> the top, but when you've already switched to the list tab and then switch
> from bibliographic to authority, your conf remains visible. Maybe needs a
> little tweaking.

Hi Katrin, I've spent a lot of time playing with different methods as specified here: https://api.jqueryui.com/tabs/

but haven't had any success in fixing this toggle issue. Do you have any tips or ideas?
Comment 32 Jonathan Druart 2018-11-12 17:52:05 UTC
Created attachment 82228 [details] [review]
Bug 12759: Use a list (shelf) for batch record modification and deletion

To test:
1) Create a list, add a record to it by its barcode that you don't mind
deleting
2) Go to Tools -> Batch record modification
3) Select the record type 'Authorities'. Confirm the dropdown to select
a list disappears. Confirm selecting 'Biblios' makes the dropdown show
again.
4) Select the list from the dropdown, select a modification template,
Continue
5) Confirm all of the records in that list show on the page. Click
Modify selected records. Confirm this is successful.
6) Go to Batch record deletion
7) Select the record type 'Authorities'. Confirm the dropdown to select
a list disappears. Confirm selecting 'Biblios' makes the dropdown
show again.
8) Select the list from the dropdown and click Continue
9) Confirm all of the records in that list show on the page. Click
Delete selected records. Confirm this is successful.
10) Go back to your lists. The list should still exist but it will now be
empty.

Sponsored-by: Catalyst IT

NOTE: Rebased to work -- Mark Tompsett

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Comment 33 Jonathan Druart 2018-11-12 17:52:10 UTC
Created attachment 82229 [details] [review]
Bug 12759: (follow-up) Using tabs for diff ways of adding records

This patch includes the changes for both batch record modification and
deletion.
Checks that all public lists are included and only private lists created
by the logged in user.
Hides the virtualshelves option if authorities are selected.
Doesn't show shelf option at all if none exist
Comment 34 Jonathan Druart 2018-11-12 17:52:15 UTC
Created attachment 82230 [details] [review]
Bug 12759: Pass records from selected tab

To remove ambiguity we should not process the records from other tabs.