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

#910 Fix incorrect product option combinations #922

Merged
merged 16 commits into from
Aug 28, 2024

Conversation

mochacr0
Copy link
Contributor

@mochacr0 mochacr0 commented Aug 22, 2024

Test Cases

1. The product name contains the option value

Create screen

screencapture-localhost-8087-catalog-products-create-2024-08-22-17_53_27

Created successfully

screencapture-localhost-8087-catalog-products-321-edit-2024-08-22-17_53_44

2. The first option value contains the value of the second option value

Create screen

screencapture-localhost-8087-catalog-products-create-2024-08-22-17_55_33

Created successfully

screencapture-localhost-8087-catalog-products-325-edit-2024-08-22-17_55_58

Copy link

github-actions bot commented Aug 22, 2024

Product Coverage Report

Overall Project 22.72% -11.59%
Files changed 4.23%

File Coverage
ProductService.java 19.8% -31.58%
Constants.java 0% 🍏
ProductOptionValuePostVm.java 0% 🍏
ProductOptionValuePutVm.java 0% 🍏
ProductVariationGetVm.java 0% 🍏
ProductSaveVm.java 0% 🍏
ProductVariationPutVm.java 0% 🍏
ProductVariationPostVm.java 0% 🍏

@mochacr0 mochacr0 marked this pull request as ready for review August 23, 2024 02:29
@mochacr0 mochacr0 marked this pull request as draft August 23, 2024 02:46
@mochacr0 mochacr0 marked this pull request as ready for review August 23, 2024 02:59
Copy link
Contributor

@minhtridn2001 minhtridn2001 left a comment

Choose a reason for hiding this comment

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

Hi @mochacr0, I have added a few comments. Please take a look.
Thanks!


setProductBrand(productPostVm.brandId(), mainProduct);

List<ProductCategory> productCategories = setProductCategories(productPostVm.categoryIds(), mainProduct);
Copy link
Contributor

Choose a reason for hiding this comment

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

The method name setProductCategories can be misleading because the word set typically for updating an existing value. We should change it to getProductCategories or something else.
This comment applies to other methods as well

Copy link

sonarcloud bot commented Aug 28, 2024

Copy link

sonarcloud bot commented Aug 28, 2024

Copy link

sonarcloud bot commented Aug 28, 2024

@mochacr0 mochacr0 merged commit 43b080f into main Aug 28, 2024
12 checks passed
@mochacr0 mochacr0 deleted the #910-fix-incorrect-product-option-combinations branch August 28, 2024 03:39
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.

[Product] Incorrect product option combinations due to partial slug matching
3 participants