View Issue Details

IDProjectCategoryView StatusLast Update
0020198mantisbtadministrationpublic2016-06-12 00:42
ReportervboctorAssigned Tocommunity 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.3.0-beta.3 
Target Version1.3.0-rc.2Fixed in Version1.3.0-rc.2 
Summary0020198: Deleting category should be blocked if category has issues associated with it
Description

When we delete a category, we change issues that are associated with the category to have category id 0 which translates to no-category. There is no way to filter on such category to move it to another one later.

I wonder if we should use the same model we use when moving an issue to a project that doesn't have the category defined, where we use 'default_category_for_moves'. In this case, the config name is not descriptive, so we can re-use, or add another config.

Thoughts?

Tagsmantishub

Activities

dregad

dregad

2015-10-15 03:43

developer   ~0051632

Wouldn't it make more sense to simply prevent deletion of a category that has issues associated to it ?

I don't really like the idea of updating issues' category without a conscious decision to do so by the user.

ianfp

ianfp

2016-03-04 13:09

reporter   ~0052681

Anything would be better than the current behaviour. I deleted a category and now I cannot filter by issues which do not have a category.

vboctor

vboctor

2016-03-08 01:38

manager   ~0052696

I've updated the issue title to reflect the new approach which is to block the category delete operation.

atrol

atrol

2016-03-15 03:59

developer   ~0052776

PR https://github.com/mantisbt/mantisbt/pull/738

Related Changesets

MantisBT: master f2d6a668

2016-03-15 02:59:33

naveenbali


Committer: vboctor Details Diff
Don't allow deletion of category having issues.
Deleting category is blocked if category has issues associated with it.
Move query to core/category_api.php and created functions
category_can_delete, category_ensure_can_delete

Added error parameters and defined category_delete_confirm_msg
Fixes 0020198
mod - core/category_api.php Diff File
mod - core/constant_inc.php Diff File
mod - lang/strings_english.txt Diff File
mod - manage_proj_cat_delete.php Diff File

MantisBT: master 39baba2e

2016-03-20 12:02:05

vboctor

Details Diff
Pull request tweaks to category deletion checks

Fixes 0020198
mod - core/category_api.php Diff File
mod - lang/strings_english.txt Diff File

Issue History

Date Modified Username Field Change
2015-10-14 21:19 vboctor New Issue
2015-10-14 21:19 vboctor Status new => assigned
2015-10-14 21:19 vboctor Assigned To => vboctor
2015-10-14 21:19 vboctor Tag Attached: mantishub
2015-10-15 03:43 dregad Note Added: 0051632
2015-12-06 02:55 vboctor Target Version 1.3.0-rc.1 => 1.3.0-rc.2
2016-03-04 13:09 ianfp Note Added: 0052681
2016-03-08 01:38 vboctor Summary Deleting category should revert to default category? => Deleting category should be blocked if category has issues associated with it
2016-03-08 01:38 vboctor Note Added: 0052696
2016-03-15 03:59 atrol Note Added: 0052776
2016-03-20 12:04 vboctor Changeset attached => MantisBT master f2d6a668
2016-03-20 12:04 vboctor Changeset attached => MantisBT master 39baba2e
2016-03-20 12:04 vboctor Status assigned => resolved
2016-03-20 12:04 vboctor Resolution open => fixed
2016-03-20 12:04 vboctor Fixed in Version => 1.3.0-rc.2
2016-03-20 12:30 vboctor Assigned To vboctor => community
2016-06-12 00:42 vboctor Status resolved => closed