Skip to content

Commit

Permalink
DEV-616 Prediction report of non-bib items that should move back to a…
Browse files Browse the repository at this point in the history
… pdus/bib status (#124)

- Follow-up to remove `ic/man` from list of eligible volumes.
- Remove volumes with imprint having target date as beginning of range.
  • Loading branch information
moseshll authored Dec 11, 2023
1 parent 13020af commit 5db98fa
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bin/bib_newyear.pl
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ END
' INNER JOIN attributes a ON r.attr=a.id'.
' INNER JOIN reasons rs ON r.reason=rs.id'.
' WHERE CONCAT(a.name,"/",rs.name)'.
' IN ("ic-world/con","ic/cdpp","ic/crms","ic/ipma","ic/man","ic/ren","op/ipma",
' IN ("ic-world/con","ic/cdpp","ic/crms","ic/ipma","ic/ren","op/ipma",
"pd/cdpp","pd/crms","pd/ncn","pd/ren","pdus/cdpp",
"pdus/crms","pdus/gfv","pdus/ncn","pdus/ren","und/crms",
"und/nfi","und/ren")'.
Expand Down Expand Up @@ -101,6 +101,14 @@ END
my $id = $row->[0]. '.'. $row->[1];
my $attr = $row->[2];
my $reason = $row->[3];
my $like_clause = '%' . ($br->{'us_pd_cutoff_year'} - 1) . '-%';
$sql = "SELECT imprint FROM hf WHERE htid=? AND imprint LIKE '$like_clause'";
my $bad_imprint = $crms->SimpleSqlGetSDR($sql, $id);
if ($bad_imprint) {
print "$id: later dates found on imprint ($bad_imprint), skipping\n" if $verbose;
next;
}

my $record = $crms->GetMetadata($id);
if (!defined $record) {
print "Unable to get metadata for $id\n";
Expand Down

0 comments on commit 5db98fa

Please sign in to comment.