在休息api中出错

时间:2016-09-29 04:35:12

标签: json jira jira-rest-api

使用rest api创建脚本以在java中自动记录JIRA票证 我尝试将值设置为自定义数据时遇到错误,如

Http Error : 400{"errorMessages":[],"errors":{"customfield_12400":"Operation value must be a string"}}

我只在此自定义数据字段中收到错误

  "\"customfield_12400\":{\"name\":\"Functional Defect\"}," +

在这个领域我可以记录门票 我完整的JSON

String data = "{\"fields\":{\"project\":{\"key\":\"LCH\"},\"summary\":\"" + summery + "\",\"description\": \"" + discription + "\"," +
                    "\"issuetype\":{\"name\":\"" + ticketType + "\"}," +
                    "\"customfield_11802\":\"" + clienfReffNum + "\"," +
                    "\"assignee\":{\"name\":\"vishnuk\"}," +
                    "\"versions\":[{\"name\":\"" + version + "\"}]," +
                    "\"fixVersions\":[{\"name\":\"" + fixVersions + "\"}]," +
                    "\"customfield_14101\":{\"value\":\"" + type + "\"}," +
                    "\"customfield_12400\":{\"name\":\"Functional Defect\"}," +
                    "\"customfield_10207\":{\"value\":\""+severity+"\"}}}}";

请帮我解决这个问题

1 个答案:

答案 0 :(得分:0)

你能分享customfield_12400的定义吗?这可以通过here

解释GET api/2/issue/{issueIdOrKey}/editmeta来获得
  • 编辑:添加了缺失的链接