Do a better test of copy holdability than we were doing previously.
We can't do a perfect test: we don't really know what patron we're doing
this for, and even if we did, from here it's nontrivial to figure out
whether we're doing indb holds or script-based, much less run the tests.
Still, we can test whether a copy's in a holdable status, a holdable
location, and is itself not explicitly marked unholdable.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
my $good_records = $e->json_query(
{ distinct => 1,
select => { 'bre' => ['id'] },
- from => { 'bre' => { 'acn' => { 'join' => { 'acp' } } } },
+ from => {
+ 'bre' => {
+ 'acn' => {
+ 'join' => {
+ 'acp' => {"join" => {"acpl" => {}, "ccs" => {}}}
+ }
+ }
+ }
+ },
where => {
'+bre' => { id => \@recs },
'+acp' => {
+ holdable => 't',
circ_lib => [ map { $_->{id} } @$orgs ],
deleted => 'f'
- }
+ },
+ "+ccs" => { holdable => 't' },
+ "+acpl" => { holdable => 't' }
}
}
);