我想通过jira4r gem创建一个问题并将其附加到特殊组件。我使用代码,如下所示。
jira = Jira4R::JiraTool.new(2, "http://example.com/jira/")
jira.login("robot", "robot")
issue = Jira4R::V2::RemoteIssue.new
issue.project = "ABC"
issue.type = "1"
issue.components = ['10000']
issue.summary = "Do somethigs"
issue.assignee = -1
jira.createIssue(issue)
但是存在返回错误的问题
SOAP :: FaultError java.lang.IllegalArgumentException:数组元素类型不匹配 它是由设置“组件”
引起的
您是否有一些想法如何解决?
答案 0 :(得分:2)
耶!我找到了解决方案,它可以帮助某人
component = Jira4R::V2::RemoteComponent.new(10010)
componentlist = Jira4R::V2::ArrayOf_tns1_RemoteComponent.new.push(component)
issue.components = componentlist
答案 1 :(得分:1)
根据http://confluence.atlassian.com/display/JIRA/Creating+a+SOAP+Client,您需要远程组件而不是组件ID。
像Smth一样
issue.components = [Jira4R::V2::RemoteComponent.new('10000')]