php-redmine-api icon indicating copy to clipboard operation
php-redmine-api copied to clipboard

Closing project

Open ArnieX opened this issue 8 years ago • 2 comments

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

ArnieX avatar Jan 13 '17 14:01 ArnieX

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]);

Art4 avatar Mar 23 '21 12:03 Art4

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

Art4 avatar Jan 03 '22 13:01 Art4