Skip to end of banner
Go to start of banner

Create an Azure DevOps work item when a Jira issue is created

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

This examples shows an Easy Integrations listener to create an Azure DevOps work item when a Jira issue is created.

Configuration Steps

1- Open Azure DevOps profile and create a Personal Access Token (PAT) with the maximum Expiration date. Don't forget to note the token!



2- Open Jira > Easy Integrations configuration > Credentials, and add a new Basic Authorization credential with the PAT information.


3- Open Jira > Easy Integrations configuration > Listeners, and add a Listener with the following information.

FieldDescription Example value
Listener nameGive a name to trackAzure DevOps Integration

Works only when enabledChecked
Retry attempt countWhen something went wrong, number of retry count3
EventsOnly one event is enough for the example

JQL can be different, this example listens only Bug issues.

Event fieldExample value

JQL supported
EventsIssue created
JQLissuetype = Bug
ConditionPre-condition of the listener.Checked

Let's process issues those only have description starting with Goodreturn lodash.startsWith(data.event.issue.fields.summary, 'Good');
Action 1Add a new "Call a Rest API" action
Action fieldExample
Action nameCreate an Azure DevOps Ticket
ConditionUnchecked

var parameters = {};
parameters['issue key'] = data.event.issue.key;
parameters['issue summary'] = data.event.issue.fields.summary;
parameters['issue status'] = data.event.issue.fields.status.name;
return parameters;
URLhttps://dev.azure.com/{organization}/{project}/_apis/wit/workitems/$task?api-version=6.0
MethodPOST
HeadersAccept=*/*
Cache-Control=no-cache
Content-Type=application/json-patch+json

Basic
CredentialSelect the Credential that is created on second step

[
{
  "op": "add",
  "path": "/fields/System.Title",
  "from": null,
  "value": "{{issue summary}}"
},
{
  "op": "add",
  "path": "/fields/System.Description",
  "from": null,
  "value": "Jira issue is {{issue key}} and status is {{issue status}}."
}
]
Action 2Add a new "Update a Jira issue" action
Action fieldExample
Action nameAdd Azure DevOps work-item link to Jira issue
ConditionUnchecked

Unchecked

Checked
Issue fields

We will save work item link to a text custom field



FieldSelect a text Custom Field

return data.apiData.api1.responseBody._links.html.href

Unchecked
Save
Click Submit to save

4- Create a Jira bug issue. If everything went well, a new Azure DevOps work item should be created and all operations should be logged to Execution Logs.


5- Extra: Audit log will display the created Listener configuration logs. Any future updates will be logged as well.

Example Screenshots

Listener screen

First Action


Second Action


Execution Logs



  • No labels