Integrate Jira with webhooks
Learn to automate creating Jira tickets using webhooks in Test Observability.
BrowserStack Test Observability provides custom payload templates to integrate webhooks with Jira.
Follow these steps to integrate webhooks with Jira:
- Open Settings > Webhooks of your project and click Create webhook.
- Enter a webhook name and select an event type.
- Click Add trigger condition and configure filters from the available options.
- Click Create Jira ticket.
- By default,
POST
method and the URL to Jira’s issues API is selected. You can selectPUT
method or change the URL if you need to. You can also click + to add variables to the URL. - Edit the payload body including the variables and key-value pairs according to your specific use case. You can include variables by clicking the Variables menu and selecting any variable. You can refer to the annotations in the following example to know what all you need to update:
{ "fields": { "project": { // Specifies the project where the issue will be created. "id": "<your project id>" // Replace with the unique ID of the project. }, "summary": "Test Failure: ", // The summary of the issue, dynamically including the test name. "description": { // Detailed description of the issue, using a rich-text format. "type": "doc", // Specifies the type of content (here, a document object). "version": 1, // Version number for the description format. "content": [ { "type": "paragraph", // Specifies that the content is a paragraph. "content": [ { "text": "Build Information:\nBuild Name: \nBuild Status: \nBuild Duration: \n\nTest Information:\nTest Name: \nTest Duration: \nError: \n\nView detailed report: ", // The text content, dynamically populated with placeholders for build and test details. "type": "text" // Specifies that the content type is plain text. } ] } ] }, "issuetype": { // Specifies the type of issue being created, such as a bug or task. "id": "<your issue type id>" // Replace with the unique ID of the issue type. }, "labels": [ // Labels associated with the issue for categorization and filtering. "test-failure", // Label indicating the issue relates to a test failure. "automated" // Label indicating the issue was created automatically. ] } }
- Select the type of Authorization from the Authorization tab and provide the credentials.
- Add optional headers as key-value pairs from the Headers tab.
- Add optional parameters as key-value pairs from the Parameters tab.
- Switch on Re-trigger webhook if the build starts passing if you want to retrigger the webhook when the build passes.
- Click Test Webhook.
- Click Create.
These steps using the built-in template for Jira simplifies the integration. However, you can also refer to the original API to create an issue in Jira.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!