Skip to content

Commit

Permalink
Adjust opac link lookup #1888
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasNx committed Sep 25, 2023
1 parent ce0346b commit c2e348b
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions src/main/resources/alma/fix/macros.fix
Original file line number Diff line number Diff line change
Expand Up @@ -255,20 +255,17 @@ end
# opacLink

do put_macro("opacLink")
copy_field("$.@iz", "$i.@opacLink")
if exists("zdbId")
lookup("$i.@opacLink","isil2opac_zdbId", delete:"true")
split_field("$i.@opacLink","{zdbid}")
if exists("$i.@opacLink.1")
paste("hasItem[].$last.opacLink","$i.@opacLink.1","zdbId","$i.@opacLink.2",join_char:"")
end
else
lookup("$i.@opacLink","isil2opac_hbzId", delete:"true")
split_field("$i.@opacLink","{hbzid}")
if exists("$i.@opacLink.1")
paste("hasItem[].$last.opacLink","$i.@opacLink.1","hbzId","$i.@opacLink.2",join_char:"")
end
end
copy_field("$i.@iz", "$i.@opacLinkZdbId")
lookup("$i.@opacLinkZdbId","isil2opac_zdbId", delete:"true")
split_field("$i.@opacLinkZdbId","\\{zdbid\\}")
copy_field("$i.@iz", "$i.@opacLinkHbzId")
lookup("$i.@opacLinkHbzId","isil2opac_hbzId", delete:"true")
split_field("$i.@opacLinkHbzId","\\{hbzId\\}")
if exists("$i.@opacLinkZdbId.1")
paste("hasItem[].$last.opacLink","$i.@opacLinkZdbId.1","zdbId","$i.@opacLinkZdbId.2",join_char:"")
elsif exists("$i.@opacLinkHbzId.1")
paste("hasItem[].$last.opacLink","$i.@opacLinkHbzId.1","hbzId","$i.@opacLinkHbzId.2",join_char:"")
end
end

# for Schlagwortfolgen
Expand Down

0 comments on commit c2e348b

Please sign in to comment.