View Issue Details

IDProjectCategoryView StatusLast Update
0032470mantisbtapi restpublic2026-09-03 19:02
Reportervboctor Assigned Tovboctor  
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Product Version2.25.7 
Target Version2.29.0Fixed in Version2.29.0 
Summary0032470: REST API: Project Category Add/Update/Delete
Description

Add APIs for managing project categories

TagsNo tags attached.

Relationships

related to 0031017 closeddregad Allow disabling Categories 

Activities

dregad

dregad

2024-02-14 09:12

developer   ~0068536

Following discussion in PR https://github.com/mantisbt/mantisbt/pull/1853, the new endpoints should also allow enabling/disabling categories (see 0031017).

vboctor

vboctor

2026-08-23 03:10

manager   ~0071368

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

Related Changesets

MantisBT: master 1358aa93

2026-08-23 02:25

vboctor


Details Diff
Category API: add project category command

Fixes 0032470
Affected Issues
0032470
mod - core/category_api.php Diff File
add - core/commands/CategoryAddCommand.php Diff File

MantisBT: master ccc48250

2026-08-23 02:25

vboctor


Details Diff
Category API: add category update command

Fixes 0032470
Affected Issues
0032470
add - core/commands/CategoryUpdateCommand.php Diff File

MantisBT: master 12850f72

2026-08-23 02:25

vboctor


Details Diff
Category API: add category delete command

Fixes 0032470
Affected Issues
0032470
add - core/commands/CategoryDeleteCommand.php Diff File

MantisBT: master ff9dfaf3

2026-08-23 02:25

vboctor


Details Diff
Category API: add category get command

Fixes 0032470
Affected Issues
0032470
add - core/commands/CategoryGetCommand.php Diff File

MantisBT: master 68609e41

2026-08-23 02:25

vboctor


Details Diff
REST API: expose project category commands

Fixes 0032470
Affected Issues
0032470
mod - api/rest/mantisbt_openapi.yaml Diff File
mod - api/rest/restcore/projects_rest.php Diff File

MantisBT: master 5c5b7267

2026-08-23 02:25

vboctor


Details Diff
SOAP API: use project category commands

Fixes 0032470
Affected Issues
0032470
mod - api/soap/mc_project_api.php Diff File

MantisBT: master f734bff6

2026-08-23 02:25

vboctor


Details Diff
Tests: cover project category APIs

Fixes 0032470
Affected Issues
0032470
add - tests/Mantis/CategoryCommandTest.php Diff File
add - tests/Mantis/CategoryDeleteCommandTest.php Diff File
add - tests/rest/RestProjectCategoryTest.php Diff File
mod - tests/soap/CategoryTest.php Diff File

MantisBT: master c867fcc0

2026-08-23 02:25

vboctor


Details Diff
Web UI: use project category commands

Fixes 0032470
Affected Issues
0032470
mod - manage_proj_cat_add.php Diff File
mod - manage_proj_cat_copy.php Diff File
mod - manage_proj_cat_delete.php Diff File
mod - manage_proj_cat_update.php Diff File

MantisBT: master 596ae02a

2026-08-23 02:46

vboctor


Details Diff
Project categories: use enabled and support global categories

Fixes 0032470
Affected Issues
0032470
mod - api/rest/mantisbt_openapi.yaml Diff File
mod - api/soap/mc_project_api.php Diff File
mod - core/commands/CategoryAddCommand.php Diff File
mod - core/commands/CategoryDeleteCommand.php Diff File
mod - core/commands/CategoryUpdateCommand.php Diff File
mod - manage_proj_cat_update.php Diff File
mod - tests/Mantis/CategoryCommandTest.php Diff File
mod - tests/rest/RestProjectCategoryTest.php Diff File

MantisBT: master c132af68

2026-08-23 04:38

vboctor


Details Diff
Preserve stale category handler assignments

Fixes 0032470
Affected Issues
0032470
mod - core/category_api.php Diff File
mod - core/commands/CategoryGetCommand.php Diff File
mod - core/commands/CategoryUpdateCommand.php Diff File
mod - tests/Mantis/CategoryCommandTest.php Diff File

MantisBT: master abef802d

2026-08-23 04:45

vboctor


Details Diff
Use category command in project edit page

Fixes 0032470
Affected Issues
0032470
mod - manage_proj_edit_page.php Diff File

MantisBT: master 981b41ce

2026-08-23 04:45

vboctor


Details Diff
Use category command in projects page

Fixes 0032470
Affected Issues
0032470
mod - manage_proj_page.php Diff File

MantisBT: master a148aa0a

2026-08-23 04:46

vboctor


Details Diff
Use category command in category edit page

Fixes 0032470
Affected Issues
0032470
mod - manage_proj_cat_edit_page.php Diff File

MantisBT: master abfbb131

2026-08-23 14:14

vboctor


Details Diff
Apply category command style improvements

Fixes 0032470
Affected Issues
0032470
mod - api/rest/restcore/projects_rest.php Diff File
mod - api/soap/mc_project_api.php Diff File
mod - core/category_api.php Diff File
mod - core/commands/CategoryAddCommand.php Diff File
mod - core/commands/CategoryDeleteCommand.php Diff File
mod - core/commands/CategoryGetCommand.php Diff File
mod - core/commands/CategoryUpdateCommand.php Diff File
mod - core/print_api.php Diff File
mod - manage_proj_cat_add.php Diff File
mod - manage_proj_cat_copy.php Diff File
mod - manage_proj_cat_delete.php Diff File
mod - manage_proj_cat_edit_page.php Diff File
mod - manage_proj_cat_update.php Diff File
mod - manage_proj_edit_page.php Diff File
mod - manage_proj_page.php Diff File
mod - tests/Mantis/CategoryCommandTest.php Diff File
mod - tests/Mantis/CategoryDeleteCommandTest.php Diff File
mod - tests/soap/CategoryTest.php Diff File

MantisBT: master 4b0c66f1

2026-08-23 14:50

vboctor


Details Diff
Standardize handler field handling

Fixes 0032470
Affected Issues
0032470
mod - api/rest/mantisbt_openapi.yaml Diff File
mod - api/soap/mc_project_api.php Diff File
mod - core/commands/CategoryAddCommand.php Diff File
mod - core/commands/CategoryGetCommand.php Diff File
mod - core/commands/CategoryUpdateCommand.php Diff File
mod - manage_proj_cat_edit_page.php Diff File
mod - manage_proj_cat_update.php Diff File
mod - manage_proj_edit_page.php Diff File
mod - manage_proj_page.php Diff File
mod - tests/Mantis/CategoryCommandTest.php Diff File
mod - tests/rest/RestProjectCategoryTest.php Diff File

MantisBT: master 4d108487

2026-08-28 19:41

dregad


Details Diff
category_validate_assigned_to() always throws

The function, introduced with the new Category commands (Issue 0032470,
commit 1358aa93108a4e5fa36079955161733f5ba3283d), was modified to always
throw a ClientException.

The $p_throw_exception parameter has become useless and was removed.

Fixes 0036812
Affected Issues
0032470, 0036812
mod - core/category_api.php Diff File
mod - core/commands/CategoryAddCommand.php Diff File
mod - core/commands/CategoryUpdateCommand.php Diff File

MantisBT: master 3c07e41e

2026-08-30 05:59

dregad


Details Diff
PHPUnit: fix skipped Category tests

Incorrect check for a global default category caused some tests to be
skipped in:
- testDeleteCategoryReassignsIssues
- testProjectCategoryCannotDeleteDefault

Check was adjusted to also work when the default category is global.

Issue 0032470
Affected Issues
0032470
mod - tests/rest/RestProjectCategoryTest.php Diff File
mod - tests/soap/CategoryTest.php Diff File

MantisBT: master 70a18e52

2026-08-30 06:15

dregad


Details Diff
Fix testDeleteCategoryReassignsIssues

PHPUnit was throwing an error, due to attempting to delete the category
created for the test twice (once as part of the test itself, and again
during tearDown).

1) Mantis\tests\soap\CategoryTest::testDeleteCategoryReassignsIssues
SoapFault: Error Type: APPLICATION ERROR 0001503,
Error Description: Category "soaptest_source_20260830_121111" not found
for project "PHPUnit".

Solved by not adding the category to categoryNamesToDelete.

Issue 0032470
Affected Issues
0032470
mod - tests/soap/CategoryTest.php Diff File

MantisBT: master 6a8b3192

2026-08-30 13:31

dregad


Details Diff
PHPUnit: fail on all issues

The CI builds are not marked as failed when those "secondary" issues
occurs. It would be preferable if they did, so that problems are
detected early, and fixed as part of the PR process.

Recent examples:
- Deprecated warnings introduced by Issue 0037333
- Skipped tests introduced by Issues 0032470, 0037333
Affected Issues
0032470, 0037333
mod - phpunit.xml Diff File

MantisBT: master 94ba8d1d

2026-09-01 11:32

dregad


Details Diff
Fix failing testCannotDeleteDefaultCategory

CategoryDeleteCommand now throws a ClientException so we no longer need
to use a temporary error handler to catch an ErrorException.

Issue 0032470
Affected Issues
0032470
mod - tests/Mantis/CategoryDeleteCommandTest.php Diff File