Skip to content

Commit

Permalink
ht pd-pvt are not considered Full Text viewable
Browse files Browse the repository at this point in the history
  • Loading branch information
niquerio committed Aug 21, 2024
1 parent e485034 commit 3e8b8ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion umich_catalog_indexing/lib/ht_traject/ht_macros.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ def record_source

# get display string for ht links based on righs and ETAS status
def statusFromRights(rights, etas = false)
if /^(pd|world|cc|und-world|ic-world)/.match?(rights)
# from https://github.com/hathitrust/hathifiles/blob/main/lib/item_record.rb#L24
if /^(pdus$|pd$|world|cc|und-world|ic-world)/.match?(rights)
"Full text"
elsif etas
"Full text available, simultaneous access is limited (HathiTrust log in required)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
@zephir_record["fields"][45]["974"]["subfields"][7]["r"] = "pdus"
expect(subject.no_full_text?).to eq(false)
end
it "returns true when record includes pd-pvt items" do
@zephir_record["fields"][45]["974"]["subfields"][7]["r"] = "pd-pvt"
expect(subject.no_full_text?).to eq(true)
end
end
context "#is_umich?" do
it "returns true when umich is the preffered record" do
Expand Down

0 comments on commit 3e8b8ea

Please sign in to comment.