1
0
-1

Hi,


I have a problem with syncing ADO custom field's to Jira Cloud.

The following fields are defined in ADO:

  • "Start Date"
  • Effort


on ADO side the outgoing script looks like this:

replica.customFields."Start Date" = workItem.customFields."Start Date"
replica.customFields."Effort"     = workItem.customFields."Effort"

on Jira Cloud side the incoming script looks like this:

if (replica.customFields."Start Date") {
   issue.customFields."10015" = replica.customFields."Start Date".value ?: ""
}
if (replica.customKeys."Effort") {
   issue.customFields."10363" = replica.customKeys."Effort".value ?: ""
}

On ADO side the 3 fields have a value but in Jira the fields are empty and there is no error during the sync.

I also tried it on Jira side with the field name and also with the ".value" extension without any success.


Where is my mistake?


Best regards

Thorsten

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Hi Thorsen!

      The answer was also provided on the ticket opened, but here is the answer as well.


      ADO Outgoing

      replica."start" = workItem."Microsoft.VSTS.Scheduling.StartDate"
      replica."target" = workItem."Microsoft.VSTS.Scheduling.TargetDate"

      Jira Incoming

      import java.text. SimpleDateFormat;
      import java.text.DateFormat;
      def datePattern = "yyyy-MM-dd HH:mm:ss";
      DateFormat formatter = new SimpleDateFormat(datePattern);
      dateString = replica."start"
      dateString = dateString.replaceAll("T"," ").trim();
      dateString = dateString.replaceAll("Z"," ").trim();  
      date = formatter.parse(dateString);
      issue.customFields."Start date".value = date
      
      



      Have a great day
        CommentAdd your comment...
      1.  
        1
        0
        -1

        Hi Thorsten, 


        Thank you for connecting via community portal. I would suggest you check these articles: 


        How to sync Start Date across 2 Jira instances?


        https://docs.exalate.com/docs/how-to-synchronize-custom-fields-in-jira-cloud



        I hope that the shared information will be helpful and let me know the outcome. 


        BR, 

        Jillani

        1. Thorsten

          Hi Jillani,

          as mentioned I also tried it with these lines:

          ADO Outgoing
          replica.customFields."Start Date" = workItem.customFields."Start Date"


          Jira Incoming
          if (replica.customFields."Start Date") {
             issue.customFields."Start Date".value = replica.customFields."Start Date".value ?: ""
          }


          This is also described in the two links you provided. But it just doesn't work, no data is simply entered into the field in Jira.


          Therefore, your answer was unfortunately not effective. disappointed face 


          What also confuses me a bit is that the field exists with a value in ADO, but when I check the ticket via an API request the "Start Date" field doesn't appear. But the effort field does and that is not synchronized either.


          BR,

          Thorsten

        CommentAdd your comment...