Skip to content

Conversation

jimchamp
Copy link
Collaborator

@jimchamp jimchamp commented Sep 19, 2025

Follows #10899

Background Information

Our /admin/pd stats tell us that ~10 patrons have had their special access requests fulfilled (meaning their rpd preference has a value of 2). However, there are over 1,000 patrons who have an rpd: 2, but no pda authority in the store.

Why is this happening?

Whenever any patron logs in, we check the xauthn response to see if they have special access. If they do, we update their rpd status to fulfilled. This is done even if the patron did not request special access via Open Library. Such patrons can be identified by having a fulfilled rpd value, but no pda value in their preferences (this stores the patron's chosen print disability qualifying authority).

How does this branch help?

This branch will prevent an rpd value from being saved to a patron's preference object if they do not already have a pda value.

Technical

Testing

Screenshot

Stakeholders

@Copilot Copilot AI review requested due to automatic review settings September 19, 2025 00:05
Copy link
Contributor

@Copilot 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 prevents updating the rpd (print disability request) status to "fulfilled" for patrons who didn't request special access through Open Library, addressing a data inconsistency where over 1,000 patrons had fulfilled status without having made a request.

  • Adds a condition to check for the presence of pda (print disability authority) before updating rpd status
  • Ensures only patrons who actually requested access via Open Library get their status updated to fulfilled

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@mekarpeles mekarpeles self-assigned this Sep 22, 2025
@mekarpeles mekarpeles merged commit 9e8012a into master Sep 24, 2025
8 checks passed
@jimchamp jimchamp deleted the avoid-overcounting-special-access-fulfillments branch October 9, 2025 17:03
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