View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0030415 | mantisbt | api rest | public | 2022-05-28 11:31 | 2023-10-31 16:32 |
Reporter | atrol | Assigned To | vboctor | ||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Target Version | 2.26.0 | Fixed in Version | 2.26.0 | ||
Summary | 0030415: REST API: Add API to Get / Delete / Update versions | ||||
Description | Add support for deleting / updating versions via REST API | ||||
Tags | No tags attached. | ||||
related to | 0032445 | closed | vboctor | REST API: Project Add API to return information about added version |
related to | 0032832 | closed | dregad | Remove version_cache_row()'s 2nd parameter |
related to | 0032858 | closed | dregad | Status codes returned by REST API delete operations are not consistent |
related to | 0032909 | closed | dregad | Internal application error when editing a Project Version. |
As I reported in 0032832:0067996
Proposed fix in PR https://github.com/mantisbt/mantisbt/pull/1905 |
|
MantisBT: master c407d110 2023-04-22 04:20 Details Diff |
Implement VersionDeleteCommand Fixes 0030415 |
Affected Issues 0030415 |
|
add - core/commands/VersionDeleteCommand.php | Diff File | ||
MantisBT: master c50890a0 2023-04-22 04:21 Details Diff |
Use VersionDeleteCommand in REST API Fixes 0030415 |
Affected Issues 0030415 |
|
mod - api/rest/restcore/projects_rest.php | Diff File | ||
MantisBT: master 85abdf21 2023-04-22 04:21 Details Diff |
Use VersionDeleteCommand in SOAP API Fixes 0030415 |
Affected Issues 0030415 |
|
mod - api/soap/mc_project_api.php | Diff File | ||
MantisBT: master 3f083387 2023-04-22 04:22 Details Diff |
Use VersionDeleteCommand in Web UI Fixes 0030415 |
Affected Issues 0030415 |
|
mod - manage_proj_ver_delete.php | Diff File | ||
MantisBT: master a62cec0f 2023-04-22 04:55 Details Diff |
Implement VersionUpdateCommand Fixes 0030415 |
Affected Issues 0030415 |
|
add - core/commands/VersionUpdateCommand.php | Diff File | ||
MantisBT: master fa1a9154 2023-04-22 04:55 Details Diff |
Update Web UI to use VersionUpdateCommand Fixes 0030415 |
Affected Issues 0030415 |
|
mod - manage_proj_ver_update.php | Diff File | ||
MantisBT: master f9662472 2023-04-22 05:15 Details Diff |
Add REST API for updating a version Fixes 0030415 |
Affected Issues 0030415 |
|
mod - api/rest/restcore/projects_rest.php | Diff File | ||
MantisBT: master ef791adc 2023-04-22 05:15 Details Diff |
Update SOAP API to use VersionUpdateCommand Fixes 0030415 |
Affected Issues 0030415 |
|
mod - api/soap/mc_project_api.php | Diff File | ||
MantisBT: master 066c944f 2023-04-22 05:16 Details Diff |
Misc update for version APIs Fixes 0030415 |
Affected Issues 0030415 |
|
mod - core/commands/VersionAddCommand.php | Diff File | ||
mod - core/commands/VersionDeleteCommand.php | Diff File | ||
mod - core/commands/VersionUpdateCommand.php | Diff File | ||
mod - manage_proj_ver_delete.php | Diff File | ||
MantisBT: master 1de2112c 2023-04-22 13:28 Details Diff |
Implement VersionGetCommand Fixes 0030415 |
Affected Issues 0030415 |
|
add - core/commands/VersionGetCommand.php | Diff File | ||
mod - core/version_api.php | Diff File | ||
MantisBT: master f6c05947 2023-04-22 13:44 Details Diff |
Update VersionAddCommand to return the created version Fixes 0030415 |
Affected Issues 0030415 |
|
mod - core/commands/VersionAddCommand.php | Diff File | ||
MantisBT: master 3805e332 2023-04-22 13:45 Details Diff |
Add REST API to get version(s) + return version on creation Fixes 0030415 |
Affected Issues 0030415 |
|
mod - api/rest/restcore/projects_rest.php | Diff File | ||
MantisBT: master 5caafd27 2023-04-22 19:35 Details Diff |
Add test cases for project version APIs + fixes Fixes 0030415 |
Affected Issues 0030415 |
|
mod - api/rest/restcore/projects_rest.php | Diff File | ||
mod - core/commands/VersionAddCommand.php | Diff File | ||
mod - core/commands/VersionGetCommand.php | Diff File | ||
mod - core/commands/VersionUpdateCommand.php | Diff File | ||
mod - core/version_api.php | Diff File | ||
mod - manage_proj_ver_add.php | Diff File | ||
mod - manage_proj_ver_delete.php | Diff File | ||
mod - tests/core/RequestBuilder.php | Diff File | ||
mod - tests/rest/RestBase.php | Diff File | ||
add - tests/rest/RestProjectVersionTests.php | Diff File | ||
MantisBT: master 99f61e9b 2023-04-22 20:52 Details Diff |
Fix failing test Fixes 0030415 |
Affected Issues 0030415 |
|
mod - api/soap/mc_project_api.php | Diff File | ||
mod - core/commands/VersionDeleteCommand.php | Diff File | ||
mod - tests/rest/AllTests.php | Diff File | ||
mod - tests/rest/RestProjectVersionTests.php | Diff File | ||
mod - tests/soap/VersionTest.php | Diff File | ||
MantisBT: master 4cdf5c7d 2023-04-22 23:46 Details Diff |
Fix indentation + php docs Fixes 0030415 |
Affected Issues 0030415 |
|
mod - core/commands/VersionUpdateCommand.php | Diff File | ||
mod - core/version_api.php | Diff File | ||
mod - tests/rest/RestBase.php | Diff File | ||
mod - tests/rest/RestProjectVersionTests.php | Diff File | ||
MantisBT: master 3610ae50 2023-08-17 12:03 Details Diff |
Exception when version to delete does not exist The initial implementation of VersionDeleteCommand did not throw an exception when given a non-existing version number, causing the REST API to succeed with HTTP 204 (version deleted) when it should in fact have failed. The Command now throws a ClientException, resulting in the API returning a 404 (not found) in this situation. Note: the version_exists() call before retrieving the project id with version_get_field() is not necessary, as the latter already perform this check (via version_cache_row()). PHPUnit test has been updated accordingly. Fixes 0030415 |
Affected Issues 0030415 |
|
mod - core/commands/VersionDeleteCommand.php | Diff File | ||
mod - tests/rest/RestProjectVersionTest.php | Diff File | ||
MantisBT: master 69cc2cfc 2023-09-06 04:06 Details Diff |
Bad timestamp in VersionGetCommand::VersionToArray() Missing ApiObjectFactory::$soap = false initialization causes the version's date_order to be initialized as a XSD_DATETIME SoapVar instead of an ISO-formatted date string as expected. As long as the PHP SOAP Extension is available, this does not cause any actual side effects, because - the return value is not used when the Commands are used from within Mantis Core - REST API initializes ApiObjectFactory::$soap = false so date_order is returned in the correct format. If the SOAP extension is not available, Mantis triggers an internal application error when this function is called. Fixes 0032909, 0030415 |
Affected Issues 0030415, 0032909 |
|
mod - core/commands/VersionGetCommand.php | Diff File |