2015-11-18 32 views
1

我试图使用WSO2 ESB的JIRA的连接器和我不知道如何使用updateIssue模块,不管我放在issueFields财产我总是获得WSO2 ESB - 吉拉连接器 - updateIssue

org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: DOCTYPE is not allowed 

当我部署它并执行时发生异常。可悲的是,没有关于如何在文档中使用该模块的详细示例。提前致谢。

WSO2 Developer Studio

回答

0

这是怎么更新在ESB工作Connector.So检查issueIdOrKey是否正确,检查issueFields的格式也将是JSON字符串的问题。

<jira.updateIssue> 
    <issueIdOrKey>ESBJAVA-2095</issueIdOrKey> 
    <issueFields>{$ctx:issueFields}</issueFields> 
</jira.updateIssue> 

要更新一个问题,使用jira.updateIssue,指定发行ID,并附上问题的JSON表示该请求作为有效载荷。您在创建问题时使用了类似的方法,但是当您做的不仅仅是设置新字段时,而是使用更新参数而不是字段。例如,如果你想改变的描述,并添加和移除标签,您可以使用更新的参数如下:

{ 
    "update": { 
     "description": [ 
      { 
       "set": "We need to update the license agreement file before shipping the 2.0 release. Please get from John Smith in the legal department." 
      } 
     ], 
     "labels": [ 
      { 
       "add": "triaged" 
      }, 
      { 
       "remove": "blocker" 
      } 
     ] 
    } 
} 

如果你只需要设置字段的值,你可以使用fields参数,而不是,这相当于使用update参数设置。有关使用fields参数的示例,请参阅创建问题。

您可以设置显式字段值或使用操作来更改字段值。可以使用/ rest/api/2/issue/{issueIdOrKey}/editmeta资源来确定fields参数或update参数中可更新的字段。如果某个字段未配置为出现在编辑屏幕上,则该字段将不在editmeta中,并且如果提交该字段,则会出现字段验证错误。 属性

issueIdOrKey: Identifies the issue to update. This can be an issue ID, or an issue key. If the issue cannot be found via an exact match, JIRA will also look for the issue in a case-insensitive way, or by looking to see if the issue was moved. 

相关JIRA API

https://developer.atlassian.com/static/rest/jira/6.1.html#d2e1209