skip to Main Content

I have task for automating ticket assignee on Jira using Azure logic app. When new ticket is created Azure logic app will trigger it and assign ticket to a user.

I tried using the HTTP connector to update the ticket assignee but I got Bad Request
enter image description here

URL:

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

Body:

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

2

Answers


  1. I don’t know how it is done via the API.
    I used JSM automations to solve the problem.
    I created an automation within JSM which will update the ticket when it is moved to active and also syncs the assignee.

    Maybe you can try something like that 🙂

    Login or Signup to reply.
  2. After reproducing from my end, I could get this work only after including the accountId along with emailAddress in the request body. Below is the complete request body in my logic app flow.

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

    enter image description here

    Results:

    In Logic App run:

    enter image description here

    In Jira dashboard:

    enter image description here

    Below is the complete code of my logic app

    {
        "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": {}
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search