通过php更新jira中的状态 [英] updating status in jira via php
问题描述
我使用我构建的电子邮件客户端来更新jira任务.我设法通过它更改了受让人和摘要.但我似乎无法找到一种更新状态的方法.以下是我使用的代码.
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);
课程:
public function updateTransition($issueKey,$json){
$this->request->openConnect('https://'.$this->host.'/rest/api/latest/issue/REC-143/transitions?', 'POST', $json);
$this->request->execute();
}
这给我一个错误的说法
Missing 'transition' identifier
我在这里做错了.请让我知道.
this gives me an error saying
Missing 'transition' identifier
what am i doing wrong here.please let me know.
推荐答案
我输入json的方式不正确.应该是
the way i input the json was incorrect.it should be,
$resolution->transition->id ="4";
$queryIssue->updateTransition('11205',$resolution);
像这样.顺便说一下,我使用此库来满足我对jira的所有需求.这些未包括在这里的东西,我必须靠自己去实现.如果您知道api网址,这很容易.请查看其余api文档中可能需要的合适api.
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.
这篇关于通过php更新jira中的状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!