From 5db98fab29827565f0828c036932ade02e4ca98a Mon Sep 17 00:00:00 2001 From: "Brian \"Moses\" Hall" Date: Mon, 11 Dec 2023 14:20:10 -0500 Subject: [PATCH] DEV-616 Prediction report of non-bib items that should move back to a 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. --- bin/bib_newyear.pl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bin/bib_newyear.pl b/bin/bib_newyear.pl index c44ab6f7..e3614d80 100755 --- a/bin/bib_newyear.pl +++ b/bin/bib_newyear.pl @@ -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")'. @@ -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";