Skip to content

Commit

Permalink
Merge branch '24.06.00' into 24.07.00
Browse files Browse the repository at this point in the history
  • Loading branch information
mdnoble73 committed Jun 10, 2024
2 parents f8223de + cc79f4b commit a43640f
Show file tree
Hide file tree
Showing 71 changed files with 469 additions and 112 deletions.
8 changes: 8 additions & 0 deletions code/aspen_app/app-configs/updateConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,14 @@ const app_config = {
project: app['sentryProject'],
},
],
[
'expo-build-properties',
{
ios: {
deploymentTarget: '16.0',
},
},
],
],
};

Expand Down
2 changes: 2 additions & 0 deletions code/aspen_app/src/navigations/stack/AccountStackNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { MyLinkedAccounts } from '../../screens/MyAccount/LinkedAccounts/LinkedA
import { Settings_NotificationOptions } from '../../screens/MyAccount/Settings/NotificationOptions';
import { PreferencesScreen } from '../../screens/MyAccount/Settings/Preferences';
import { MyHolds } from '../../screens/MyAccount/TitlesOnHold/MyHolds';
import { BackIcon } from '../../themes/theme';
import { getTermFromDictionary } from '../../translations/TranslationService';
import { EditionsModal } from './BrowseStackNavigator';

Expand All @@ -33,6 +34,7 @@ const AccountStackNavigator = () => {
screenOptions={{
headerShown: true,
headerBackTitleVisible: false,
headerBackImage: () => <BackIcon />,
}}>
<Stack.Group>
<Stack.Screen name="MyPreferences" component={PreferencesScreen} options={{ title: getTermFromDictionary(language, 'preferences') }} />
Expand Down
7 changes: 5 additions & 2 deletions code/aspen_app/src/navigations/stack/BrowseStackNavigator.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { createStackNavigator } from '@react-navigation/stack';
import { ChevronLeftIcon, CloseIcon, Pressable } from 'native-base';
import { ChevronLeftIcon, CloseIcon, Pressable, Icon } from 'native-base';
import React from 'react';
import Scanner from '../../components/Scanner';
import { LanguageContext } from '../../context/initialContext';
import { LanguageContext, ThemeContext } from '../../context/initialContext';
import { navigate } from '../../helpers/RootNavigator';

import { DiscoverHomeScreen } from '../../screens/BrowseCategory/Home';
import { EventScreen } from '../../screens/Event/Event';
Expand All @@ -19,6 +20,7 @@ import { SearchResultsForBrowseCategory } from '../../screens/Search/SearchByCat
import { SearchResultsForList } from '../../screens/Search/SearchByList';
import { SearchResultsForSavedSearch } from '../../screens/Search/SearchBySavedSearch';
import { SearchResults } from '../../screens/Search/SearchResults';
import { BackIcon } from '../../themes/theme';
import { getTermFromDictionary } from '../../translations/TranslationService';

const BrowseStackNavigator = () => {
Expand All @@ -31,6 +33,7 @@ const BrowseStackNavigator = () => {
screenOptions={({ navigation, route }) => ({
headerShown: true,
headerBackTitleVisible: false,
headerBackImage: () => <BackIcon />,
})}>
<Stack.Screen
name="HomeScreen"
Expand Down
2 changes: 2 additions & 0 deletions code/aspen_app/src/navigations/stack/MoreStackNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { ScreenBrightnessPermissionDescription } from '../../screens/MyAccount/S
import { PermissionsDashboard } from '../../screens/MyAccount/Settings/Permissions';
import { PreferencesScreen } from '../../screens/MyAccount/Settings/Preferences';
import { SupportScreen } from '../../screens/MyAccount/Settings/Support';
import { BackIcon } from '../../themes/theme';
import { getTermFromDictionary } from '../../translations/TranslationService';

const MoreStackNavigator = () => {
Expand All @@ -28,6 +29,7 @@ const MoreStackNavigator = () => {
screenOptions={{
headerShown: true,
headerBackTitleVisible: false,
headerBackImage: () => <BackIcon />,
}}>
<Stack.Screen name="MoreMenu" component={MoreMenu} options={{ title: getTermFromDictionary(language, 'nav_more') }} />
<Stack.Screen
Expand Down
2 changes: 2 additions & 0 deletions code/aspen_app/src/navigations/stack/SearchStackNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { SearchIndexScreen } from '../../screens/Search/Facets/SearchIndex';
import { SearchSourceScreen } from '../../screens/Search/Facets/SearchSource';
import { FiltersScreen } from '../../screens/Search/Filters';
import { SearchHome } from '../../screens/Search/Search';
import { BackIcon } from '../../themes/theme';
import { getTermFromDictionary } from '../../translations/TranslationService';
import { EditionsModal } from './BrowseStackNavigator';

Expand All @@ -28,6 +29,7 @@ const SearchStackNavigator = ({ options, route, back, navigation }) => {
screenOptions={({ navigation, route }) => ({
headerShown: true,
headerBackTitleVisible: false,
headerBackImage: () => <BackIcon />,
})}>
<Stack.Group>
<Stack.Screen
Expand Down
7 changes: 6 additions & 1 deletion code/aspen_app/src/themes/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,19 @@ import { create } from 'apisauce';
import chroma from 'chroma-js';
import { LinearGradient } from 'expo-linear-gradient';
import _ from 'lodash';
import { Box, extendTheme, HStack, Icon, IconButton, Text, useColorMode, useColorModeValue } from 'native-base';
import { ChevronLeftIcon, Box, extendTheme, HStack, Icon, IconButton, Text, useColorMode, useColorModeValue } from 'native-base';
import React, { useState } from 'react';
import { ThemeContext } from '../context/initialContext';

import { createAuthTokens, getHeaders } from '../util/apiAuth';
import { GLOBALS } from '../util/globals';
import { getAppSettings, LIBRARY } from '../util/loadLibrary';

export const BackIcon = (props) => {
const { theme } = React.useContext(ThemeContext);
return <ChevronLeftIcon size="md" ml={1} {...props} color={theme['colors']['primary']['baseContrast']} />;
};

export async function getThemeData() {
let theme = [];
const discovery = create({
Expand Down
Binary file modified code/axis_360_export/axis_360_export.jar
Binary file not shown.
Binary file modified code/carlx_export/carlx_export.jar
Binary file not shown.
Binary file modified code/cloud_library_export/cloud_library_export.jar
Binary file not shown.
Binary file modified code/course_reserves_indexer/course_reserves_indexer.jar
Binary file not shown.
Binary file modified code/cron/cron.jar
Binary file not shown.
Binary file modified code/events_indexer/events_indexer.jar
Binary file not shown.
Binary file modified code/evergreen_export/evergreen_export.jar
Binary file not shown.
Binary file modified code/evolve_export/evolve_export.jar
Binary file not shown.
Binary file modified code/hoopla_export/hoopla_export.jar
Binary file not shown.
Binary file modified code/koha_export/koha_export.jar
Binary file not shown.
Binary file modified code/oai_indexer/oai_indexer.jar
Binary file not shown.
Binary file modified code/overdrive_extract/overdrive_extract.jar
Binary file not shown.
Binary file modified code/palace_project_export/palace_project_export.jar
Binary file not shown.
Binary file modified code/polaris_export/polaris_export.jar
Binary file not shown.
Binary file modified code/reindexer/reindexer.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public FormatInfo getFormatInfoForItem(AbstractGroupedWorkSolr groupedWork, Stri
if (format != null) {
FormatMapValue formatMapValue = profile.getFormatMapValue(format, BaseIndexingSettings.FORMAT_TYPE_ITEM_FORMAT);
if (formatMapValue != null) {
if (groupedWork != null && groupedWork.isDebugEnabled()) {groupedWork.addDebugMessage("Format is " + formatMapValue.getFormat() + " based on Item Format of " + format, 2);}
return new FormatInfo(formatMapValue, BaseIndexingSettings.FORMAT_TYPE_ITEM_FORMAT);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public FormatInfo getFormatInfoForItem(AbstractGroupedWorkSolr groupedWork, Stri
if (translatedLocation != null) {
foundFormatFromShelfLocation = true;
formatInfo.setFormatFromMap(translatedLocation, BaseIndexingSettings.FORMAT_TYPE_ITEM_SHELVING_LOCATION);
if (groupedWork != null && groupedWork.isDebugEnabled()) {groupedWork.addDebugMessage("Format for item " + itemIdentifier + " is " + formatInfo.format + " based on shelf location", 2);}
if (groupedWork != null && groupedWork.isDebugEnabled()) {groupedWork.addDebugMessage("Format for item " + itemIdentifier + " is " + formatInfo.format + " based on shelf location of " + shelfLocation, 2);}
}
}

Expand All @@ -40,7 +40,7 @@ public FormatInfo getFormatInfoForItem(AbstractGroupedWorkSolr groupedWork, Stri
if (translatedLocation != null) {
foundFormatFromSublocation = true;
formatInfo.setFormatFromMap(translatedLocation, BaseIndexingSettings.FORMAT_TYPE_ITEM_SUBLOCATION);
if (groupedWork != null && groupedWork.isDebugEnabled()) {groupedWork.addDebugMessage("Format for item " + itemIdentifier + " is " + formatInfo.format + " based on sub location", 2);}
if (groupedWork != null && groupedWork.isDebugEnabled()) {groupedWork.addDebugMessage("Format for item " + itemIdentifier + " is " + formatInfo.format + " based on sub location of " + subLocation, 2);}
}
}

Expand All @@ -52,7 +52,7 @@ public FormatInfo getFormatInfoForItem(AbstractGroupedWorkSolr groupedWork, Stri
if (translatedFormat != null) {
foundFormatFromCollection = true;
formatInfo.setFormatFromMap(translatedFormat, BaseIndexingSettings.FORMAT_TYPE_ITEM_COLLECTION);
if (groupedWork != null && groupedWork.isDebugEnabled()) {groupedWork.addDebugMessage("Format for item " + itemIdentifier + " is " + formatInfo.format + " based on collection code", 2);}
if (groupedWork != null && groupedWork.isDebugEnabled()) {groupedWork.addDebugMessage("Format for item " + itemIdentifier + " is " + formatInfo.format + " based on collection code of " + collectionCode, 2);}
}else{
//Check to see if the translated collection code is used
if (profile.hasTranslation("collection", collectionCode)) {
Expand All @@ -61,7 +61,7 @@ public FormatInfo getFormatInfoForItem(AbstractGroupedWorkSolr groupedWork, Stri
if (translatedFormat != null) {
foundFormatFromCollection = true;
formatInfo.setFormatFromMap(translatedFormat, BaseIndexingSettings.FORMAT_TYPE_ITEM_COLLECTION);
if (groupedWork != null && groupedWork.isDebugEnabled()) {groupedWork.addDebugMessage("Format for item " + itemIdentifier + " is " + formatInfo.format + " based on translated collection", 2);}
if (groupedWork != null && groupedWork.isDebugEnabled()) {groupedWork.addDebugMessage("Format for item " + itemIdentifier + " is " + formatInfo.format + " based on translated collection of " + translatedCollection, 2);}
}
}
}
Expand All @@ -77,7 +77,7 @@ public FormatInfo getFormatInfoForItem(AbstractGroupedWorkSolr groupedWork, Stri
if (translatedFormat != null) {
foundFormatFromIType = true;
formatInfo.setFormatFromMap(translatedFormat, BaseIndexingSettings.FORMAT_TYPE_ITEM_TYPE);
if (groupedWork != null && groupedWork.isDebugEnabled()) {groupedWork.addDebugMessage("Format for item " + itemIdentifier + " is " + formatInfo.format + " based on item type", 2);}
if (groupedWork != null && groupedWork.isDebugEnabled()) {groupedWork.addDebugMessage("Format for item " + itemIdentifier + " is " + formatInfo.format + " based on item type of " + iType, 2);}
}
}
}
Expand All @@ -87,7 +87,7 @@ public FormatInfo getFormatInfoForItem(AbstractGroupedWorkSolr groupedWork, Stri
FormatMapValue translatedFormat = profile.getFormatMapValue(format, BaseIndexingSettings.FORMAT_TYPE_ITEM_FORMAT);
if (translatedFormat != null) {
formatInfo.setFormatFromMap(translatedFormat, BaseIndexingSettings.FORMAT_TYPE_ITEM_FORMAT);
if (groupedWork != null && groupedWork.isDebugEnabled()) {groupedWork.addDebugMessage("Format for item " + itemIdentifier + " is " + formatInfo.format + " based on item format field", 2);}
if (groupedWork != null && groupedWork.isDebugEnabled()) {groupedWork.addDebugMessage("Format for item " + itemIdentifier + " is " + formatInfo.format + " based on item format field of " + format, 2);}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,7 @@ public void filterPrintFormats(Set<String> printFormats) {
printFormats.remove("XBoxSeriesX");
}
if (printFormats.contains("Kinect") || printFormats.contains("XBox360") || printFormats.contains("Xbox360")
|| printFormats.contains("XboxOne") || printFormats.contains("XboxSeriesX") || printFormats.contains("PlayStation")
|| printFormats.contains("XboxOne") || printFormats.contains("XBoxSeriesX") || printFormats.contains("PlayStation")
|| printFormats.contains("PlayStation2") || printFormats.contains("PlayStation3")
|| printFormats.contains("PlayStation4") || printFormats.contains("PlayStation5") || printFormats.contains("PlayStationVita")
|| printFormats.contains("Wii") || printFormats.contains("WiiU")
Expand Down
Binary file modified code/sideload_processing/sideload_processing.jar
Binary file not shown.
Binary file modified code/sierra_export_api/sierra_export_api.jar
Binary file not shown.
Binary file modified code/symphony_export/symphony_export.jar
Binary file not shown.
Binary file modified code/user_list_indexer/user_list_indexer.jar
Binary file not shown.
7 changes: 6 additions & 1 deletion code/web/Drivers/AbstractIlsDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,12 @@ public function checkoutBySip(User $patron, $barcode, $currentLocationId) {
$message .= ' ' . $checkoutResponse['variable']['AF'][0];
}
$dueDate = explode(" ", $checkoutResponse['variable']['AH'][0]);
$dueDate = date_create($dueDate[0]);
if($this->accountProfile->ils == 'sierra') {
$dueDate = str_replace('-', '/', $dueDate[0]);
$dueDate = date_create($dueDate);
} else {
$dueDate = date_create($dueDate[0]);
}
$dueDate = date_format($dueDate, 'm/d/Y');
$item['due'] = $dueDate;
} else {
Expand Down
43 changes: 37 additions & 6 deletions code/web/Drivers/Koha.php
Original file line number Diff line number Diff line change
Expand Up @@ -4256,7 +4256,6 @@ function getSelfRegistrationFields($type = 'selfReg') {
if (!empty($extendedAttributes)) {
$borrowerAttributes = [];
foreach ($extendedAttributes as $attribute) {
$authorizedValues = [];
foreach ($attribute['authorized_values'] as $key => $value) {
$authorizedValues[$key] = $value;
}
Expand Down Expand Up @@ -4573,13 +4572,13 @@ function selfRegister(): array {
if (!empty($_REQUEST['borrower_email']) && $selfRegistrationEmailMustBeUnique == '1') {
if (!filter_var($_REQUEST['borrower_email'], FILTER_VALIDATE_EMAIL)) {
$result['success'] = false;
$result['message'] = 'This provided email is not valid, please provide a properly formatted email address.';
$result['message'] = translate(['text'=>'This provided email is not valid, please provide a properly formatted email address.', 'isPublicFacing'=>true]);
return $result;
} else {
$existingAccounts = $this->lookupAccountByEmail($_REQUEST['borrower_email']);
if ($existingAccounts['success']) {
$result['success'] = false;
$result['message'] = 'This email address already exists in our database. Please contact your library for account information or use a different email.';
$result['message'] = translate(['text'=>'This email address already exists in our database. Please contact your library for account information or use a different email.', 'isPublicFacing'=>true]);
return $result;
}
}
Expand Down Expand Up @@ -4714,7 +4713,7 @@ private function postSelfRegistrationToKoha($postVariables) : array {
$result['success'] = true;
$result['sendWelcomeMessage'] = false;
if ($verificationRequired != "0") {
$result['message'] = "Your account was registered, and a confirmation email will be sent to the email you provided. Your account will not be activated until you follow the link provided in the confirmation email.";
$result['message'] = translate(['text'=>"Your account was registered, and a confirmation email will be sent to the email you provided. Your account will not be activated until you follow the link provided in the confirmation email.",'isPublicFacing'=>true]);;
} else {
if ($autoBarcode == "1") {
$result['barcode'] = $jsonResponse->cardnumber;
Expand All @@ -4731,7 +4730,7 @@ private function postSelfRegistrationToKoha($postVariables) : array {
$result['sendWelcomeMessage'] = true;
}
} else {
$result['message'] = "Your account was registered, but a barcode was not provided, please contact your library for barcode and password to use when logging in.";
$result['message'] = translate(['text'=>"Your account was registered, but a barcode was not provided, please contact your library for barcode and password to use when logging in.",'isPublicFacing'=>true]);
}
}

Expand Down Expand Up @@ -6105,13 +6104,32 @@ public function getMessagingSettingsTemplate(User $patron): ?string {
$interface->assign('noticeLanguages', $noticeLanguages);
$interface->assign('preferredNoticeLanguage', $preferredNoticeLanguage);

//Check to see if there is a shoutbomb extended attribute
$extendedAttributesInfo = $this->setExtendedAttributes();
foreach ($extendedAttributesInfo as $item) {
if ($item['code'] == 'SHOUTBOMB') {
$interface->assign('shoutbombAttribute', $item);

if ($this->getKohaVersion() > 21.05) {
$extendedAttributes = $this->getUsersExtendedAttributesFromKoha($patron->unique_ils_id);
foreach ($extendedAttributes as $attribute) {
$objectProperty = 'borrower_attribute_' . $attribute['type'];
$patron->$objectProperty = $attribute['value'];
}
}
break;
}
}

$library = $patron->getHomeLibrary();
if ($library != null && $library->allowProfileUpdates) {
$interface->assign('canSave', true);
} else {
$interface->assign('canSave', false);
}

$interface->assign('profile', $patron);

return 'kohaMessagingSettings.tpl';
}

Expand Down Expand Up @@ -6139,7 +6157,7 @@ public function processMessagingSettingsForm(User $patron): array {
if ($key == 'SMSnumber') {
/** @noinspection RegExpRedundantEscape */
$getParams[] = urlencode($key) . '=' . urlencode(preg_replace('/[-&\\#,()$~%.:*?<>{}\sa-zA-Z]/', '', $value));
} elseif (str_starts_with($key, 'digest')) {
} elseif (strpos($key, 'digest') === 0) {
if(strlen($digestParams > 0)) {
$digestParams .= '&';
}
Expand All @@ -6162,6 +6180,16 @@ public function processMessagingSettingsForm(User $patron): array {

$result = $this->getKohaPage($updateMessageUrl);
if (strpos($result, 'Settings updated') !== false) {
//Check to see if we also need to update Shoutbomb settings
$extendedAttributesInfo = $this->setExtendedAttributes();
foreach ($extendedAttributesInfo as $item) {
if ($item['code'] == 'SHOUTBOMB') {
$oauthToken = $this->getOAuthToken();
$this->updateExtendedAttributesInKoha($patron->unique_ils_id, $extendedAttributesInfo, $oauthToken);
break;
}
}

$result = [
'success' => true,
'message' => 'Settings updated',
Expand Down Expand Up @@ -6724,6 +6752,9 @@ function setExtendedAttributes() {
while ($curRow2 = $authorizedValueCategoryRS->fetch_assoc()) {
$authorizedValueCategories[$curRow2['authorised_value']] = $curRow2['lib_opac'];
}
if (!empty($authorizedValueCategories) && !$curRow['mandatory']) {
$authorizedValueCategories = array_merge([''=> ''], $authorizedValueCategories);
}

$attribute = [
'code' => $curRow['code'],
Expand Down
5 changes: 5 additions & 0 deletions code/web/Drivers/OverDriveDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -1700,7 +1700,12 @@ function getOptions(User $patron) {
if ($formatClass == 'Periodicals') {
$formatClass = 'Magazines';
}

$options['lendingPeriods'][$formatClass]['options'] = $lendingPeriodField->options;

if($formatClass == 'Magazines') {
unset($options['lendingPeriods'][$formatClass]);
}
}
}
}
Expand Down
21 changes: 18 additions & 3 deletions code/web/Drivers/Sierra.php
Original file line number Diff line number Diff line change
Expand Up @@ -1467,6 +1467,18 @@ public function updatePatronInfo($patron, $canUpdateContactInfo, $fromMasquerade
$params['phones'][] = $tmpPhone;
}
}
if ($library->allowPatronWorkPhoneNumberUpdates) {
if (!array_key_exists('phones', $params)) {
$params['phones'] = [];
}
if (isset($_REQUEST['workPhone'])) {
$patron->_workPhone = $_REQUEST['workPhone'];
$tmpPhone = new stdClass();
$tmpPhone->type = 't';
$tmpPhone->number = $_REQUEST['workPhone'];
$params['phones'][] = $tmpPhone;
}
}
if ($library->allowPatronAddressUpdates) {
$params['addresses'] = [];
$address = new stdClass();
Expand Down Expand Up @@ -1676,9 +1688,12 @@ private function loadContactInformationFromApiResult(User $user, stdClass $patro
}
}
if (!empty($patronInfo->phones)) {
$primaryPhone = reset($patronInfo->phones);
if (!empty($primaryPhone)) {
$user->phone = $primaryPhone->number;
foreach ($patronInfo->phones as $phoneInfo) {
if ($phoneInfo->type == 'p') {
$user->phone = $phoneInfo->number;
}elseif ($phoneInfo->type == 't') {
$user->_workPhone = $phoneInfo->number;
}
}
}
if (!empty($patronInfo->emails)) {
Expand Down
1 change: 1 addition & 0 deletions code/web/RecordDrivers/MarcRecordDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -1630,6 +1630,7 @@ public function getMoreDetailsOptions() {
$interface->assign('links', $links);
$interface->assign('show856LinksAsTab', $library->getGroupedWorkDisplaySettings()->show856LinksAsTab);
$interface->assign('showItemDueDates', $library->getGroupedWorkDisplaySettings()->showItemDueDates);
$interface->assign('showItemNotes', $library->getGroupedWorkDisplaySettings()->showItemNotes);

if ($library->getGroupedWorkDisplaySettings()->show856LinksAsTab && count($links) > 0) {
$moreDetailsOptions['links'] = [
Expand Down
Loading

0 comments on commit a43640f

Please sign in to comment.