首页 > 解决方案 > “服务:需要服务。” - 无法创建 jira 服务台项目问题

问题描述

我正在尝试使用 v2 REST API 创建 Jira 服务台项目问题。我正在传递所有必填字段值,但 Jira 抛出错误。

响应状态代码:400

{
    "errorMessages": [
        "Service: Service is required."
    ],
    "errors": {}
}

分享以下数据,

为创建服务台事件而发送的数据,

{
  "fields": {
    "project": {
      "key": "GSD"
    },
    "issuetype": {
      "name": "Incident"
    },
    "customfield_10402": "test",
    "customfield_12608": {
      "id": "15300"
    },
    "summary": "Test Ticket Please ignore - Jira Testing",
    "description": "this is description"
  }
}

其中customfield_10402是一个字符串字段,而customfield_12608是一个下拉字段。

项目详情:

"projectCategory": {
            "self": "https://domain.atlassian.net/rest/api/2/projectCategory/10400",
            "id": "10400",
            "name": "Service Desks",
            "description": "Customer facing service desk containers, sitting behind single support portal site"
        },
        "projectTypeKey": "service_desk",
        "simplified": false,
        "style": "classic",
        "isPrivate": false,
        "properties": {}

标签: jirajira-rest-api

解决方案


我相信上面的请求结构用于创建 Jira 问题。

您正在寻找的是创建服务台请求。

Jira Service Desk 创建应如下所示

{
    "serviceDeskId": "10",
    "requestTypeId": "25",
    "requestFieldValues": {
        "summary": "Request JSD help via REST",
        "description": "I need a new mouse for my Mac"
    },
    "requestParticipants": [
        "john"
    ]
}

请在此处找到更多信息 JIRA Service Desk REST API 参考


推荐阅读