php-redmine-api
php-redmine-api copied to clipboard
Closing project
Hi @kbsali,
is it possible somehow change project's status? I'm trying to close project, but unfortunately it doesn't do anything when I call:
$closing = $client->api('project')->update($projectid, array( 'status' => 5 ));
$closing is true after the call, but status doesn't change.
Update: With 1.5.11 it returns false
Any ideas?
Thanks,
Martin
Closing/Archive a project is not implemented in Redmine API, see https://www.redmine.org/issues/13725
If this will be possible, your code should work.
$return = $client->getApi('project')->update($projectId, ['status' => 5]);
Update:
Redmine 5.0.0 will allow you to archive, unarchive, close, reopen projects via REST API
https://www.redmine.org/issues/13725#note-8
There will be 4 new endpoints that we will need to implement:
-
PUT /projects/:id/archive.xml
-
PUT /projects/:id/unarchive.xml
-
PUT /projects/:id/close.xml
-
PUT /projects/:id/reopen.xml