Skip to content

Add sub-categories #434

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

Open
8 of 9 tasks
php-coder opened this issue Aug 11, 2016 · 0 comments
Open
8 of 9 tasks

Add sub-categories #434

php-coder opened this issue Aug 11, 2016 · 0 comments
Assignees
Labels
ADR/needed A decision has been made and it needs to be documented impact/changelog This change should be reflected in the NEWS.txt file kind/feature
Milestone

Comments

@php-coder
Copy link
Owner

php-coder commented Aug 11, 2016

Thoughts:

  • it shouldn't be possible to create sub-category with the name of category (and opposite)
  • category "Prehistoric animals" should become a sub-category of "Фауна" category (should we update existing mapping?)
  • top-level categories should be visible as optgroups and it shouldn't be possible to chose them

TODO:

  • prototype of the /series/add page
    • "Animals" category should be removed
    • "Fauna" > "Prehistoric animals" category and sub-category should be created
  • /series/add page
    • add support for showing categories/sub-categories
  • Migrations:
    • add category.top_category_id field (nullable, foreign key to top_categories.id)
    • "Fauna" category should be created
    • "Prehistoric animals" should be sub-category of the "Fauna"
    • "Sport" category should be added (test data only)
    • "Animals" category should be removed (test data only)
  • /category/add page
    • add select "Parent category" (and hint that if it's empty than we'll create a top-level category)

TESTS:

  • /category/add, /series/add: re-display of selected category in case of error
  • display of selected category when user is opening /series/add/category/$category
  • integration test for adding sub-category

Notes:

  • we can create separate table for top-level categories (resolution: let's keep it simple and use single table for a while)
    • [pro] we shouldn't modify existing SQL-queries
    • [pro] less chances to break something
    • [con] we have to write separate validator for checking uniqueness
    • [con] more code will be added (migration, service, dao, tests)
  • @Category — in one case we need only parent and in others only children. Currently, we always looking for any category
  • categories and subcategories vs top categories and categories
@php-coder php-coder added kind/feature impact/changelog This change should be reflected in the NEWS.txt file labels Aug 11, 2016
@php-coder php-coder added this to the next milestone Aug 11, 2016
@php-coder php-coder modified the milestones: 0.4, next Dec 6, 2016
@php-coder php-coder self-assigned this Dec 6, 2016
php-coder added a commit that referenced this issue Jan 8, 2017
php-coder added a commit that referenced this issue Jan 9, 2017
Update name of category that is always exist.

Correction for b7fe1da commit.

Addressed to #434
php-coder added a commit that referenced this issue Jan 9, 2017
Using method that requires permissions in @ModelAttribute made unavailable another page because
@ModelAttribute got executed for all methods of controller.

Correction for b7fe1da commit.

Addressed to #434
bodom91 pushed a commit to bodom91/mystamps that referenced this issue Aug 2, 2017
bodom91 pushed a commit to bodom91/mystamps that referenced this issue Aug 2, 2017
Update name of category that is always exist.

Correction for b7fe1da commit.

Addressed to php-coder#434
@php-coder php-coder modified the milestones: 0.4, next Jun 13, 2018
@php-coder php-coder added the ADR/needed A decision has been made and it needs to be documented label Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ADR/needed A decision has been made and it needs to be documented impact/changelog This change should be reflected in the NEWS.txt file kind/feature
Projects
None yet
Development

No branches or pull requests

1 participant