使用带有JIRA SOAP API的PHP脚本创建JIRA问题(多选字段问题)

时间:2015-06-03 06:25:17

标签: php soap jira

我正在尝试使用 JIRA SOAP API 通过 PHP 脚本在JIRA(v6.2.5)中创建问题

代码:

$soapClient = new SoapClient("http://jira.xxx.com/jira/rpc/soap/jirasoapservice-v2?wsdl");
$token = $soapClient->login('username', 'passwd') or die('Username/Password is not correct!');
$issue = array(
    'type' => 2,
    'priority' => 3,
    'project' => 'TEST',
    'versions' => 'TEST',
    'summary' => 'Doing POC',
    "components" => array("id" => "10010"),
    'assignee' => 'samj1'
);
$soapClient->createIssue($token, $issue);

输出

Isssue是在JIRA中创建的,但是几乎没有字段。

Fields      Type        Description
------      --------    -------------
type        select      single selection dropdown for issue type
priority    select      single selection dropdown for priority
project     Text Field  Specific project name 
versions    select      Multiselect dropdown for  affected version
assignee    select      single selection dropdown for assignee
summary     text        Text field to give the summary
components  select      Multiselect dropdown for components

我遇到的问题:

除了版本和组件(muliselect字段)之外,在通过脚本创建问题时会填充其他字段。

那么有人可以指导我解决这个问题吗?

提前致谢。

0 个答案:

没有答案