]> git.evergreen-ils.org Git - working/Evergreen.git/commit
LP#937789: various improvements to logical deletion of parts
authorGalen Charlton <gmc@esilibrary.com>
Thu, 29 Oct 2015 15:39:16 +0000 (15:39 +0000)
committerBen Shum <bshum@biblio.org>
Thu, 5 Nov 2015 21:27:59 +0000 (16:27 -0500)
commite752e57bac743d1f1e146eea4c97cb5d0999741e
treeb8e085f62ed3bbebae9fdc60e73f5ff899db6fd8
parentb6bb8b927c5b929d21566591c7a9f03a6b425d71
LP#937789: various improvements to logical deletion of parts

This patch ensures that when a monograph part is marked as
deleted, that mappings between it and its copies are also
removed, similar to the previous behavior of the cascade
on delete.

This patch also adds some pgTAP tests and ensures that
unapi.bmp() and unapi.holdings_xml() get updated during upgrade.

To test the fix for this bug:

[1] Apply the patches.
[2] Create a monograph part on a record, then delete it. Verify that
    it no longer shows up in the parts maintenance interface, but that
    a row in the biblio.monograph_parts table still exists with the
    deleted flag set to true.
[3] Create another monograph part on the same record.
[4] Create a new volume/copy and assign the part created in step
    3 to it. Verify that the part shown in step 2 is *not*
    included in the XUL part selector.
[5] Place a part-level hold. Verify that the hold request
    is displayed correct in both the public catalog and the staff
    interface.
[6] Delete the part created in step 3.
[7] Verify that viewing the list of the patron's holds in the XUL staff
    client doesn't result in any 'network errors'.  Also verify that
    the hold request is still displayed in patron's view in the public
    catalog.
[8] Using SQL or some other means, set the expire_time and
    prev_check_time of the test hold request to a couple days in the
    past, then run the hold targeter.  Verify that the hold gets
    cancelled for lack of a suitable copy to fill it.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/sql/Pg/800.fkeys.sql
Open-ILS/src/sql/Pg/t/regress/lp937789_fake_bmp_delete.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.fake-delete-parts.sql