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

fix: do not overide product information in the state with information with lower completeness level #1256

Merged
merged 2 commits into from
Aug 26, 2022

Conversation

shauke
Copy link
Collaborator

@shauke shauke commented Aug 23, 2022

PR Type

[x] Bugfix

What Is the Current Behavior?

Product images and description are sometimes missing on the product detail page when routing there from a product list.

This happens if the category products call responds later then the product details call.
Both calls are triggered when routing to the product details page.

Problem 1: There is no need for the additional category products call when routing to the product details page.

Problem 2: Product information with a lower completeness level should not overwrite product information in the state with a higher completeness level.

What Is the New Behavior?

The first commit addresses Problem 1 by reverting the commit that introduced this wrong behavior.

The second commit fixes the product information state update handling and considers the different completeness levels.

  • update the complete product information in the state if the new product information has a higher or equal completeness level than the current product information in the state
  • always update the availability information in the state with the new product information

Does this PR Introduce a Breaking Change?

[x] No

Other Information

The fix for the issue of #1140 is reverted since it introduced more problems then it fixed. A new fix for #1140 will be necessary. It addressed a very corner case like scenario that is ignored for now.

AB#79022

@shauke shauke added this to the 3.1 milestone Aug 23, 2022
@shauke shauke requested a review from SGrueber August 23, 2022 16:08
@shauke shauke self-assigned this Aug 23, 2022
@shauke shauke added the bug Something isn't working label Aug 23, 2022
@shauke shauke requested a review from dhhyi August 23, 2022 16:12
@shauke shauke force-pushed the bugfix/removed_product_information branch from 33d9839 to 3e9d32a Compare August 24, 2022 20:30
@shauke shauke requested a review from dhhyi August 25, 2022 06:50
SGrueber
SGrueber previously approved these changes Aug 25, 2022
…n with lower completeness level (#1256)

* overriding product detail response information with product information from a products list call removed product images, description etc.
* now only the availability information from product information with a lower completeness level is merged into the existing product information
@shauke shauke force-pushed the bugfix/removed_product_information branch from 3e9d32a to e669196 Compare August 26, 2022 06:54
@shauke shauke merged commit 81b2220 into develop Aug 26, 2022
@shauke shauke deleted the bugfix/removed_product_information branch August 26, 2022 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants