diff --git a/code/sierra_export_api/sierra_export_api.jar b/code/sierra_export_api/sierra_export_api.jar index deafc18b7f..249d358a76 100644 Binary files a/code/sierra_export_api/sierra_export_api.jar and b/code/sierra_export_api/sierra_export_api.jar differ diff --git a/code/sierra_export_api/src/com/turning_leaf_technologies/sierra/SierraExportAPIMain.java b/code/sierra_export_api/src/com/turning_leaf_technologies/sierra/SierraExportAPIMain.java index 298201b157..0545b7fe4d 100644 --- a/code/sierra_export_api/src/com/turning_leaf_technologies/sierra/SierraExportAPIMain.java +++ b/code/sierra_export_api/src/com/turning_leaf_technologies/sierra/SierraExportAPIMain.java @@ -459,17 +459,18 @@ private static int updateBibs(SierraInstanceInformation sierraInstanceInformatio private static void getBibsWithHoldings(Connection sierraConn) { bibsWithHoldings.clear(); try { - PreparedStatement bibHoldingsStmt = sierraConn.prepareStatement("select distinct(record_num) as record_num from sierra_view.bib_record_holding_record_link INNER JOIN sierra_view.record_metadata ON bib_record_id = record_metadata.id where record_type_code = 'b'", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); - ResultSet bibHoldingsRS = bibHoldingsStmt.executeQuery(); - while (bibHoldingsRS.next()){ - String bibId = bibHoldingsRS.getString("record_num"); - //Don't need the .b and checksum for this - bibsWithHoldings.add(bibId); - } + PreparedStatement bibHoldingsStmt = sierraConn.prepareStatement("select distinct(record_num) as record_num from sierra_view.bib_record_holding_record_link INNER JOIN sierra_view.record_metadata ON bib_record_id = record_metadata.id where record_type_code = 'b'", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); + ResultSet bibHoldingsRS = bibHoldingsStmt.executeQuery(); + while (bibHoldingsRS.next()){ + String bibId = bibHoldingsRS.getString("record_num"); + //Don't need the .b and checksum for this + bibsWithHoldings.add(bibId); + } bibHoldingsRS.close(); } catch (Exception e) { logger.error("Unable to get bibs with holdings from Sierra", e); } + logEntry.addNote("Finished getting bibs with holdings " + dateTimeFormatter.format(new Date())); } @@ -1064,6 +1065,11 @@ private static boolean updateMarcAndRegroupRecordId(SierraInstanceInformation si holdingField.addSubfield(marcFactory.newSubfield(subfield.getString("tag").charAt(0), subfield.getString("content"))); } holdingField.addSubfield(marcFactory.newSubfield('6', Integer.toString(holdingId))); + }else if (curVarField.has("fieldTag") && curVarField.get("fieldTag").equals("h")) { + DataField holdingField = marcFactory.newDataField("866", ' ', ' '); + marcRecord.addVariableField(holdingField); + holdingField.addSubfield(marcFactory.newSubfield('a', curVarField.getString("content"))); + holdingField.addSubfield(marcFactory.newSubfield('6', Integer.toString(holdingId))); } } //Location is in the fixed fields diff --git a/code/web/Drivers/Millennium.php b/code/web/Drivers/Millennium.php index 8b807d000b..9ee847a765 100644 --- a/code/web/Drivers/Millennium.php +++ b/code/web/Drivers/Millennium.php @@ -864,8 +864,11 @@ public function getIssueSummaries($id) { $value = $locationParts[1]; } } elseif ($label == 'holdings') { - //Change the lable to avoid conflicts with actual holdings + //Change the label to avoid conflicts with actual holdings $label = 'holdingStatement'; + } elseif ($label == 'itemLoc') { + //Change the label for consistency + $label = 'location'; } $issueSummary[$label] = $value; } diff --git a/code/web/release_notes/24.04.00.MD b/code/web/release_notes/24.04.00.MD index 5ce0927e52..7a50fb3656 100644 --- a/code/web/release_notes/24.04.00.MD +++ b/code/web/release_notes/24.04.00.MD @@ -15,6 +15,10 @@ ### Marc holdings updates - Update logic for determining the display name for an owning library for a marc holding. (Ticket 124256) (*MDN*) +### Sierra Updates +- Update Sierra Export to handle MARC holdings that do not have a MARC tag associated with them. (Ticket 124256) (*MDN*) +- Fix loading location for additional copies. (Ticket 124256) (*MDN*) + ### Theme Updates - Replace Arial font with Arimo font. (Ticket 129721) (*MDN*)