0

im using a email client that i build to update jira tasks. i have managed to change the assignee and the summary through it. but i cannot seems to find a way to update the status. following is the code i used.

$resolution->id="4";
$update->transitions= array($resolution);
$queryIssue = new Jira($config);
$queryIssue->updateTransition($query,$update);

the class:

public function updateTransition($issueKey,$json){
$this->request->openConnect('https://'.$this->host.'/rest/api/latest/issue/REC-143/transitions?', 'POST', $json);
$this->request->execute(); 
}

this gives me an error saying Missing 'transition' identifier what am i doing wrong here.please let me know.

Sp3LLingzz
  • 303
  • 1
  • 3
  • 14

1 Answers1

0

the way i input the json was incorrect.it should be,

$resolution->transition->id ="4";
$queryIssue->updateTransition('11205',$resolution);

like this. and by the way i used this library to do all my needs with jira. the things which are not included here, i had to implement by my self. which is easy if you know the api urls.take a look at the rest api documentation for the suitable apis you may require.

Sp3LLingzz
  • 303
  • 1
  • 3
  • 14