View Issue Details

IDProjectCategoryView StatusLast Update
0009677mantisbtadministrationpublic2009-01-15 11:25
Reporterkarotos Assigned Tojreese  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.0a2 
Fixed in Version1.2.0a3 
Summary0009677: SQL Error when deleting a project with no categories
Description

Deleting a project that has no categories is not possible.
It produces an SQL error.

I suggest checking variable $t_category_ids and not perform the query if it's empty before line 229 in file core/category_api.php

Steps To Reproduce
  1. Log in as administrator
  2. Browse to Manage->Manage Projects->Create New Project
  3. provide a name for the project
  4. submit the Form
  5. Browse to Manage->Manage Projects
  6. Click on the newly created project to mke the edit page appear
  7. Click the "Delete Project" button
  8. confirm the deletion

Actual Result
Error:
Database query failed. Error received from database was 0001064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 for the query: SELECT id, category_id FROM mantis_bug_table WHERE category_id IN ( )

Expected Result
The project should be deleted

Additional Information

Adding a category to the project, before deleting it, bypasses the problem.

TagsNo tags attached.

Activities

jreese

jreese

2008-10-07 10:21

reporter   ~0019507

Fixed in SVN trunk, r5634. Thanks again. :)

Related Changesets

MantisBT: master 04d4c07d

2008-10-07 10:15

jreese


Details Diff
Fix 0009677: SQL errors when deleting categories from projects with no categories.

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@5634 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9
Affected Issues
0009677
mod - core/category_api.php Diff File