azure - 使用 Azure 逻辑应用创建 Jira 票证时更新受让人

标签 azure automation jira azure-logic-apps jira-rest-api

我的任务是使用 Azure 逻辑应用程序在 Jira 上自动执行票证受让人。创建新票证后,Azure 逻辑应用将触发它并将票证分配给用户。

我尝试使用 HTTP 连接器更新票证受让人,但收到错误请求 enter image description here

网址:

https://company.atlassian.net/rest/api/2/{issue_Key}

正文:

  "fields": {
    "assignee": {
      "name": "employee name"
       }
     }
  }

最佳答案

从我这边复制后,只有在请求正文中包含 accountIdemailAddress 后,我才能完成这项工作。以下是我的逻辑应用流程中的完整请求正文。

{
"fields": {
    "assignee": {
    "accountId": "63f32c...",
      "emailAddress": "<YOUR_EMAIL_ADDRESS>"
       }
     }
}

enter image description here

结果:

在逻辑应用程序中运行:

enter image description here

在 Jira 仪表板中:

enter image description here

下面是我的逻辑应用的完整代码

{
    "definition": {
        "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
        "actions": {
            "HTTP": {
                "inputs": {
                    "authentication": {
                        "password": "yyy",
                        "type": "Basic",
                        "username": "yyy"
                    },
                    "body": {
                        "fields": {
                            "assignee": {
                                "accountId": "63f32c...",
                                "emailAddress": "yyy"
                            }
                        }
                    },
                    "method": "PUT",
                    "uri": "https://yyy.atlassian.net/rest/api/2/issue/10004"
                },
                "runAfter": {},
                "type": "Http"
            }
        },
        "contentVersion": "1.0.0.0",
        "outputs": {},
        "parameters": {},
        "triggers": {
            "manual": {
                "inputs": {
                    "schema": {}
                },
                "kind": "Http",
                "type": "Request"
            }
        }
    },
    "parameters": {}
}

关于azure - 使用 Azure 逻辑应用创建 Jira 票证时更新受让人,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75461568/

相关文章:

azure - 用于检索 Azure 订阅名称、资源组、资源名称、资源类型、标签和位置的 KQL 查询

selenium - Selenium 浏览器自动化中的执行流程

c# - 为什么PostMessage发送小写按键时会发送多个按键?

jira - 如何连接 Jira 和 Gerrit

java - 带空格的 URL rest api 参数

jira - 获取过去 X 小时内处理过的所有 JIRA 问题

azure - 无法在拉取请求中添加审阅者

sql-server - 如何从 SSIS 连接到使用身份验证类型 "Active Directory - Password"的 Azure DB?

azure - ARM 模板 - CustomLinuxScript 扩展失败 : Malformed status file (000003)Invalid status/status: failed

azure - 如何激活微软Azure账户?