[Koha-bugs] [Bug 14092] Order search doesn't allow to search for 'all statuses'

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Oct 3 13:59:13 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14092

--- Comment #10 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
This is much better!
One final thing:

+    $orders = GetHistory( order_status => "new", vendornote => 'status search'
);
+    is( scalar(@$orders), 1, 'GetHistory with order status "new" returns 1
order' );
+
+    my $orders = GetHistory( get_canceled_order => 1, order_status => "any",
vendornote => 'status search' );
+    is( scalar(@$orders), 2, 'GetHistory with order status "any" returns all
orders' );
+
+    $orders = GetHistory( order_status => "", vendornote => 'status search' );
+    is( scalar(@$orders), 1, 'GetHistory with order status "all except
cancelled" returns zero orders' );

The last test does not read very well. If orders == 1 then it returns 0
orders?? Please adjust.

No big blocker but you assume that there are no orders in the system when you
get a count. So your test may very well fail with some orders being there.
Since you created a new basket, you could also pass the param basket to
GetHistory [my $basket = $params{basket} ]. Which would resolve the issue with
other orders.

GetHistory( basket => $order_basket->{basketno}, etc.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list