Skip to content

Commit

Permalink
Merge pull request Aspen-Discovery#955 from Aspen-Discovery/24.10.00
Browse files Browse the repository at this point in the history
[pull] 24.10.00 from Aspen-Discovery:24.10.00
  • Loading branch information
catsoup11789 authored Sep 25, 2024
2 parents b1e20b9 + f17a756 commit bb6e804
Show file tree
Hide file tree
Showing 13 changed files with 221 additions and 100 deletions.
36 changes: 30 additions & 6 deletions code/aspen_app/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8499,6 +8499,11 @@ encodeurl@~1.0.2:
resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==

encodeurl@~2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-2.0.0.tgz#7b8ea898077d7e409d3ac45474ea38eaf0857a58"
integrity sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==

end-of-stream@^1.1.0:
version "1.4.4"
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0"
Expand Down Expand Up @@ -13498,7 +13503,26 @@ semver@^7.6.0:
resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13"
integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==

[email protected], send@^0.18.0:
[email protected]:
version "0.19.0"
resolved "https://registry.yarnpkg.com/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8"
integrity sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==
dependencies:
debug "2.6.9"
depd "2.0.0"
destroy "1.2.0"
encodeurl "~1.0.2"
escape-html "~1.0.3"
etag "~1.8.1"
fresh "0.5.2"
http-errors "2.0.0"
mime "1.6.0"
ms "2.1.3"
on-finished "2.4.1"
range-parser "~1.2.1"
statuses "2.0.1"

send@^0.18.0:
version "0.18.0"
resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be"
integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==
Expand Down Expand Up @@ -13530,14 +13554,14 @@ serialize-javascript@^6.0.1:
randombytes "^2.1.0"

serve-static@^1.13.1:
version "1.15.0"
resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540"
integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==
version "1.16.2"
resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.2.tgz#b6a5343da47f6bdd2673848bf45754941e803296"
integrity sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==
dependencies:
encodeurl "~1.0.2"
encodeurl "~2.0.0"
escape-html "~1.0.3"
parseurl "~1.3.3"
send "0.18.0"
send "0.19.0"

set-blocking@^2.0.0:
version "2.0.0"
Expand Down
Binary file modified code/oai_indexer/oai_indexer.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 @@ -639,14 +639,14 @@ public synchronized void deleteRecord(String permanentId, Long groupedWorkId) {
*/

//Delete all grouped_work items, records, and variations, but leave the grouped work
removeItemsForWorkStmt.setLong(1, groupedWorkId);
/* removeItemsForWorkStmt.setLong(1, groupedWorkId);
removeItemsForWorkStmt.executeUpdate();
removeVariationsForWorkStmt.setLong(1, groupedWorkId);
removeVariationsForWorkStmt.executeUpdate();
removeRecordsForWorkStmt.setLong(1, groupedWorkId);
removeRecordsForWorkStmt.executeUpdate();
removeRecordsForWorkStmt.executeUpdate();*/

}catch (SolrServerException sse) {
logEntry.incErrors("Solr Exception deleting work from index, quitting to be safe", sse);
Expand Down
2 changes: 1 addition & 1 deletion code/web/Drivers/Sierra.php
Original file line number Diff line number Diff line change
Expand Up @@ -2461,7 +2461,7 @@ public function checkoutByAPI(User $patron, $barcode, Location $currentLocation)
$params['username'] = $currentLocation->circulationUsername;
}
if (!empty($currentLocation->statGroup) && $currentLocation->statGroup != -1) {
$params['statgroup'] = $currentLocation->statGroup;
$params['statgroup'] = (int)$currentLocation->statGroup;
}

$checkoutResult = $this->_postPage('sierra.checkout', $sierraUrl, json_encode($params));
Expand Down
209 changes: 163 additions & 46 deletions code/web/openapi/aspen_openapi.json
Original file line number Diff line number Diff line change
@@ -1,85 +1,202 @@
{
"swagger" : "2.0",
"openapi" : "3.1.0",
"info" : {
"title": "Aspen Discovery API",
"description": "The API provided by Aspen Discovery for use in other applications, mobile apps, etc",
"version": "1.0.0"
"version": "1.0.0",
"license": {
"name": "GPL v2",
"url": "https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt"
},
"description": "The API provided by Aspen Discovery for use in other applications, mobile apps, etc"
},
"basePath": "/API",
"servers": [
{
"url": "https://{aspenDomain}/{basePath}",
"variables": {
"aspenDomain": {
"default": "example.aspendiscovery.org",
"description": "The URL of the Aspen instance"
},
"basePath": {
"default": "API"
}
}
}
],
"tags": [
{
"name": "AbstractAPI"
},
{
"name": "AnodeAPI"
},
{
"name": "CommunityAPI"
},
{
"name": "EventAPI"
},
{
"name": "FineAPI"
},
{
"name": "GreenhouseAPI"
},
{
"name": "ItemAPI"
},
{
"name": "ListAPI"
},
{
"name": "RegistrationAPI"
},
{
"name": "SearchAPI"
},
{
"name": "SystemAPI"
},
{
"name": "UserAPI"
},
{
"name": "WorkAPI"
}
],
"paths": {
"/API/UserAPI?method=isLoggedIn": {
"/UserAPI?method=isLoggedIn": {
"get": {
"description": "Determines if a user is logged in or out in the active browser. Typically not useful since the calling application will not be on the same browser as the patron.",
"produces": [
"application/json"
],
"tags": ["UserAPI"],
"summary": "Login status",
"description": "Determines if a user is logged in based on session information in the active browser. Typically not useful because the calling application will not be using the same browser as the patron.",
"responses" : {
"200" : {
"description": "successful response",
"schema": {
"$ref": "#/definitions/BasicResult"
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BasicResult"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
}
}
}
},
"/API/UserAPI?method=login": {
"/UserAPI?method=login": {
"post" : {
"description": "Logs in the user and sets a cookie indicating that the user is logged in. Also returns the session_id for the new session. Must be called by POSTing data to the API. In general, this method is only useful when called from Aspen itself or from files which can share cookies with the Aspen server.",
"tags": ["UserAPI"],
"summary": "Login user",
"description": "Logs in the user, sets a cookie indicating that the user is logged in, and returns the session_id for the new session. In general, this method is only useful when called from Aspen itself or from files that share cookies with the Aspen server.",
"parameters": [
{
"in" : "query",
"name": "username",
"type": "string",
"description": "The username or barcode for the patron"
"schema": {
"type": "string"
},
"description": "The username or barcode for the patron",
"example": "23025003575917"
},
{
"in" : "query",
"name": "password",
"type": "string",
"description": "The password or pin for the patron"
"schema": {
"type": "string"
},
"description": "The password or pin for the patron",
"example": "7604"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful response",
"schema": {
"$ref": "#/definitions/LoginResult"
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoginResult"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
}
}
}
}
},
"definitions": {
"BasicResult": {
"type": "object",
"properties": {
"result" : {
"type": "boolean"
}
}
},
"LoginResult": {
"type": "object",
"properties": {
"result" : {
"components": {
"responses": {
"BadRequest": {
"description": "Bad Request - Invalid method or parameters",
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Whether the login was successful or not"
},
"message": {
"error": {
"type": "string",
"description": "Additional information about why the login passed or failed for display to the end user"
},
"name": {
"example": "invalid_method"
}
}
},
"Unauthorized": {
"description": "Unauthorized - Request requires authentication",
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "The first and last name of the user if login was successful"
"example": "unauthorized_access"
}
}
},
"NotFound": {
"description": "The specified resource was not found.",
"type": "object",
"properties": {
"error": {
"type": "string"
}
}
}
},
"schemas": {
"BasicResult": {
"type": "object",
"properties": {
"result" : {
"type": "boolean"
}
}
},
"LoginResult": {
"type": "object",
"properties": {
"result" : {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Whether the user login was successful or not",
"example": "true"
},
"message": {
"type": "string",
"description": "Additional information about why the login passed or failed for display to the end user"
},
"name": {
"type": "string",
"nullable": "true",
"description": "The first and last name of the user if login was successful"
}
}
}
}
Expand Down
1 change: 0 additions & 1 deletion code/web/release_notes/24.09.00.MD
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@
- Remove 'required' flag for Order Record Status to treat as Under Consideration in Indexing Profiles (*KL*)
- Remove false error message "Payment amount did not match..." for NCR payments (*KL*)
- Account for patron types being '0' when doing boolean check to get the patron type object (*KL*)
- Fixed an issue where location-related search facets would disappear by amending the 'Show This Branch In Available At and Owning Location Facets' filter so that it can be applied to any scope. (*CZ*)
- Fixed an issue where attempting to save user preferences would result in an error being displayed on the OPAC and cause the save to fail (*CZ*)
- 'Your Preferences' settings only show ILS-related options to users associated with ILS (*CZ*)
- In the 'Administration Options' sidebar, automatically place the cursor at the start of the search bar when the 'Search' option is clicked (*CZ*)
Expand Down
13 changes: 13 additions & 0 deletions code/web/release_notes/24.09.01.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Aspen Discovery Updates
### Sierra Updates
- Explicitly cast statgroup to an integer when sending that information to the Sierra APIs for check-outs. (*MDN*)

### Other updates
- Disabled the 'Show This Branch In Available At and Owning Location Facets' filter and setting as it is interacting poorly with facet labels. (*CZ*)

## This release includes code contributions from
- Grove For Libraries
- Mark Noble (MDN)

- PTFS-Europe
- Chloe Zermatten (CZ)
5 changes: 4 additions & 1 deletion code/web/release_notes/24.10.00.MD
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

### API Documentation
- Add Swagger documentation for login method within UserAPI. (*MDN*)
- Migrate Swagger 2.0 documentation to OpenAPI v3.1.0 (*MAF*)

### Polaris Updates
- After a hold is placed, trigger an update of the related record from Polaris so hold copy counts will update. (*MDN*)
Expand Down Expand Up @@ -82,4 +83,6 @@
- Lucas Montoya (LM)
- Tomas Cohen Arazi (TC)

## This release includes sponsored developments from
- Myranda Fuentes (MAF)

## This release includes sponsored developments from
8 changes: 7 additions & 1 deletion code/web/sys/DBMaintenance/version_updates/24.09.00.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,13 @@ function getUpdates24_09_00(): array {
'continueOnError' => false,
'sql' => ["ALTER TABLE user_list_entry MODIFY COLUMN sourceId VARCHAR(255)"]

], //
], // sourceId_allow_255_char
'remove_showInSearchFacet' => [
'title' => 'Remove showInSearchFacet',
'description' => 'Remove the showInSearchFacet column from the Location table as part of the removal of the feature to hide branches from search facets',
'continueOnError' => false,
'sql' => ["ALTER TABLE location DROP COLUMN showInSearchFacet"]
], // remove_showInSearchFacet

//pedro - PTFS-Europe

Expand Down
Loading

0 comments on commit bb6e804

Please sign in to comment.