【问题标题】:Send Jira Issue Description text as ADF table in Jira REST API在 Jira REST API 中将 Jira 问题描述文本作为 ADF 表发送
【发布时间】:2022-06-13 05:04:16
【问题描述】:

我正在尝试通过发送 ADF 表来更新问题描述。我的javascript代码如下。

    {
    "fields" : {
        "description": {
    "version": 1,
    "type": "doc",
    "content": [
      {
  "type": "table",
  "attrs": {
    "isNumberColumnEnabled": false,
    "layout": "default"
  },
  "content": [
    {
      "type": "tableRow",
      "content": [
        {
          "type": "tableCell",
          "attrs": {},
          "content": [
            {
              "type": "paragraph",
              "content": [
                {
                  "type": "text",
                  "text": " Row one, cell one"
                }]
              }]
            },
          {
            "type": "tableCell",
            "attrs": {},
            "content": [
                {
              "type": "paragraph",
              "content": [
                {
                  "type": "text",
                  "text": "Row one, cell two"
                } ]
              }]
            }]
          }]
        }]
      }
    }
  }

我得到的错误是“description”:“Operation value must be a string”。不确定我做错了什么,因为看起来我的 ADF 格式正确。

这是通过rest api调用jira cloud。

【问题讨论】:

    标签: jira


    【解决方案1】:

    找到了答案。 URL 必须是 api 的版本 3。仅仅拥有“最新”是行不通的。示例“https://mycompany.atlassian.net/rest/api/3/issue/45379”而不是“https://mycompany.atlassian.net/rest/api/latest/issue/45379”。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-01-23
      • 2022-10-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-09-28
      相关资源
      最近更新 更多