Bug 5894

Summary: Adding multiple items from a cart to a list shows only the first title
Product: Koha Reporter: Owen Leonard <oleonard>
Component: ListsAssignee: Marc Véron <veron>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: normal    
Priority: P5 - low CC: bgkriegel, chris, chrish, gmcharlt, tomascohen, veron
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 5894 - Adding multiple items from a cart to a list shows only the first title
Bug 5894 - Adding multiple items from a cart to a list shows only the first title
Bug 5894 - Adding multiple items from a cart to a list shows only the first title

Description Owen Leonard 2011-03-18 14:46:01 UTC
Steps to reproduce:

1. Add multiple items to a cart.
2. Open the cart window, select all items.
3. Click "Add to list"

The "Add to a list" window which appears will show only the first of the multiple titles you selected.

I note we have inconsistent behavior when adding directly to a list, so I'm not sure what should be happening in the case of a cart to list operation. If you add multiple items directly to an *existing* list from the search result screen the pop-up window will display the titles you're adding. If you add multiple items to a *new* list none of the titles display.

The cart should probably either show no titles or somehow manage the display of title to accommodate the fact that a cart could have hundreds of items in it. (At least when adding to lists from search results you're limited to the number of results on one page.)
[+] Comment 1 Marc Véron 2013-06-14 14:32:31 UTC Comment hidden (obsolete)
[+] Comment 2 Chris Cormack 2013-06-30 07:21:09 UTC Comment hidden (obsolete)
Comment 3 Chris Cormack 2013-06-30 07:21:37 UTC
opac/opac-addbybiblionumber.pl 

and

virtualshelves/addbybiblionumber.pl

Duplicate a lot of subroutines, and code that should be in a subroutine, it would be a great job for a person new to Koha to write tests for the subroutines and then refactor them into a module.

However this won't stop me signing off on this patch that does fix the problem
Comment 4 Kyle M Hall (khall) 2013-07-05 13:07:00 UTC
Created attachment 19408 [details] [review]
Bug 5894 - Adding multiple items from a cart to a list shows only the first title

Adds missing code that splits biblios before calling template.

To test:
Add some items to cart
Open cart, select some or all items
Add to list
With patch, following window shold show something like "Add 3 items to a list:", followed by list of items

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised.
Comment 5 Galen Charlton 2013-07-05 14:07:33 UTC
Pushed to master.  Thanks, Marc!
Comment 6 Tomás Cohen Arazi (tcohen) 2013-07-15 23:45:29 UTC
This patch has been pushed to 3.12.x, will be in 3.12.2.

Thanks Marc!
Comment 7 Bernardo Gonzalez Kriegel 2013-08-03 18:14:54 UTC
Pushed to 3.10.x, will be in 3.10.10
Comment 8 Chris Hall 2013-08-18 04:25:46 UTC
Pushed to 3.8.x, will be in 3.8.17