我的任务是使用 Azure 逻辑应用程序在 Jira 上自动执行票证受让人。创建新票证后,Azure 逻辑应用将触发它并将票证分配给用户。
网址:
https://company.atlassian.net/rest/api/2/{issue_Key}
正文:
"fields": {
"assignee": {
"name": "employee name"
}
}
}
最佳答案
从我这边复制后,只有在请求正文中包含 accountId
和 emailAddress
后,我才能完成这项工作。以下是我的逻辑应用流程中的完整请求正文。
{
"fields": {
"assignee": {
"accountId": "63f32c...",
"emailAddress": "<YOUR_EMAIL_ADDRESS>"
}
}
}
结果:
在逻辑应用程序中运行:
在 Jira 仪表板中:
下面是我的逻辑应用的完整代码
{
"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/