From 9af03807fab8f50024885d4e080a6243ec512509 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 17 Dec 2013 16:52:47 +0000 Subject: [PATCH] Bug 11409: display ungrouped baskets when create new basket group This patch fixes a problem where, when creating a new basket group for a vendor, no open baskets were displayed in the ungrouped baskets control, thereby making it impossible to add baskets to the group from that interface. This patch fixes that. To test ------- [1] Create some order baskets for a vendor. Make sure that at least one of them gets closed. [2] From the vendor details page, click the basket groups link and create a new basket group. [3] Observe that none of the open baskets are available to be selected. [4] Apply the patch and refresh. [5] This time, the open baskets should be listed in the ungrouped baskets widget. [6] Verify that you can move some baskets into the group and save the group. [7] Verify that no closed baskets show up in the ungrouped baskets widget. Signed-off-by: Galen Charlton --- acqui/basketgroup.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl index 6fe4db2..2b54a4f 100755 --- a/acqui/basketgroup.pl +++ b/acqui/basketgroup.pl @@ -174,7 +174,7 @@ sub displaybasketgroups { $template->param(basketgroups => $basketgroups); } for(my $i=0; $i < scalar @$baskets; ++$i) { - if( ! @$baskets[$i]->{'closedate'} ) { + if( @$baskets[$i]->{'closedate'} ) { splice(@$baskets, $i, 1); --$i; }else{ -- 1.7.10.4