chobie / jira-api-restclient

php JIRA REST API
MIT License
217 stars 123 forks source link

Changing assignee with ediIssue returns false #157

Closed fbermel closed 7 years ago

fbermel commented 7 years ago

Hi,

for some reason the ediIssue method returns false when changing the assignee. It works to change the field but the method returns false. This is what I use to change the field:

$update_object = new stdClass;
$update_object->assignee = array(
    array('set' => array('name' => $assignee))
);

$r = $this->api->editIssue($key, array(
    'update' => $update_object
));

return $r;
aik099 commented 7 years ago

The false is returned from underlying Api::api method call, which returns false when JIRA API response was empty string instead of JSON object. When there is an error the exception is thrown.

So I guess nothing to worry about.

fbermel commented 7 years ago

Yes you are right. I looked at the source and now feel silly for asking. :D Still I find this behaviour quite odd.