Skip to content

fix registered date bug - #1586

Open
bklaing2 wants to merge 1 commit into
masterfrom
registered-date-bug
Open

bklaing2 wants to merge 1 commit into
masterfrom
registered-date-bug

Conversation

@bklaing2

@bklaing2 bklaing2 commented Sep 2, 2026 •

Copy link
Copy Markdown
Member

Purpose

closes: datacite/datacite#2512

Approach

Open Questions and Pre-Merge TODOs

Learning

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)

Reviewer, please remember our guidelines:

  • Be humble in the language and feedback you give, ask don't tell.
  • Consider using positive language as opposed to neutral when offering feedback. This is to avoid the negative bias that can occur with neutral language appearing negative.
  • Offer suggestions on how to improve code e.g. simplification or expanding clarity.
  • Ensure you give reasons for the changes you are proposing.

@bklaing2
bklaing2 marked this pull request as ready for review September 2, 2026 13:50
@richardhallett
richardhallett requested a review from a team September 29, 2026 13:07
@jrhoads
jrhoads requested a balanced review from Copilot October 5, 2026 07:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The recursion guard permanently suppresses later URL synchronization on reused DOI instances.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Fixes DOI registration dates being indexed before persistence.

Changes:

  • Updates handle URLs before queuing DOI indexing.
  • Reloads DOI data before Elasticsearch indexing.
  • Adds regression coverage for registration ordering.
File Description
app/​models/​doi.rb Adds URL-update recursion guard.
app/​models/​concerns/​indexable.rb Updates URL before enqueueing indexing.
app/​jobs/​index_job_doi_registration.rb Reloads DOI before indexing.
spec/​concerns/​indexable_spec.rb Tests registration ordering.
spec/​jobs/​index_job_doi_registration_spec.rb Tests fresh registration data indexing.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread app/models/doi.rb
Comment on lines +2132 to +2134
return if @updating_url

@updating_url = true
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.

Some DOI records may not have indexed registered dates in OpenSearch after registration

2 participants