Test data copies get "checked out" copy status when circ'd
authorBill Erickson <berick@esilibrary.com>
Fri, 21 Dec 2012 16:14:10 +0000 (11:14 -0500)
committerBen Shum <bshum@biblio.org>
Sun, 23 Dec 2012 18:27:03 +0000 (13:27 -0500)
Set the status to 1 (checked out) for items that are circulated as part
of the test data transactions load.  Otherwise, the data is busted and
renewals are not possible.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/tests/datasets/sql/env_create.sql

index 4a2970d..9dedb06 100644 (file)
@@ -123,6 +123,10 @@ BEGIN
         max_fine.name,
         due_date
     );
+
+    -- mark copy as checked out
+    UPDATE asset.copy SET status = 1 WHERE id = copy_id;
+
 END;
 $$ LANGUAGE PLPGSQL;