-
Notifications
You must be signed in to change notification settings - Fork 7
[UIREQ-1313] Display Anonymized Requesters #1330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[UIREQ-1313] Display Anonymized Requesters #1330
Conversation
0bee243 to
2f3a8bb
Compare
src/UserDetail.js
Outdated
| <div> | ||
| {userHighlightBox(<FormattedMessage id="ui-requests.requester.requester" />, name, id, barcode)} | ||
| <UserHighlightBox | ||
| title=<FormattedMessage id="ui-requests.requester.requester" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| title=<FormattedMessage id="ui-requests.requester.requester" /> | |
| title={<FormattedMessage id="ui-requests.requester.requester" />} |
src/UserDetail.js
Outdated
| {proxySection} | ||
| {isProxyFunctionalityAvailable(isEcsTlrSettingEnabled) && proxy?.id && | ||
| <UserHighlightBox | ||
| title=<FormattedMessage id="ui-requests.requester.proxy" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| title=<FormattedMessage id="ui-requests.requester.proxy" /> | |
| title={<FormattedMessage id="ui-requests.requester.proxy" />} |
src/UserDetail.test.js
Outdated
| screen, | ||
| cleanup, | ||
| } from '@folio/jest-config-stripes/testing-library/react'; | ||
| import { MemoryRouter } from 'react-router-dom'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please put react related imports above folio imports
src/UserForm.js
Outdated
| <div> | ||
| {userSection} | ||
| <UserHighlightBox | ||
| title=<FormattedMessage id="ui-requests.requester.requester" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| title=<FormattedMessage id="ui-requests.requester.requester" /> | |
| title={<FormattedMessage id="ui-requests.requester.requester" />} |
| BarcodeLink.propTypes = propTypes; | ||
| FullNameLink.propTypes = propTypes; | ||
|
|
||
| export { BarcodeLink, FullNameLink }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what rules are in ui-requests, but I would suggest splitting components into different files to have one component per file. It will make testing easier
a66e6a9 to
c149758
Compare
5c292ff to
88fc2dd
Compare
|
We was not able run Sonar for fork and we created pull #1336. |


Purpose
We're in the process of anonymizing requests, like how loans have been. Previously if user data was not returned for a request it was caused by something weird but now it indicates the request has been anonymized (probably).
Approach
There were many disparate places that were handling the display and logic around requesters. I consolidated all the ways to create a link to a user/barcode into a component as well as all the ways to display the requester/proxy. Once these were all consistent I changed the text/link behavior for when a user does not exist to Anonymized. I'm going to be updating the request list in another PR to better display anonymized requests which will now be a easier because of the consistency.
I'm not super happy with the amount of duplication with the React PropTypes but I'm not a React developer and don't know how this is usually deduplicated.
Refs
https://folio-org.atlassian.net/browse/UIREQ-1313
Corresponding Backend PR: folio-org/mod-circulation#1623
Screenshots
To test this I nulled out the requester in the database.
Pre-Merge Checklist
Before merging this PR, please go through the following list and take appropriate actions.
If there are breaking changes, please STOP and consider the following:
Ideally all of the PRs involved in breaking changes would be merged in the same day to avoid breaking the folio-testing environment. Communication is paramount if that is to be achieved, especially as the number of intermodule and inter-team dependencies increase.
While it's helpful for reviewers to help identify potential problems, ensuring that it's safe to merge is ultimately the responsibility of the PR assignee.