Skip to content

Update author link structure for NDE - #450

Merged
jazairi merged 2 commits into
mainfrom
use-681
Aug 10, 2026
Merged

Update author link structure for NDE#450
jazairi merged 2 commits into
mainfrom
use-681

Conversation

@jazairi

@jazairi jazairi commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Why these changes are being introduced:

Primo NDE has made multiple changes to how
advanced search links are structured. This has
caused our author search links to fail.

Relevant ticket(s):

How this addresses that need:

This restructures the author links to match
Primo NDE links.

Side effects of this change:

Depending on how the author name is structured,
relevant results might be omitted from the query.
For example, "Weigel, Moira 1984- author."
returns only one result in NDE, whereas
"Weigel, Moira" returns many more (all of which
seem relevant).

We will open a ticket to determine whether it's
worth trying to modify author link search terms
for broader results.

Developer

Accessibility
  • ANDI or WAVE has been run in accordance to our guide.
  • This PR contains no changes to the view layer.
  • New issues flagged by ANDI or WAVE have been resolved.
  • New issues flagged by ANDI or WAVE have been ticketed (link in the Pull Request details above).
  • [] No new accessibility issues have been flagged.
New ENV
  • All new ENV is documented in README.
  • All new ENV has been added to Heroku Pipeline, Staging and Prod.
  • ENV has not changed.
Approval beyond code review
  • UXWS/stakeholder approval has been confirmed.
  • UXWS/stakeholder review will be completed retroactively.
  • UXWS/stakeholder review is not needed.
Additional context needed to review

E.g., if the PR includes updated dependencies and/or data
migration, or how to confirm the feature is working.

Code Reviewer

Code
  • I have confirmed that the code works as intended.
  • Any CodeClimate issues have been fixed or confirmed as
    added technical debt.
Documentation
  • The commit message is clear and follows our guidelines
    (not just this pull request message).
  • The documentation has been updated or is unnecessary.
  • New dependencies are appropriate or there were no changes.
Testing
  • There are appropriate tests covering any new functionality.
  • No additional test coverage is required.

@qltysh

qltysh Bot commented Aug 10, 2026

Copy link
Copy Markdown

❌ 3 blocking issues (3 total)

Tool Category Rule Count
rubocop Lint Class has too many lines. [251/100] 1
rubocop Lint Method has too many lines. [11/10] 1
rubocop Style Line is too long. [146/120] 1

Comment thread app/models/normalize_primo_record.rb Outdated
Comment thread app/models/normalize_primo_record.rb Outdated
Comment thread app/models/normalize_primo_record.rb Outdated
Comment thread app/models/normalize_primo_record.rb Outdated
Comment thread app/models/normalize_primo_record.rb Outdated
Comment thread app/models/normalize_primo_record.rb Outdated
Comment thread app/models/normalize_primo_record.rb Outdated
Comment thread app/models/normalize_primo_record.rb Outdated
Comment thread app/models/normalize_primo_record.rb Outdated
creator_link = normalized[:creators].first[:link]
assert_match 'discovery/search?query=creator,exact,', creator_link
assert_match 'Smith%2C%20John%20A.', creator_link
assert_match 'nde/search?vid=01MIT_INST:NDE&search_scope=all&mode=advanced&tab=all&query=creator,exact,Smith%2C%20John%20A.&offset=0&lang=en',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Line is too long. [146/120] [rubocop:Layout/LineLength]

@coveralls

coveralls commented Aug 10, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 31437235838

Coverage decreased (-0.002%) to 98.324%

Details

  • Coverage decreased (-0.002%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 1551
Covered Lines: 1525
Line Coverage: 98.32%
Coverage Strength: 85.97 hits per line

💛 - Coveralls

@mitlib
mitlib temporarily deployed to timdex-ui-pi-use-681-cmnorxkyp August 10, 2026 21:58 Inactive
@jazairi
jazairi temporarily deployed to timdex-ui-pi-use-681-cmnorxkyp August 10, 2026 22:00 Inactive

@matt-bernhardt matt-bernhardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm approving this, but I do wonder about whether a hard-coded tab value is going to be what we want long term (or maybe we already talked about this and all is the only value we want to support for NDE)

Comment thread app/models/normalize_primo_record.rb Outdated
ENV.fetch('PRIMO_NDE_VID'),
'&search_scope=all',
'&mode=advanced',
'&tab=all',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is the only thing that gives me pause, because we're moving from reading PRIMO_TAB to a hard-coded all

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good call. I'll revert that before merging.

Why these changes are being introduced:

Primo NDE has made multiple changes to how
advanced search links are structured. This has
caused our author search links to fail.

Relevant ticket(s):

- [USE-681](https://mitlibraries.atlassian.net/browse/USE-681)

How this addresses that need:

This restructures the author links to match
Primo NDE links.

Side effects of this change:

Depending on how the author name is structured,
relevant results might be omitted from the query.
For example, "Weigel, Moira 1984- author."
returns only one result in NDE, whereas
"Weigel, Moira" returns many more (all of which
seem relevant).

We will open a ticket to determine whether it's
worth trying to modify author link search terms
for broader results.
@jazairi
jazairi temporarily deployed to timdex-ui-pi-use-681-cmnorxkyp August 10, 2026 22:07 Inactive
Revert to reading tab value from env
@jazairi
jazairi temporarily deployed to timdex-ui-pi-use-681-cmnorxkyp August 10, 2026 22:11 Inactive
'&query=creator,exact,',
URI.encode_uri_component(author),
'&offset=0',
'&lang=en'].join

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Method has too many lines. [11/10] [rubocop:Metrics/MethodLength]

@jazairi
jazairi merged commit 8657420 into main Aug 10, 2026
7 checks passed
@jazairi
jazairi deleted the use-681 branch August 10, 2026 22:32
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.

4 participants