我正在尝试使用WSO2 ESB中的JIRA连接器,我不知道如何使用 updateIssue 模块,无论我在 issueFields 中放置什么属性我总是得到
$subdomain = 'test.example.com';
$protocol = 'https';
$redirectURL = 'www.somedomain.com/redirect?someparam';
$bucketID = $s3->createBucket(['Bucket' => $bucket ]);
$arg = array(
'Bucket' => $bucket,
'WebsiteConfiguration' => array(
'RedirectAllRequestsTo' => array('HostName' => $redirectURL, 'Protocol'=>$protocol),
),
);
$result = $s3->putBucketWebsite($arg);
部署并执行时出现异常。遗憾的是,没有详细的示例说明如何在文档中使用此模块。提前谢谢。
答案 0 :(得分:0)
This is how Updating an issue working in ESB Connector.So check issueIdOrKey is correct or not and check the format of issueFields also it will be JSON string.
<jira.updateIssue>
<issueIdOrKey>ESBJAVA-2095</issueIdOrKey>
<issueFields>{$ctx:issueFields}</issueFields>
</jira.updateIssue>
To update an issue, use jira.updateIssue, specify the issue ID, and attach the JSON representation of the issue to the request as the payload. You use a similar approach as when creating an issue, but use the update parameter instead of fields when you're doing more than simply setting a new field. For example, if you wanted to change the description and add and remove labels, you could use the update parameter as follows:
{
"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"
}
]
}
}
If you just need to set the value of fields, you can use the fields parameter instead, which is the equivalent of using set with the update parameter. See Creating an issue for an example of using the fields parameter.
You can either set the explicit field values or use an operation to change the field value. The fields that can be updated, in either the fields parameter or the update parameter, can be determined using the /rest/api/2/issue/{issueIdOrKey}/editmeta resource. If a field is not configured to appear on the edit screen, it will not be in the editmeta, and a field validation error will occur if it is submitted. Properties
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.
Related JIRA API
https://developer.atlassian.com/static/rest/jira/6.1.html#d2e1209