【发布时间】:2016-11-29 13:34:17
【问题描述】:
我正在尝试使用 Jenkins 和 Jira Trigger 插件为 Jenkins 设置一些自动化。我在 Jira 端设置了一个网络钩子,可以根据需要在 Jenkins 上调用构建。
我无法从传入的 Jira 请求中获取自定义字段的值。
我正在尝试使用“问题属性路径”功能,并且我还提到了帖子 (How to use the 'Issue attribute path' in the parameter mapping of jenkins-trigger-plugin)
但是,我仍然无法获得自定义字段 customfield_10010、customfield_10011 的值。我尝试过像fields.customfield_10010、fields.customfield_10010.value、fields.customfield_10010.0.value、customfield_10010.0.value 和类似组合这样的映射。我能够按照插件帮助中的建议获得其他标准字段的价值。例如:status.name、description 等
我也无法从Jira documentation site 那里得到任何线索。
部分传入的json数据如下,方便参考。
"issue": {
"id": "1000x",
"self": "http://localhost:3080/rest/api/2/issue/10007",
"key": "ABC-2",
"fields": {
"issuetype": {
..
},
"parent": {
..
},
"components": [
],
"timespent": null,
"timeoriginalestimate": 28800,
"description": ".....",
"project": {
..
},
"customfield_10010": [
{
"self": "http://localhost:3080/rest/api/2/customFieldOption/10019",
"value": "ABC-Custom 1",
"id": "10019"
}
],
"fixVersions": [
],
"customfield_10011": [
{
"self": "http://localhost:3080/rest/api/2/customFieldOption/10021",
"value": "ABC-Custom 2",
"id": "10021"
}
],
.....
....
....
}
}
【问题讨论】:
-
这不是一个已实现的功能。见:JENKINS-38797