如何忽略创建 jira api 请求有效负载中的额外字段?



我正在我的应用程序中进行 Jira 集成。不同的问题类型(如故事/任务/支持事件(具有一组不同的字段,要添加以创建给定问题类型的问题。

我有一个共同的POJO,其中包含所有类型的问题的字段。当我点击 Jira API 创建故事类型的问题时,它失败了,说字段(问题类型支持事件需要(在屏幕上不可用。

{
"errorMessages": [],
"errors": {
"key1": "Field 'key1' cannot be set. It is not on the appropriate screen, or unknown.",
"key2": "Field 'key2' cannot be set. It is not on the appropriate screen, or unknown.",
"customfield_10216": "Field 'customfield_10216' cannot be set. It is not on the appropriate screen, or unknown.",
"customfield_21263": "Field 'customfield_21263' cannot be set. It is not on the appropriate screen, or unknown.",
"customfield_10704": "Field 'customfield_10704' cannot be set. It is not on the appropriate screen, or unknown.",
"customfield_10212": "Field 'customfield_10212' cannot be set. It is not on the appropriate screen, or unknown."
}
}

如何忽略 Jira API 中的未知字段?

由于您正在创建问题,因此我认为您必须将自定义字段添加到问题创建屏幕。

在屏幕上查看您的项目设置:

( http:///plugins/servlet/project-config//screens (

然后打开用于创建问题的屏幕。查看网址。在那里你可以看到屏幕ID。

在该表单中,您还可以将自定义字段添加到屏幕。

https://community.atlassian.com/t5/Jira-questions/quot-Field-customfield-10012-cannot-be-set-It-is-not-on-the/qaq-p/664236

最新更新