Skip to content

Conversation

@JPrevost
Copy link
Member

@JPrevost JPrevost commented Oct 18, 2022

Why are these changes being introduced:

  • Some records don't have publication date information (which is expected)

Relevant ticket(s):

How does this address that need:

  • Adds nil protection for publication dates

Document any side effects to this change:

  • After handling the publication date nil, an error occurred for identifier not being present. I believe this is unexpected and is a result of incomplete Alma mappings in dev1 at this time. Handling nils for identifers seemed fine to include even if the data will likely all include at least one identifier per record.

Sample record to verify the change:
https://timdex-ui-pi-timx-108-p-nalqak.herokuapp.com/record/alma:9935254843506761

If you'd like to see the change locally, make sure you are connected to dev1 graphql and are using the all-current alias as your TIMDEX_INDEX and then searching for any alma record should work. Doing the same on the main branch should throw errors.

Developer

  • All new ENV is documented in README
  • All new ENV has been added to Heroku Pipeline, Staging and Prod
  • ANDI or Wave has been run in accordance to
    our guide and
    all issues introduced by these changes have been resolved or opened as new
    issues (link to those issues in the Pull Request details above)
  • Stakeholder approval has been confirmed (or is not needed)

Code Reviewer

  • The commit message is clear and follows our guidelines
    (not just this pull request message)
  • There are appropriate tests covering any new functionality
  • The documentation has been updated or is unnecessary
  • The changes have been verified
  • New dependencies are appropriate or there were no changes

Requires database migrations?

NO

Includes new or updated dependencies?

NO

Why are these changes being introduced:

* Some records don't have publication date information (which is
  expected)

Relevant ticket(s):

* https://mitlibraries.atlassian.net/browse/TIMX-108

How does this address that need:

* Adds nil protection for publication dates

Document any side effects to this change:

* After handling the publication date nil, an error occurred for
  identifier not being present. I believe this is unexpected and is a
  result of incomplete Alma mappings in dev1 at this time. Handling nils
  for identifers seemed fine to include even if the data will likely
  all include at least one identifier per record.
@mitlib mitlib temporarily deployed to timdex-ui-pi-timx-108-p-nalqak October 18, 2022 13:47 Inactive
@coveralls
Copy link

Pull Request Test Coverage Report for Build 05d3c849dd60ca0725eb8cdf7866935962c1dd6d-PR-79

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 99.427%

Totals Coverage Status
Change from base Build 3e87c8764366bc746a73036552e6d1507f24d432: 0.0%
Covered Lines: 347
Relevant Lines: 349

💛 - Coveralls

@hakbailey
Copy link

This looks good from my perspective (I didn't review the code, just verified it works as I would expect). I agree handling nil identifiers is also a good idea since, although we do expect each records to have at least one, they are not technically required.

@jazairi jazairi self-assigned this Oct 20, 2022
Copy link
Contributor

@jazairi jazairi left a comment

Choose a reason for hiding this comment

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

Every time something like this comes up, I wonder where else we're missing safe navigation operators...

Thanks for fixing this! :shipit:

@JPrevost JPrevost merged commit bee45c2 into main Oct 20, 2022
@JPrevost JPrevost deleted the timx-108-pub-data branch October 20, 2022 14:47
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.

6 participants