Jira Azure DevOps integration is the need of the day. Both platforms offer robust features but when it comes to integrating data like custom fields, things can get tricky.
This is where tools like Exalate can help, ensuring your custom data flows effortlessly between Jira and Azure DevOps.
In this blog, we'll dive into a common use case: syncing custom fields between Jira and Azure DevOps.
We'll explore the key custom fields—Text, Dropdown, and Date—and provide code snippets to illustrate how Exalate makes this process straightforward.
Custom fields allow teams to capture unique data that goes beyond standard fields like summary or status. By syncing custom fields, you ensure that all teams, regardless of the platform they use, have access to the same critical information. This leads to better collaboration, reduced errors, and a unified workflow.
Start by installing Exalate on Jira and Azure DevOps from their respective marketplaces and connect them using the Script mode.
The Script mode has incoming and outgoing sync rules written using low-code Groovy scripts. You can edit them at both integrating ends to meet your sync requirements.
To send custom field data from a Jira issue field to its corresponding Azure DevOps work item field you’d need to modify the outgoing sync rules of your Jira instance.
You would also need to receive the data coming from Jira in some work item field. For this, you’d need to modify the incoming sync rules of your Azure DevOps instance.
To do this the other way around, simply reverse the codes in the incoming and outgoing sync scripts.
That's all! Set an automatic trigger as the next step and see your data synced smoothly between the systems.
Text fields are commonly used to capture detailed information. Whether it's a technical description or customer feedback, syncing text fields ensures that all teams have a consistent narrative.
//Jira outgoing sync
replica.customFields."CF Name" = issue.customFields."CF Name"
//Azure DevOps incoming sync
workItem.customFields."CF Name".value = replica.customFields."CF Name".value
Here, we simply map the text field from Jira to Azure DevOps and vice versa. Exalate takes care of the data transformation and transmission.
Dropdown or select list fields are perfect for categorizing information, like selecting a priority level or feature type. Syncing these ensures that the categorizations are consistent across platforms.
//Jira outgoing sync
replica.customFields."CF Name" = issue.customFields."CF Name"
//Azure DevOps incoming sync
workItem.customFields."CF Name".value = replica.customFields."CF Name".value.value
The code snippet captures the dropdown object with its values in one platform and assigns it to the corresponding field in the other.
Date fields are essential for tracking deadlines, milestones, and other time-sensitive data. Keeping dates in sync prevents miscommunications and scheduling conflicts.
//Jira outgoing sync
replica.customFields."CF Name" = issue.customFields."CF Name"
//Azure DevOps incoming sync
import java.text.SimpleDateFormat
....
def sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss")
def targetDate = sdf.format(new Date())
//throw new Exception("Target date = ${targetDate}")
workItem."Microsoft.VSTS.Scheduling.StartDate" = targetDate
This snippet ensures that the date values are synchronized, keeping project timelines aligned.
Synchronizing custom fields between Jira and Azure DevOps can enhance your project's efficiency and transparency. It ensures all teams have access to the same data, regardless of the platforms they use.
Ready to sync more data between Jira and Azure DevOps? Book a demo with us and find out how!
Syed Majid Hassan -Exalate-
0 comments