View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0015222 | mantisbt | api soap | public | 2012-11-20 02:47 | 2013-04-06 08:26 |
Reporter | e7andy | Assigned To | rombert | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.2.12 | ||||
Target Version | 1.2.13 | Fixed in Version | 1.2.13 | ||
Summary | 0015222: mc_project_delete_category fails to delete category | ||||
Description | Operation mc_project_delete_category returns faultstring "Error Type: APPLICATION ERROR 0001502, Error Description: Category not found." for existing categories and delete is not performed. Operation returns the correct faulstring "Error Type: APPLICATION ERROR 0001503, | ||||
Tags | No tags attached. | ||||
related to | 0014478 | closed | dregad | The global category "General" can be deleted, but the $g_default_category_for_moves must be protected from suppression |
related to | 0015226 | new | When deleting a Category, issues category_id is set to (No Category) | |
related to | 0015721 | closed | grangeway | Functionality to consider porting to master-2.0.x |
You have probably deleted the default category and the code tried to use it unconditionally. Now it should work but issues belonging to the deleted category will no longer have a category. |
|
I've confirmed that I've deleted the default category (General with id 1) and that is causing the problem. |
|
The code should not permit that, i.e. prevent category deletion unless $g_allow_no_category = ON; Furthermore, IMO the code should fallback to $g_default_category_for_moves, not to an empty category (as Mantis does not allow that category to be deleted, see 0014478) |
|
I can delete a category with issues attached to it and the issues will end up with "(No Category)" as category. I've verified that: So, the fallback to $g_default_category_for_moves doesn't seem to work. |
|
e7andy - as I said "code should fall back"... thanks for checking and confirming that it does not. I opened 0015226 to follow up with that |
|
Thanks for the heads-up ( also to atrol for spotting my initial mistake ) . I'll correct the code in the soap api in a couple of hours. |
|
Now falling back to default_category_for_moves |
|
Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch |
|
MantisBT: master 10ac96e8 2012-11-20 16:21 Details Diff |
SOAP API: only reference the global default category if it exists Fixes 0015222: mc_project_delete_category fails to delete category |
Affected Issues 0015222 |
|
mod - api/soap/mc_project_api.php | Diff File | ||
MantisBT: master-1.2.x 9ddbfae8 2012-11-20 16:21 Details Diff |
SOAP API: only reference the global default category if it exists Fixes 0015222: mc_project_delete_category fails to delete category |
Affected Issues 0015222 |
|
mod - api/soap/mc_project_api.php | Diff File | ||
MantisBT: master-1.2.x acd7562d 2012-11-21 14:58 Details Diff |
soap api: fall back to the default_category_for_moves when deleting categories Fixes 0015222: mc_project_delete_category fails to delete category |
Affected Issues 0015222 |
|
mod - api/soap/mc_project_api.php | Diff File | ||
MantisBT: master 4c6e6f0d 2012-11-21 14:58 Details Diff |
soap api: fall back to the default_category_for_moves when deleting categories Fixes 0015222: mc_project_delete_category fails to delete category |
Affected Issues 0015222 |
|
mod - api/soap/mc_project_api.php | Diff File |