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

UIOR-1177 Add settings components for custom fields #1536

Merged
merged 5 commits into from
Jan 9, 2024
Merged

Conversation

alb3rtino
Copy link
Contributor

Purpose

This PR is part of the integration of custom fields into the orders app. See UIOR-1177.

Approach

This PR introduces <CustomFieldsSettings> within <OrderSettings> to manage custom fields for both purchase orders and purchase order lines. This addition includes permissions, translations, and relies on the components <ViewCustomFieldsSettings> and <EditCustomFieldsSettings> from stripes-smart-components. These components communicate with the mod-orders-storage module to manage the custom fields.

Dependencies

<CustomFieldsSettings> requires mod-orders-storage to provide the custom-fields 3.0 interface. Unfortunately, directly requiring the okapi interface custom-fields 3.0 isn't feasible due to its "interfaceType": "multiple" nature. There's currently no way to ensure that custom-fields 3.0 is specifically provided by mod-orders-storage rather than, for example, mod-users.

The custom fields functionality was introduced in mod-orders and mod-orders-storage accompanied by an upgrade to the provided interface versions to orders 12.1 and order-lines 3.3 (see PR#806 and PR#374). Requiring orders 12.1 and order-lines 3.3 guarantees that both mod-orders and consequently mod-orders-storage support the custom fields functionality, securing the intended operation of <CustomFieldsSettings>.

Breaking Changes

The requirement for orders 12.1 and order-lines 3.3 constitutes a breaking change. As per semantic versioning guidelines, a major version increment in ui-orders is recommended.

Screenshots

screen-capture.webm

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 Dec 21, 2023

Jest Unit Test Statistics

    1 files  ±0  240 suites  +1   9m 16s ⏱️ +34s
602 tests +4  602 ✔️ +4  0 💤 ±0  0 ±0 
610 runs  +4  610 ✔️ +4  0 💤 ±0  0 ±0 

Results for commit d705d3a. ± Comparison against base commit 71b6ad6.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Dec 21, 2023

BigTest Unit Test Statistics

0 tests  ±0   0 ✔️ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ±0 

Results for commit d705d3a. ± Comparison against base commit 71b6ad6.

♻️ This comment has been updated with latest results.

@alb3rtino alb3rtino requested a review from a team December 21, 2023 15:58
@@ -1,6 +1,6 @@
{
"name": "@folio/orders",
"version": "5.1.0",
"version": "6.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

why do you think it's a breaking change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We're discontinuing support for orders <12.1 and order-lines <3.3. Interface requirements are a part of the public API. This change is backward incompatible, as ui-orders will no longer function in an environment that provides orders <12.1 or order-lines <3.3.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you implement any backwards-incompatible change to any API, or drop any API at all, increment the module version to 3.0.0

Guidelines for Contributing Code

Copy link

sonarqubecloud bot commented Jan 3, 2024

@alb3rtino alb3rtino requested review from a team January 3, 2024 17:51
@NikitaSedyx NikitaSedyx requested a review from a team January 9, 2024 11:03
Copy link
Contributor

@NikitaSedyx NikitaSedyx left a comment

Choose a reason for hiding this comment

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

please wait for one more review

@NikitaSedyx NikitaSedyx requested review from a team January 9, 2024 11:04
@alb3rtino alb3rtino merged commit 992eb8b into master Jan 9, 2024
6 checks passed
@alb3rtino alb3rtino deleted the UIOR-1177 branch January 9, 2024 11:44
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.

3 participants