discard items workflow
- scan item barcode into scanBarcode.pl
- consider the options provided by yesORno.pl - choose wisely
- return to step 1
remove OCLC holdings workflow
- go to folio.drew.edu/cgi-bin/bibServices/discardItems/removeOCLCholdings.pl
- Ctrl-C or download a txt file?
- do what needs to be done
- click the "OCLC holdings have been removed" button
perl scripts and what they do
- /var/www/folio/cgi-bin/bibServices/discardItems
- /discardItem.pl
- uses DateTime to determine the current month and year
- GETs totalItems and all barcodes and itemIds associated with the holdingsRecordId
- if the barcodes match DELETEs via /item-storage/items
- if totalItems = 1 DELETEs via holdings-storage/holdings
- GETs totalIHoldings associated with the instanceId
- if totalHoldings > 0...
- writes "$oclc|$title|$callNumber|$mtype|$barcode|$instanceId|$xUser|$thisMonth/$thisYear|\n" to discards.log
- if totalHoldings = 0...
- GETs the instance from /instance-storage/instances
- uses regex to mark it as suppressed from discovery and change the status term to discarded
- PUTs the modified instance to /instance-storage/instances
- GETs the recordId and DELETEs it (actually: changes deleted: false to deleted: true)
- writes "$oclc|$title|$callNumber|$mtype|$barcode|$instanceId|$xUser|$thisMonth/$thisYear|\n" to discards.log
- writes "$oclc|$barcode|" to discards.removeHoldings
- /removeOCLCholdings.pl
- provides a list of OCLC#s so that holdings can be removed from OCLC in batch
- /scanBarcode.pl - offers a focused text box to scan the barcode of the item to be discarded; posts the barcode to yesORno.pl
- /yesORno.pl
- gets all mtype info (id and name) from /material-types
- gets the holdingsRecordId and materialTypeId form /item-storage/items
- gets the callNumber and instanceId from /holdings-storage/holdings
- gets the identifiers and title from /instance-storage/instances
- if an identifier includes "OCoLC" the option to discard is provided which then POSTs the barcode, callNumber, holdingsRecordId, instanceId, mtype, OCLC#, and title to discardItem.pl
- /discardItem.pl
mysql> describe log;
+------------+--------------+------+-----+
| Field | Type | Null | Key |
+------------+--------------+------+-----+
| oclc | varchar(12) | YES | |
| title | varchar(255) | YES | |
| callNumber | varchar(25) | YES | |
| mtype | varchar(20) | YES | |
| barcode | varchar(14) | NO | PRI |
| instanceId | varchar(36) | YES | |
| xUser | varchar(20) | YES | |
| mmyyyy | varchar(6) | YES | |
+------------+--------------+------+-----+
mysql> describe removeOCLCholdings;
+-------+-------------+------+-----+
| Field | Type | Null | Key |
+-------+-------------+------+-----+
| oclc | varchar(12) | NO | PRI |
+-------+-------------+------+-----+
Add Comment