Bugzilla – Attachment 78864 Details for
Bug 10869
Can't cancel order line if title deleted
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10869 Followup: Unit tests for DelOrder
Bug-10869-Followup-Unit-tests-for-DelOrder.patch (text/plain), 4.98 KB, created by
Chris Cormack
on 2018-09-15 17:28:29 UTC
(
hide
)
Description:
Bug 10869 Followup: Unit tests for DelOrder
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2018-09-15 17:28:29 UTC
Size:
4.98 KB
patch
obsolete
>From 6c0f628f40de138758c4cf8d0a6c31d4bce7d6a4 Mon Sep 17 00:00:00 2001 >From: Mathieu Saby <mathieu.saby@univ-rennes2.fr> >Date: Wed, 23 Oct 2013 00:38:25 +0200 >Subject: [PATCH] Bug 10869 Followup: Unit tests for DelOrder > >[The best would be to add a second sign-off to this patch, as I had to to a little change, to take into account the recent rewrite of t/db_dependent/Acquisition.t: >$ordernumber3 is now $ordernumbers[2] >Mathieu Saby] > >DelOrder now returns undef if no ordernumber passed. >This patch also adds unit tests for DelOrder. > >Test plan: >A. With syspref AcqCreateItem = on placing an order > >1. Fill a basket with some orders (some records with already existing items or holds, some without items). New items linked with the order will be created >2. Keep the basket open >3. In the catalog, supress all the items attached to one of the record used in the basket, then suppress the record >4. In the basket, check you can delete the order that was using deleted record (click on link "Delete order" in the right column of the table) >5. After deleting the order, check there is a new line in the "Deleted orders" table >6. Regression test : try to delete other orders, and check the deletion of the order implies the deletion of items created when ordering >a/ If no items were attached to the record before you created the basket, you can delete some other orders, AND their record. Try to delete order and record. >b/ If some items were attached to the record before you created the basket, you can delete some other orders, BUT NOT their record. Try to delete only order. After you have deleted it, the items created when ordering must have been deleted. > >7. Add some other orders to your basket (some records with already existing items or holds, some without items). New items linked with the order will be created >8. In the catalog, supress all the items attached to one of the record used in the basket, then suppress the record >9. Close the basket >10. Go on receipt page >11. Search the orders of your basket >12. In receipt page, check you can delete the order that was using deleted record (click on link "Delete order" in the right column of the table) >13. Regression test : try to delete other orders >a/ If no items were attached to the record before you created the basket, you can delete some other orders, AND their record. Try to delete order and record. >b/ If some items were attached to the record before you created the basket, you can delete some other orders, BUT NOT their record. Try to delete only order. After you have deleted it, the items created when ordering must have been deleted. > >B. With syspref AcqCreateItem = on receiving an order > >1. Fill a basket with some orders (some records with already existing items or holds, some without items). >2. Keep the basket open >3. In the catalog, supress all the items attached to one of the record used in the basket, then suppress the record >4. In the basket, check you can delete the order that was using deleted record (click on link "Delete order" in the right column of the table) >5. After deleting the order, check there is a new line in the "Deleted orders" table >6. Regression test : try to delete other orders >a/ If no items were attached to the record before you created the basket, you can delete some other orders, AND their record. Try to delete order and record. >b/ If some items were attached to the record before you created the basket, you can delete some other orders, BUT NOT their record. Try to delete only order. >7. Add some other orders to your basket (some records with already existing items or holds, some without items). >8. In the catalog, supress all the items attached to one of the record used in the basket, then suppress the record >9. Close the basket >10. Go on receipt page >11. Search the orders of your basket >12. In receipt page, check you can delete the order that was using deleted record (click on link "Delete order" in the right column of the table) >13. Regression test : try to delete other orders >a/ If no items were attached to the record before you created the basket, you can delete some other orders, AND their record. Try to delete order and record. >b/ If some items were attached to the record before you created the basket, you can delete some other orders, BUT NOT their record. Try to delete only order. > >And to test the UT: prove t/db_dependent/Acquisition.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Amended the patch as to removing biblio parameter in DelOrder. >There is no need to remove the parameter if you will search for >biblionumber later on. >Deleting records in aqorders_items is discussed on bug 11617. >--- > C4/Acquisition.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index aa571489e2..0cdd62a7ed 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -1897,7 +1897,7 @@ cancelled. > > sub DelOrder { > my ( $bibnum, $ordernumber, $delete_biblio, $reason ) = @_; >- >+ return if !$ordernumber; > my $error; > my $dbh = C4::Context->dbh; > my $query = " >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10869
:
20970
|
21106
|
21294
|
21295
|
21480
|
22104
|
22299
|
22300
|
22342
|
22676
|
23839
|
24743
|
24744
|
24992
|
25000
|
25001
|
25002
|
25003
|
26692
|
26693
|
27270
|
27292
|
28516
|
29668
|
78862
|
78863
| 78864