How to get issues through the Redmine REST API

Asked

Viewed 266 times

0

Using the API of Redmine using the wrapper of Kevin Saliou, I’m trying to get the issues of a particular project but is not being returned correctly, both issues open as to the closed are incorrect.

    $client = Yii::$app->redmine->connectRedmine();

    $issues = $client->api('issue')->all([
        'project_id' => 'id5-cli-portal',
        'status_id' => 'closed',
        'sort' => 'created_on:desc,status:desc'
    ]);

When the parameter status_id is passed as closed, a fixed quantity of 25 elements is returned for any project used.

In the above project example, it contains the following:

Feature: 15 open / 86

Support: 1 open / 5

Maintenance: 7 open / 61

Error: 3 opened / 20

Satisfaction Survey: 0 open / 0

And is returned: 16 open issue / 25 closed issue

1 answer

0


The API already returns a key/value with total results:

$issues['total_count'];

Browser other questions tagged

You are not signed in. Login or sign up in order to post.