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

UIREC-279: Use number generator for barcode call number and accession number #633

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

elsenhans
Copy link

@elsenhans elsenhans commented Feb 24, 2025

UIREC-279

Purpose

This PR is based on the former PR from @EthanFreestone
https://github.com/folio-org/ui-receiving/pull/506/files#diff-fbeee69d56db2e9075b8c4032f3ab5656a02f3848ad42123d79d7a156f7736d2

  • use the number generator for the fields "barcode", "call number" and "accession number"
  • its one button "Generate numbers" for the three fields
  • the number generator is added to the "Receive" list and "Add/edit piece" modal
  • the configuration for the number generator is defined in ui-orders settings:
    UIOR-1383: Settings for number generator ui-orders#1696
  • depending on the configuration, the same number for "call number" and "accession number" is used.
  • depending on the configuration, every field can filled by:
    1. only using the number generator,
    2. using number generator or edit the field manually or
    3. the number generator is off.
  • For testing this PR in the front end, its necessary to:
    1. add the Number generator settings in ui-orders:
    settings - orders - General: Number generator options
    At least one number has to be "On, field editable" or "On, field not editable"
    2. Create a order to receive:
    • orders - new - Select Template like "Amazon book orders (Amazon-B)" - Save & close
    • Details - Action - Add PO line - enter a Title and Physical unit price - Save & Close
    • Details - Actions - Open - Submit
    • Details - Actions - Receive

Approach

Screenshots

1
2
3
4

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.

Copy link

github-actions bot commented Feb 24, 2025

Jest Unit Test Results

305 tests  +23   303 ✅ +23   3m 11s ⏱️ +11s
 97 suites + 5     2 💤 ± 0 
  1 files   ± 0     0 ❌ ± 0 

Results for commit a3782f8. ± Comparison against base commit 292d263.

This pull request removes 1 and adds 24 tests. Note that renamed tests count towards both.
PieceFormContainer should handle "Send claim" action with claiming integration ‑ PieceFormContainer should handle "Send claim" action with claiming integration
Render ItemFields with all number generator settings "off" should disable the generateNumbers button ‑ Render ItemFields with all number generator settings "off" should disable the generateNumbers button
Render ItemFields with all number generator settings "off" should render all input fields ‑ Render ItemFields with all number generator settings "off" should render all input fields
Render ItemFields with number generator settings "on" should disable all fields if disabled prop is true ‑ Render ItemFields with number generator settings "on" should disable all fields if disabled prop is true
Render ItemFields with number generator settings "on" should enabled the fields with number generator setting "onNotEditable" ‑ Render ItemFields with number generator settings "on" should enabled the fields with number generator setting "onNotEditable"
Render ItemFields with number generator settings "on" should enabled the generateNumbers button ‑ Render ItemFields with number generator settings "on" should enabled the generateNumbers button
Render ItemFields with number generator settings "on" should render all input fields ‑ Render ItemFields with number generator settings "on" should render all input fields
Render NumberGeneratorButton should be disabled if disabled prop is true ‑ Render NumberGeneratorButton should be disabled if disabled prop is true
Render NumberGeneratorButton should call onClick if clicking button ‑ Render NumberGeneratorButton should call onClick if clicking button
Render NumberGeneratorButton should render the button with tooltip ‑ Render NumberGeneratorButton should render the button with tooltip
Render NumberGeneratorModal should call generateAccessionNumber and generateCallNumber when useSharedNumber is true ‑ Render NumberGeneratorModal should call generateAccessionNumber and generateCallNumber when useSharedNumber is true
…

♻️ This comment has been updated with latest results.

@elsenhans elsenhans requested review from usavkov-epam, alisher-epam and SerhiiNosko and removed request for usavkov-epam and alisher-epam February 24, 2025 15:12
@elsenhans
Copy link
Author

@usavkov-epam , @alisher-epam, @SerhiiNosko Sorry for the missing 2.2% code coverage.
Can I please get some tips for reaching it?

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
77.8% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@SerhiiNosko
Copy link

@usavkov-epam , @alisher-epam, @SerhiiNosko Sorry for the missing 2.2% code coverage. Can I please get some tips for reaching it?

you can found uncovered lines using sonar report, here is page for it
https://sonarcloud.io/component_measures?id=org.folio%3Aui-receiving&pullRequest=633&metric=new_coverage&view=list

@elsenhans
Copy link
Author

@usavkov-epam , @alisher-epam, @SerhiiNosko Sorry for the missing 2.2% code coverage. Can I please get some tips for reaching it?

you can found uncovered lines using sonar report, here is page for it https://sonarcloud.io/component_measures?id=org.folio%3Aui-receiving&pullRequest=633&metric=new_coverage&view=list

@SerhiiNosko Yeah, I know where the uncoverd lines are. The problem is how to cover them :/

Copy link

@SerhiiNosko SerhiiNosko left a comment

Choose a reason for hiding this comment

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

Looks good for me, but please wait review from @usavkov-epam also

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