Commit c4b3631
LP2045440: marc_export Exports Public Copy Tags
Public copy tags are now exported by `marc_export` in the 852
subfield z when the `--items` option is used.
To test:
1. Find some copies with copy tags where pub is true.
2. Export the bibs for these copies via `marc_export` with the
`--items` option.
3. Check the 852s in the exported file to see that they have no
subfiled z.
4. Apply the patch/commit, rebuild and install marc_export.
5. Repeat #2.
6. Check the output for the presence of subfield z in the 852 with the
value from the copy tags from the database. To distinguish from
public copy notes, the public copy tags will have the tag type
label and ": " prepended to the value.
The following can be run on the command line as a shortcut for
steps 2 and 5:
{
psql <<EOF
select acn.record
from asset.call_number acn
join asset.copy
on acn.id = copy.call_number
join asset.copy_tag_copy_map map
on map.copy = copy.id
join asset.copy_tag tag
on tag.id = map.tag
and tag.pub is true
where not copy.deleted
and not acn.deleted
EOF
} | marc_export --items --format xml -e UTF-8 > items.xml
Be sure to fill in the appropriate database connection parameters
on the psql line.
Signed-off-by: Jason Stephenson <jason@sigio.com>
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>1 parent dee174a commit c4b3631
File tree
2 files changed
+41
-0
lines changed- Open-ILS/src/support-scripts
- docs/RELEASE_NOTES_NEXT/Cataloging
2 files changed
+41
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
| 419 | + | |
419 | 420 | | |
420 | 421 | | |
421 | 422 | | |
| |||
738 | 739 | | |
739 | 740 | | |
740 | 741 | | |
| 742 | + | |
741 | 743 | | |
742 | 744 | | |
743 | 745 | | |
| |||
1027 | 1029 | | |
1028 | 1030 | | |
1029 | 1031 | | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
1030 | 1036 | | |
1031 | 1037 | | |
1032 | 1038 | | |
| |||
1060 | 1066 | | |
1061 | 1067 | | |
1062 | 1068 | | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
1063 | 1092 | | |
1064 | 1093 | | |
1065 | 1094 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments