Once you have created your custom object and defined the field or fields that you want to use to store the data, you create the Jira webhook.
Jira lets you send webhook notifications as automations for your projects. These automations let you create more complex workflows for projects when an event occurs.
For example, you can set up an automation that will run when a new ticket is created.
Fig: Sample Jira ticket
Create the rule
- Open your project in Jira
- Click Project settings in the sidebar.
- Click Automation and then click Create rule
Set the trigger
- Select a trigger. The trigger that you choose depends on how your Oomnitza instance is configured. For example, you can set the workflow to trigger using one of the following components:
- Issue Transitioned: The Jira issue is transitioned from In Progress to Offboarding.
- Scheduled: Run a JQL search at regular intervals.
- Field value changed: Triggers when a label is added.
- Click Save.
For help with identifying the correct triggers, refer to the Jira community forums or contact Jira support.
Add a component
- Click Add component
- Click Add an action
- Search for Send web request.
- Enter the details. See Table: Web request parameters.
- Click Save
Name the automation rule
- Provide a name for the rule and set editing permissions.
- Click Turn it on.
Table: Web request parameters
Name | Details |
Web Request URL |
Enter the Oomnitza API URL. |
Headers | Add a header name "Authorization2" with the Oomnitza API key as its value. |
HTTP method | Select POST. |
Web Request body |
Select Custom data. Map the Oomnitza fields to Jira values. If you are unsure what the Oomnitza field name is, you can look it up. Click Configuration > Data Model > Field Configuration. It’s the value in the External ID field. You can use Jira smart values to send the Jira data to Oomnitza. { "jira_ticket_id": "{{issue.key}}", "offboarding_status": "Started", "employee_name": {{issue.description.substringAfter("Name: ").substringBefore("\n\n").asJsonString}}, "employee_email": {{issue.description.substringAfter("Email: ").substringBefore("\n\n").asJsonString}}, "department": {{issue.description.substringAfter("Department: ").substringBefore("\n\n").asJsonString}}, "assigned_to": "{{issue.assignee.displayName}}" } How you access the Jira smart values will depend on how you store the information in your Jira ticket. For help creating Jira smart values, contact Jira support or review these articles: Atlassian Support: Automation for Jira 8.2: Documentation: Smart values in Jira automation. Atlassian Support: Resources: Jira Cloud Automation: Smart values in Jira automation |
Fig: Sample web request
Comments
0 comments
Please sign in to leave a comment.