Skip to content
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

UIU-2936: add user type for user info section #2551

Merged
merged 4 commits into from
Sep 12, 2023
Merged

UIU-2936: add user type for user info section #2551

merged 4 commits into from
Sep 12, 2023

Conversation

alisher-epam
Copy link
Contributor

Purpose

UIU-2936 - add user type for User info section

Approach

TODOS and Open Questions

Learning

Pre-Merge Checklist

Before merging this PR, please go through the following list and take appropriate actions.

  • I've added appropriate record to the CHANGELOG.md
  • Does this PR meet or exceed the expected quality standards?
    • Code coverage on new code is 80% or greater
    • Duplications on new code is 3% or less
    • There are no major code smells or security issues
  • Does this introduce breaking changes?
    • If any API-related changes - okapi interfaces and permissions are reviewed/changed correspondingly
    • There are no breaking changes in this PR.

If there are breaking changes, please STOP and consider the following:

  • What other modules will these changes impact?
  • Do JIRAs exist to update the impacted modules?
    • If not, please create them
    • Do they contain the appropriate level of detail? Which endpoints/schemas changed, etc.
    • Do they have all they appropriate links to blocked/related issues?
  • Are the JIRAs under active development?
    • If not, contact the project's PO and make sure they're aware of the urgency.
  • Do PRs exist for these changes?
    • If so, have they been approved?

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.

@alisher-epam alisher-epam requested review from a team and Terala-Priyanka September 6, 2023 05:52
Copy link
Member

@zburke zburke left a comment

Choose a reason for hiding this comment

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

I raised this issue already in #2546 but it was ignored there: All the supporting documentation refers to this property as "user type" and yet the variable is consistently named type. The code and the documentation must be consistent so either the code or the documentation must be changed. This will be easier now while the problem is still relatively small.

This may seem petty, but in a large system like FOLIO this kind of low-level friction becomes a real problem because it becomes impossible to predict what anything will be named. type? usertype? userType?

I will approve this PR when all code, translations, and documentation are consistent.

@alisher-epam
Copy link
Contributor Author

@zburke I totally agree with you. I would use userType since it is descriptive rather than type. Only place type is required for the backend request. Does it make sense if I use an alias like so const USER_TYPE = 'type'?

@zburke
Copy link
Member

zburke commented Sep 6, 2023

@alisher-epam , IMNSHO, the backend folks should just fix their data structure. Short of that, I don't know what the cleanest/simplest option is. Maybe it's aliases as you suggest, or maybe it's just sucking it up and ignoring that all our labels will be User type and all our variables will be type.

I'll try to figure out a more useful venue to air my complaints. It's not your fault that you were given this conflicted API.

@alisher-epam alisher-epam requested review from zburke and a team September 7, 2023 11:46
@alisher-epam alisher-epam requested review from a team and mariia-aloshyna September 8, 2023 07:54
@alisher-epam alisher-epam removed the request for review from a team September 11, 2023 15:37
@NikitaSedyx
Copy link
Contributor

@zburke just to confirm, does it mean that you don't block this PR even with type field usage? I agree that it's not the best name, but our team is not responsible for users modules (both BE and FE) and we can't easily replace it or in future - as an alternative we can create a ticket and volaris can decide how to proceed with it

@zburke
Copy link
Member

zburke commented Sep 11, 2023

@NikitaSedyx , correct, I am not blocking it. IMO this property should be called userType everywhere and this is a wart in the backend module. If it were up to me, I'd file a ticket for the backend module, wait for them to fix their bug, and then merge this PR. But I recognize that I'm not the PO and not the backend developer here.

@sonarcloud
Copy link

sonarcloud bot commented Sep 12, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@alisher-epam alisher-epam merged commit 7e2d9d8 into master Sep 12, 2023
4 checks passed
@alisher-epam alisher-epam deleted the UIU-2936 branch September 12, 2023 08:19
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.

4 participants