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

Show correct variations count when generating a single variation #37876

Merged
merged 7 commits into from Apr 27, 2023

Conversation

mattsherman
Copy link
Contributor

@mattsherman mattsherman commented Apr 20, 2023

Submission Review Guidelines:

Changes proposed in this Pull Request:

This PR corrects the variations count shown when using the "Generate variations" button and a single variation is generated.

Before

Screenshot 2023-04-20 at 08 47 03

After

Screenshot 2023-04-20 at 08 48 24

Closes #37644.

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

  1. Go to Products > Add New > Product data.
  2. Select a Variable product and go to the Attributes tab.
  3. Add a new attribute with only one value/term and save the attribute.
  4. Go to the Variations tab and click Generate variations.
  5. Verify that the variations count is correct.
  6. Also, use Add manually and Remove to add variations and verify the count remains correct.
  7. Repeat this with an attribute with more than one value/term and verify that when multiple variations are generated, the count is correct.

@mattsherman mattsherman added the focus: product management Related to product creation and editing. label Apr 20, 2023
@mattsherman mattsherman requested a review from a team April 20, 2023 08:59
@mattsherman mattsherman self-assigned this Apr 20, 2023
@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Apr 20, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Apr 20, 2023

Hi @octaedro,

Apart from reviewing the code changes, please make sure to review the testing instructions as well.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

@github-actions
Copy link
Contributor

github-actions bot commented Apr 20, 2023

Test Results Summary

Commit SHA: a3eee81

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests26700202691m 15s
E2E Tests1870010019714m 10s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

@mattsherman mattsherman marked this pull request as ready for review April 20, 2023 12:56
@octaedro octaedro requested review from octaedro and removed request for a team April 26, 2023 13:40
Copy link
Contributor

@octaedro octaedro left a comment

Choose a reason for hiding this comment

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

Nice job @mattsherman. The changes look good, I only left a couple of comments.
Maybe I have a building problem, but I'm seeing the confirmation window like this:

Screenshot 2023-04-26 at 11 36 53

@mattsherman mattsherman force-pushed the fix/incorrect-variation-count branch from d4dec49 to 4b1175e Compare April 26, 2023 19:09
@mattsherman
Copy link
Contributor Author

Nice job @mattsherman. The changes look good, I only left a couple of comments. Maybe I have a building problem, but I'm seeing the confirmation window like this:

Screenshot 2023-04-26 at 11 36 53

This happens when the legacy JS isn't built. I just hit it when forgetting to pnpm run build after switching back to this branch.

@mattsherman
Copy link
Contributor Author

@octaedro Ready for re-review!

Copy link
Contributor

@octaedro octaedro left a comment

Choose a reason for hiding this comment

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

Great work @mattsherman! LGTM :shipit:

@mattsherman mattsherman merged commit 72551f1 into trunk Apr 27, 2023
17 checks passed
@mattsherman mattsherman deleted the fix/incorrect-variation-count branch April 27, 2023 01:40
@github-actions github-actions bot added this to the 7.8.0 milestone Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: product management Related to product creation and editing. plugin: woocommerce Issues related to the WooCommerce Core plugin.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Variation count is wrong
2 participants