# Problems syncing 'Target Date' field from Azure DevOps to Jira Cloud

**URL:** <https://community.exalate.com/t/problems-syncing-target-date-field-from-azure-devops-to-jira-cloud/5273>\
**Category:** General Questions\
**Tags:** exalate, azuredevops-jiraclou, azuredevops, jira-cloud, migrated\_question\
**Created:** [November 4, 2024, 7:54am UTC](https://community.exalate.com/t/problems-syncing-target-date-field-from-azure-devops-to-jira-cloud/5273 "2024-11-04T07:54:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 7:54am UTC](https://community.exalate.com/t/problems-syncing-target-date-field-from-azure-devops-to-jira-cloud/5273/1 "2024-11-04T07:54:52Z")

</div>

_Originally asked by Chris Rogers on 13 August 2022 [(original question)](https://oldcommunity.exalate.com/questions/58493556)_

* * *

Hello,

I am trying to set up a one-way sync between Azure DevOps (source) and Jira Cloud (destination). I have the sync working with the exception of the Target Date field.

The remote payload shows the date as follows:

customKeys": {  
“Target Date”: “2022-01-31T00:00:00Z”  
}

I’ve followed another users example here: [Sync Due Date from Azure DevOps to JIRA cloud](https://oldcommunity.exalate.com/display/exacom/questions/42833066/sync-due-date-from-azure-devops-to-jira-cloud)_(old community)_

But keep getting an error when trying to format the data as a date. When I try to put that data into a text field for troubleshooting, I get a weird field value ([B@2abd3e2c). I feel like I’m close but missing something obvious, has anyone else had issues with this and if so, how did you resolve them?

Thanks!

* * *

#### Comments:

> **Jose Pablo Alpizar Hidalgo commented on 15 August 2022**
>
> > Hello Chris Rogers
> 
> Just to narrow down the case, would you please verify that the definition is set well set on the Azure DO project by following the next article’s steps:  
> [https://keithbabinec.com/2021/02/28/how-to-visually-highlight-overdue-work-items-on-an-azure-devops-sprint-board/](https://keithbabinec.com/2021/02/28/how-to-visually-highlight-overdue-work-items-on-an-azure-devops-sprint-board/)  
> Would you please also share with us what is your connection type is and the error message you get?

---

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 7:54am UTC](https://community.exalate.com/t/problems-syncing-target-date-field-from-azure-devops-to-jira-cloud/5273/2 "2024-11-04T07:54:53Z")

</div>

_Answer by Chris Rogers on 16 August 2022_

Hi Jose,

Confirmed. The Target Date field is set up as a Date/Time field in ADO. I first tried to set this up as a visual connection with a small script to copy the value over but that didn’t work so I’ve setup a scripted connection.

The error I get is: Cannot format given object as a Date.

* * *

#### Comments:

> **Ariel Aguilar commented on 16 August 2022**
>
> > Hi Chris,
> 
> I guess you are trying to sync to a date and time picker custom field in Jira Cloud?
> 
> Kind regards,
> 
> Ariel

> **Chris Rogers commented on 17 August 2022**
>
> > Hi Ariel,
> 
> I am trying to take a work item in Azure DevOps and sync several fields into an issue in Jira Cloud. I’ve got the rest of the sync working, but the date/time picker from Azure DevOps (named Target Date) syncing into Jira Cloud (also named Target Date) is proving to be a challenge.

> **Ariel Aguilar commented on 17 August 2022**
>
> > Try this:
> 
> ```auto
> issue.customFields."Target Date".value = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").parse(replica.customKeys."Target Date".replace("Z","CST"))
> 
> ```
> 
> When parsing the text the Z it is expecting a value instead of variable, so to get it sorted we are replacing the Z by an abbreviation of the system timezone so make sure the value gets properly added. Otherwise, so might get the value added with the default UTC offset timezone provided by the API.
> 
> Kind regards,
> 
> Ariel

> **Chris Rogers commented on 19 August 2022**
>
> > Hi Ariel,
> 
> Thanks! This was what I was looking for and worked wonderfully; the time zones don’t match between the instances but we can live with that for now.
> 
> Thanks so much!
