How To - Integrate with Jira

    Summary: With our Jira webhook integration you are able to extend your Ziflow online proofing operations to automatically create tasks in JIRA when a new project or version is created in Ziflow.

    Where is the feature applied? To integrate Jira with Ziflow you need to click on the “Connect” tab and then click on the “+ Create Flow” button, choose "Ziflow" as the Application and choose which Event (new proof/version, decision made, new comment/reply, comment resolved, comment labeled) you want to trigger the integration.

    image8-7

    image6-16

    How does it work?

    Step 1: Set up the details for the Event that will trigger the integration. This allows you to more finely control when the integration will create a task in Jira. For this integration, you'll want to select New proof/version. This triggers when a new proof or version is ready for review.

    zibots-newproofversion

    Step 2: You will be presented with the event details page, which will vary depending on which event you select. This allows you to more finely control when the integration will create a new task in Jira. Once you've finished configuring your details then click Next.

    image2-62

    1. Triggered by - select the type of request that will trigger the Zibot.
    2. Created in - select the Ziflow folder that will be monitored by this flow.
    3. Created by - select the user that will be responsible for this flow activation.

    Step 3: choose the Webhook Zibot:

    image4-37

    Step 4: Under Create, select POST. Under URL, type in "https://{AtlassianDomain}.atlassian.net/rest/api/3/issue". You will need to replace {AtlassianDomain} with your Jira/Atlassian Domain.  Under Headers, type in "Authorization" for the key and "Basic " for the value followed by your BASE64 encoded Jira API key (NOTE: if you don't have a Jira API token, you will need to access it from your Jira account; please see the Additional Information below for more details). 

    Copy the below SDK and update {YourProjecyKey}with your Jira Project Key (NOTE: if you do not know your Jira Project Key, the project key is the prefix of your project's issue numbers (e.g. for 'TEST-100', the project is key 'TEST') in the Request body section. 

    To automatically create a new task for a project in Jira when a new proof/version is created in Ziflow:

    {
    "fields": {
       "summary": "{$.proof.name} v{$.proof.version}",
       "issuetype": {
         "name": "Task"
       },
       "project": {
         "key": "{YourProjectKey}"
       },
       "description": {
         "type": "doc",
         "version": 1,
         "content": [
           {
             "type": "paragraph",
             "content": [
               {
                 "text": "{$.comment.reviewer.email} made a new comment.\n\n{$.comment.comment}",
                 "type": "text"
               }
             ]
           }
         ]
       }
    }
    }

    Screen Shot 2020-10-13 at 11.17.53 AM

    Step 5: Click + under the Webhook you just created to create another webhook.jira-newwebhook

    Under Create, select POST. Under URL, type in "https://{AtlassianDomain}.atlassian.net/rest/api/3/issue/{$.zibot[0].data.key}/remotelink". You will need to replace {AtlassianDomain} with your Jira/Atlassian Domain.  Under Headers, type in "Authorization" for the key and "Basic " for the value followed by your BASE64 encoded Jira API key (NOTE: you will use the same BASE64 encoded Jira API key that you used for the previous webhook). 

    Copy the below SDK Request body section.

    {
       "object": {
           "url":"{$.proof.public_link}",
           "title":"View Proof"
       }
    }

    jira-newwebhook-1

    Step 6: Once you hit the “Next” button, Ziflow will confirm if the flow looks good. If there are no problems, name the flow and turn it on.

    image1-54

    And, you're done! Ziflow will now send automatically create a task to your designated Jira project.


    Additional information:

    Supporting Material: