Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ANW-1635: display linked record title/display strings when downloadin… #2977

Merged
merged 5 commits into from
Nov 8, 2023

Conversation

avatar382
Copy link
Collaborator

@avatar382 avatar382 commented Apr 6, 2023

…g CSV

Description

display linked record title/display strings when downloading CSV files

Related JIRA Ticket or GitHub Issue

https://archivesspace.atlassian.net/browse/ANW-1635

How Has This Been Tested?

Manual and unit testing

Screenshots (if appropriate):

Screenshot_2023-04-13_09-09-39
Screenshot_2023-04-13_09-09-48

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have read the CONTRIBUTING document.
  • I have authority to submit this code.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@avatar382 avatar382 marked this pull request as draft April 6, 2023 16:33
@avatar382 avatar382 marked this pull request as ready for review April 13, 2023 16:27
@quoideneuf
Copy link
Collaborator

quoideneuf commented Jun 1, 2023

I am not sure whether to merge this or to address the more general problem of CSV downloads of search results. This seems to be part of a larger issue which arises from the CSV downloads being obtained directly from Solr using the csv writer type. While it is convenient to let Solr do the transformation to CSV, it breaks at least two pieces of functionality: 1) the backend's SearchResolver, which converts references into configurable representations of objects (like a title or display string), and 2) I18n translations. So there is a recurring problem of references or complex fields not appearing in CSV tables, and of enumerations remaining untranslated. Until now, people have solved this problem by adding stored fields to the Solr schema to try to match the data as it looks in the HTML results table. Aside from being messy, it doesn't always result in a perfect match. Furthermore, requests to the backend /search endpoint that include the dt=csv and a resolve[]= param will raise errors, because the Search.search method tries to run the csv formatted data through the SearchResolver.

So maybe it is worth looking into a new approach that will wrap json-formatted Solr results as CSV in the backend, after the data have been resolved, translated, etc.

See also:

https://archivesspace.atlassian.net/browse/ANW-1190
https://archivesspace.atlassian.net/browse/ANW-1365
https://archivesspace.atlassian.net/browse/ANW-695

And note that the new representative_file_version field shows up as a blank field in CSV results as well.

@brianzelip brianzelip self-assigned this Nov 3, 2023
Copy link
Collaborator

@brianzelip brianzelip left a comment

Choose a reason for hiding this comment

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

After you change the migration file name to start w/ '175', I'll nurse the tests until passing and merge.

@avatar382
Copy link
Collaborator Author

After you change the migration file name to start w/ '175', I'll nurse the tests until passing and merge.

Got the migration renumbered, and rebased against the current master.

Copy link
Collaborator

@brianzelip brianzelip left a comment

Choose a reason for hiding this comment

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

Thanks! We decided to punt on the issue mentioned in the comments in order to merge the work provided here.

@brianzelip brianzelip merged commit cd86e80 into master Nov 8, 2023
14 checks passed
@brianzelip brianzelip deleted the ANW-1635 branch November 8, 2023 13:55
@cdibella cdibella added this to the 3.5.0 milestone Feb 7, 2024
thimios pushed a commit that referenced this pull request Apr 4, 2024
Adds migration to reindex events to populate linked_record_title field
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.

None yet

4 participants