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-1330: ECS - Holdings are not displayed correctly in POL locations accordion after updating the ownership of one of the holdings #1666

Closed
wants to merge 11 commits into from

Conversation

alisher-epam
Copy link
Contributor

@alisher-epam alisher-epam commented Oct 24, 2024

Purpose

UIOR-1330:- ECS - Holdings are not displayed correctly in POL locations accordion after updating the ownership of one of the holdings

Has corresponding ticket here folio-org/stripes-acq-components#824

Approach

Screen.Recording.2024-10-24.at.20.58.02.mp4

Screenshots

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.

…s accordion after updating the ownership of one of the holdings
@alisher-epam alisher-epam self-assigned this Oct 24, 2024
@alisher-epam alisher-epam requested review from usavkov-epam and a team October 24, 2024 15:56
Copy link

github-actions bot commented Oct 24, 2024

Jest Unit Test Statistics

    1 files  ±0  266 suites  +1   6m 36s ⏱️ -1s
703 tests +3  703 ✔️ +3  0 💤 ±0  0 ±0 
711 runs  +3  711 ✔️ +3  0 💤 ±0  0 ±0 

Results for commit e6f3244. ± Comparison against base commit dfe457d.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Oct 24, 2024

BigTest Unit Test Statistics

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

Results for commit e6f3244. ± Comparison against base commit dfe457d.

♻️ This comment has been updated with latest results.

@@ -117,7 +130,7 @@ const LocationView = ({
{
lineLocations.map((location, i) => (
<Location
key={location.id || i} // i is required when new row of Location is added by User
key={location.holdingId || i} // i is required when new row of Location is added by User
Copy link
Contributor

Choose a reason for hiding this comment

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

why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have checked the obeject dosn't provide id it provides holdingId instead

Copy link
Contributor

@usavkov-epam usavkov-epam Oct 29, 2024

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is related to poline locations https://s3.amazonaws.com/foliodocs/api/mod-orders/p/order-lines.html#

"properties": {
                "locationId": {
                  "description": "UUID of the (inventory) location record",
                  "type": "string",
                  "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
                },
                "holdingId": {
                  "description": "Holding UUID associated with order line",
                  "type": "string",
                  "$schema": "http://json-schema.org/draft-04/schema#",
                  "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
                },
                "quantity": {
                  "description": "Combined/total quanitity of physical and electronic items",
                  "type": "integer"
                },
                "quantityElectronic": {
                  "description": "Quantity of electronic items",
                  "type": "integer"
                },
                "quantityPhysical": {
                  "description": "Quantity of physical items",
                  "type": "integer"
                },
                "tenantId": {
                  "description": "Associated tenant for ECS-enabled clusters",
                  "type": "string"
                }
              },
              ```

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I look at another locations...

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, you're right. But in that case it could be either holdingId or locationId


const DEFAULT_DATA = [];

export const useLocationsAndHoldingsByTenants = ({ receivingTenantIdsByLocations = DEFAULT_DATA, instanceId }) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let receivingTenantIdsByLocations be just tenantIds

Copy link

@alisher-epam alisher-epam marked this pull request as draft November 1, 2024 05:44
@alisher-epam
Copy link
Contributor Author

No longer needed due the the issue has been fixed by back-end

@usavkov-epam usavkov-epam deleted the UIOR-1330 branch December 3, 2024 09: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