updating status in jira via php

雨燕双飞 提交于 2019-12-02 20:22:46

问题


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.


回答1:


Well you're missing the "transition identifier" as it says in the error you're getting.

What library are you using?

Is this a custom class you wrote or?

Provide it with a link so that we could check.




回答2:


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.



来源:https://stackoverflow.com/questions/14108563/updating-status-in-jira-via-php

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!