The parcel page should only display status "ordered" and "partial".
Created attachment 22597 [details] [review] Bug 11170: The pending order list should only display orders to receive The order status ordered is set when the basket is closed. The parcel page should only display status "ordered" and "partial". Test plan: - create a basket. - create an order. - verify the order is not listed on the parcel page (i.e. you cannot receive it). - close the basket. - verify the order is listed on the parcel page.
Created attachment 23571 [details] [review] Bug 11170: The pending order list should only display orders to receive The order status ordered is set when the basket is closed. The parcel page should only display status "ordered" and "partial". Test plan: - create a basket. - create an order. - verify the order is not listed on the parcel page (i.e. you cannot receive it). - close the basket. - verify the order is listed on the parcel page. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 23572 [details] [review] Bug 11170: Follow-up for typo occured in parcels.tt Found this typo while testing bug 11170. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 23728 [details] [review] Bug 11170: The pending order list should only display orders to receive The order status ordered is set when the basket is closed. The parcel page should only display status "ordered" and "partial". Test plan: - create a basket. - create an order. - verify the order is not listed on the parcel page (i.e. you cannot receive it). - close the basket. - verify the order is listed on the parcel page. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 23729 [details] [review] Bug 11170: Follow-up for typo occured in parcels.tt Found this typo while testing bug 11170. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment on attachment 23728 [details] [review] Bug 11170: The pending order list should only display orders to receive Review of attachment 23728 [details] [review]: ----------------------------------------------------------------- Failing on account of the lack of documentation and unit test coverage for the new parameter to SearchOrders(). ::: C4/Acquisition.pm @@ +1665,4 @@ > my $basketgroupname = $params->{basketgroupname}; > my $owner = $params->{owner}; > my $pending = $params->{pending}; > + my $ordered = $params->{ordered}; There is neither POD nor unit test coverage of this new option. @@ +1695,5 @@ > + $query .= q{ AND (quantity > quantityreceived OR quantityreceived is NULL)}; > + } > + if ( $ordered ) { > + $query .= q{ AND (quantity > quantityreceived OR quantityreceived is NULL)} > + unless $pending; The logic here is unnecessarily convoluted. Please restructure so that only one Boolean test controls whether the "AND (quantity > quantityreceived OR quantityreceived is NULL)" clause gets added.
Created attachment 26049 [details] [review] Bug 11170: Fix an unnecessarily convoluted logic This patch also adds POD and UT. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
(In reply to Galen Charlton from comment #6) > Failing on account of the lack of documentation and unit test coverage for > the new parameter to SearchOrders(). POD and UT added. > The logic here is unnecessarily convoluted. Yes, true! Fixed. Switch back to needs SO if you think it is needed.
Pushed to master. Thanks, Jonathan!