Marcelo de Andrade
Marcelo de Andrade

Reputation: 332

How to get issues from Redmine API REST

Using the API Redmine using the wrapper Kevin Saliou, I am trying to get the issues of a particular project but is not being returned correctly, both issues as the open and 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 is used as status_id = closed, it returns a fixed number of elements 25. The project above contains:

Funcionalidade: 15 open / 86

Suporte: 1 open / 5

Manutenção: 7 open / 61

Erro: 3 open / 20

Pesquisa de Satisfação: 0 open / 0

And returns: 16 open issue / 25 closed issue

Upvotes: 1

Views: 1340

Answers (2)

sealson
sealson

Reputation: 1

use 'limit' => 100, in your array.

The API of redmine have a default limit of 25.

Upvotes: 0

bish
bish

Reputation: 3429

Do you have status definied that count as closed?

At the admin preferences you can set for every (?) status if it counts as closed or not. If yes the overview (the list you posted above) counts als issues as closed that have an status that counts as closed. Same for "open" (= all status that are not closed)

The API seems to only return these issues as closed who have the particular status closed and not all issues which have a status that counts as closed.

As I'm not native english I hope you get what I mean.

Upvotes: 1

Related Questions