Skip to content

Conversation

@mikejritter
Copy link
Contributor

What does this do?

  • Adds blobAltText to the advanced search

Why are we doing this? (with JIRA link)
Jira: https://collectionspace.atlassian.net/browse/DRYD-1982

This is required for the new views in order to have alt text on thumbnails.

How should this be tested? Do these changes have associated tests?

  • Rebuild collectionspace
  • Create an Object record
  • Create a related Media record with some alt text
  • Query the Advanced Search API and see that the alt text is returned, e.g.
[cspace] $ curl -u admin@core.collectionspace.org:Administrator 'http://localhost:8180/cspace-services/advancedsearch' -H 'Accept: application/json' | jq .
{
  "ns3:advancedsearch-common-list": {
    "@xmlns:ns2": "http://collectionspace.org/services/jaxb",
    "@xmlns:ns3": "http://collectionspace.org/services/advancedsearch",
    "pageNum": "0",
    "pageSize": "40",
    "itemsInPage": "1",
    "totalItems": "1",
    "fieldsReturned": "uri|csid|refName|blobCsid|updatedAt|objectId|objectNumber|objectName|title|computedCurrentLocation|responsibleDepartments|responsibleDepartment|contentConcepts|briefDescription",
    "advancedsearch-list-item": {
      "uri": "/collectionobjects/debab656-0585-4a91-913b",
      "csid": "debab656-0585-4a91-913b",
      "refName": "urn:cspace:core.collectionspace.org:collectionobjects:id(debab656-0585-4a91-913b)'2025.1.2'",
      "blobCsid": "f47f39ae-7a7b-4d84-b412",
      "blobAltText": "alt text",
      "updatedAt": "2025-12-02T00:10:47.887Z",
      "objectNumber": "2025.1.2",
      "briefDescription": null,
      "fieldCollectionDate": null,
      "objectProductionDate": null
    }
  }
}

Dependencies for merging? Releasing to production?
Requires collectionspace/application#327 in order to get the alt text from the Media Resource.

Has the application documentation been updated for these changes?
No. I need to update the response in the Advanced Search docs.

Did someone actually run this code to verify it works?
@mikejritter tested locally

@mikejritter mikejritter requested a review from spirosdi December 9, 2025 21:35
@mikejritter mikejritter changed the base branch from main to develop December 9, 2025 21:36
Copy link

@spirosdi spirosdi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the blobCsid or the blobAltText is not set, the fields are omitted entirely in the response. This is inconsistent with other fields, that are still included in the response with null values. I think it is better to still include the fields for better predictability, consistency and easier client side parsing.

@spirosdi spirosdi self-requested a review December 11, 2025 09:19
@mikejritter mikejritter merged commit 4de539b into collectionspace:develop Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants