Skip to content
Snippets Groups Projects
  • Kyle Mckay's avatar
    c4ff099f
    Fix failure to create category with deleted name (#2002) · c4ff099f
    Kyle Mckay authored
    * Fix failure to create category with deleted name
    
    I'm not 100% familiar with the design of the data model so may have
    misinterpreted what's going on here, but how I read this:
    
    - The tombstone flag is used to soft delete categories.
    - When creating a new category, duplicate names within a group are
      prevented.
    - When checking for duplicate names, the tombstone flag was unchecked
      which meant deleted categories were falsely blocking creation.
    
    I had a look at category deleteion logic to verify that simply including
    the tombstone flag in this check is sane and see that there's a category
    mapping being maintained to redirect one category to another on
    deletion. So from what I can tell the correct behaviour here is to allow
    a new category with the previously deleted name, rather than to revive
    the old category (to preserve that old mapping lineage).
    
    * Add release note
    
    * Add regression test
    Fix failure to create category with deleted name (#2002)
    Kyle Mckay authored
    * Fix failure to create category with deleted name
    
    I'm not 100% familiar with the design of the data model so may have
    misinterpreted what's going on here, but how I read this:
    
    - The tombstone flag is used to soft delete categories.
    - When creating a new category, duplicate names within a group are
      prevented.
    - When checking for duplicate names, the tombstone flag was unchecked
      which meant deleted categories were falsely blocking creation.
    
    I had a look at category deleteion logic to verify that simply including
    the tombstone flag in this check is sane and see that there's a category
    mapping being maintained to redirect one category to another on
    deletion. So from what I can tell the correct behaviour here is to allow
    a new category with the previously deleted name, rather than to revive
    the old category (to preserve that old mapping lineage).
    
    * Add release note
    
    * Add regression test