Skip to content

fixed negative children_count after deleting categories #28044

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

Merged
merged 14 commits into from
Jun 24, 2020
Merged

fixed negative children_count after deleting categories #28044

merged 14 commits into from
Jun 24, 2020

Conversation

ProkopovVitaliy
Copy link
Contributor

Description (*)

Related Pull Requests

Fixed Issues (if relevant)

  1. children_count can become negative after deleting categories #27969: children_count can become negative after deleting categories

Manual testing scenarios (*)

1.Log in into admin backend
2.Navigate to Catalog -> Categories
3.Click "Add Subcategory"
4.Fill category name with "Parent 1", Save
5.Click "Add Subcategory"
6.Fill category name with "Child 1", Save
7.Click "Add Subcategory"
8.Fill category name with "Child 2", Save
9.Click "Add Subcategory"
10.Fill category name with "Child 3", Save. At this point this category should have level = 5
11.Click on "Child 1" category
12.Delete category

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Apr 29, 2020

Hi @ProkopovVitaliy. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@engcom-Echo engcom-Echo self-assigned this Apr 30, 2020
@engcom-Echo
Copy link
Contributor

I will take care of test coverage.

@ghost ghost added the Priority: P3 May be fixed according to the position in the backlog. label Apr 30, 2020
@sdzhepa sdzhepa linked an issue Apr 30, 2020 that may be closed by this pull request
@sdzhepa sdzhepa added the Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. label Apr 30, 2020
@VladimirZaets VladimirZaets added the Auto-Tests: Covered All changes in Pull Request is covered by auto-tests label May 4, 2020
@magento-engcom-team
Copy link
Contributor

Hi @VladimirZaets, thank you for the review.
ENGCOM-7513 has been created to process this Pull Request

@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

Manual testing scenario:

1.Log in into admin backend
2.Navigate to Catalog -> Categories
3.Click "Add Subcategory"
4.Fill category name with "Parent 1", Save
5.Click "Add Subcategory"
6.Fill category name with "Child 1", Save
7.Click "Add Subcategory"
8.Fill category name with "Child 2", Save
9.Click "Add Subcategory"
10.Fill category name with "Child 3", Save. At this point this category should have level = 5
11.Click on "Child 1" category
12.Delete category
13. See catalog_category_entity table

Before: ✖️ children_count for remaining categories have negative meanings
screenshotqwerty

After: ✔️ children_count for remaining categories are valid
screenshotqwerty2

Also tested with few roots categories and Childs.

@ProkopovVitaliy
Copy link
Contributor Author

@magento run Static Tests

@ProkopovVitaliy
Copy link
Contributor Author

@magento run Unit Tests

@ProkopovVitaliy
Copy link
Contributor Author

@magento run all tests

@engcom-Echo engcom-Echo requested a review from dmytro-ch June 22, 2020 07:46
@magento-engcom-team
Copy link
Contributor

Hi @dmytro-ch, thank you for the review.
ENGCOM-7513 has been created to process this Pull Request

@engcom-Delta engcom-Delta self-assigned this Jun 22, 2020
@engcom-Delta engcom-Delta added QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope and removed QA: Ready to add to Regression Scope Should be analyzed and added to Regression Testing Scope(if applicable) labels Jun 22, 2020
@engcom-Delta
Copy link
Contributor

Notice: QA not applicable
New commits are connected to tests

@m2-assistant
Copy link

m2-assistant bot commented Jun 24, 2020

Hi @ProkopovVitaliy, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Award: bug fix Award: test coverage Component: Catalog Priority: P3 May be fixed according to the position in the backlog. Progress: accept QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope Release Line: 2.4 Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

children_count can become negative after deleting categories
9 participants