Skip to content

Conversation

@thostetler
Copy link
Member

@thostetler thostetler commented Oct 27, 2025

Problem

The DOI was disappearing on abstract pages during hydration because the fetchAffiliations method was using a hardcoded field list (fl) that only included author/affiliation fields but excluded DOI fields.

Solution

  • Replace hardcoded field list with this.defaultQueryArguments.fl to ensure all necessary fields (including DOI) are preserved
  • Simplify merge logic to use the full freshDoc instead of manually selecting specific fields
  • Add comprehensive test case to verify DOI preservation during hydration

Fixes SCIX-670

- Use this.defaultQueryArguments.fl instead of hardcoded field list
- Preserve all document fields during hydration merge
- Add test case to verify DOI preservation

Fixes SCIX-670
@thostetler thostetler force-pushed the SCIX-670-bbb-doi-is-disappearing-after-loading-an-abstract branch from 41e338f to 1ac5433 Compare October 27, 2025 15:11
@thostetler thostetler marked this pull request as ready for review October 27, 2025 15:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug where the DOI field was being lost during the fetchAffiliations hydration process on abstract pages. The root cause was a hardcoded field list that excluded DOI fields when fetching updated affiliation data.

Key Changes:

  • Replaced hardcoded field list with this.defaultQueryArguments.fl to include all necessary fields
  • Simplified the merge logic to use the complete API response instead of cherry-picking fields
  • Added a comprehensive test case to verify DOI preservation during hydration

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/js/widgets/abstract/widget.js Updated fetchAffiliations to use full default field list and complete document in merge logic
test/mocha/js/widgets/abstract_widget.spec.js Added test case verifying DOI preservation during affiliation fetching

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@thostetler thostetler merged commit 2c7ac22 into adsabs:master Oct 30, 2025
1 check passed
@thostetler thostetler deleted the SCIX-670-bbb-doi-is-disappearing-after-loading-an-abstract branch October 30, 2025 00:59
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