jira-api-restclient icon indicating copy to clipboard operation
jira-api-restclient copied to clipboard

Remove wrapper struct around transitions in getTransitions

Open jpastoor opened this issue 9 years ago • 1 comments

Currently the getTransitions() call returns a struct like:

{
    "expand": "transitions",
    "transitions": [
        {
            "id": "2",
            "name": "Close Issue",

... etc

So what every implementor needs to do is

$transitions_struct = $client->getTransitions();
$transitions = $transitions_struct["transitions"];

See also the code in Api::closeIssue() method.

As far as I can tell by the docs and what ive seen there is no extra information in the expand. Suggestion is to return the ["transitions"] sub array in getTransitions()

jpastoor avatar Aug 18 '16 14:08 jpastoor

Agreed. Also tests needs to be added for changed code fragments.

aik099 avatar Aug 18 '16 14:08 aik099