When a copy is deleted, the value of $cp->deleted is a string ('t'). The '==' operator doesn't do string comparison; instead, the test ($cp->deleted == 0) evaluates to 1, and the copy is treated as if it were NOT deleted. (I hope I've got that straight. Anyway the fix itself is simple enough.)
Fix is in the user/jeffdavis/ lp1267252- sru-deleted- holdings branch of the working repo:
http:// git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=commitdif f;h=3b83603
When a copy is deleted, the value of $cp->deleted is a string ('t'). The '==' operator doesn't do string comparison; instead, the test ($cp->deleted == 0) evaluates to 1, and the copy is treated as if it were NOT deleted. (I hope I've got that straight. Anyway the fix itself is simple enough.)
This bugfix should be backported.