如何在 JIRA 问题中设置组件?在创建新问题时,我将组件数组设置为我的id
值name
。正确的方法是什么?它也没有assignee
价值。
username = 'admin'
password = 'admin'
project = 'Dev'
jira = Savon::Client.new(
"https://something.com/rpc/soap/jirasoapservice-v2?wsdl"
)
login = jira.request(:login) do |soap|
soap.body = {
:in0 => username,
:in1 => password
}
end
login = login.to_hash
token = login[:login_response][:login_return]
def createissue jira, token, project, username
response = jira.request(:create_issue) do |soap|
soap.body = {
:in0 => token,
:in1 => {
:type => "3",
:assignee => username,
:project => project,
:summary => "API Test",
:description => "Jira's SOAP API test",
:components => [ 'id' => '10786']
#:components =>
{ 'components' =>
{ 'id' => '10786',
'name' => 'General Troubleshooting'}} # tried these
#:components =>
{ 'id' => '10786',
'name' => 'General Troubleshooting'} # tried these
# None of of the above component
# options is setting component in my issue.
# I have the correct 'id' and 'name'.
}
}
end
end
createissue jira, token, project, username
在 SOAPUI 中,它显示了所需的数据类型,但是我要为此构造 xml 吗?
<components
xsi:type="jir:ArrayOf_tns1_RemoteComponent"
soapenc:arrayType="bean:RemoteComponent[]"
xmlns:jir="https://server/rpc/soap/jirasoapservice-v2" />