1
0
-1

Can we map Sprint field of One Jira with Custom field of Another Jira. I have tried this in Visual Mode but unfortunately it is not possible.


I have tried writing the following 2 different scripts still I was not able to Map those fields.


  1. "MyJIRA.issue.systemFields."Sprint".1 = RemoteJIRA.issue.customFields."SIT Sprint".SIT0"


  2. "MyJIRA.issue."Sprint".1 = RemoteJIRA.issue.customFields."SIT Sprint".SIT0"


Is there any possibility to meet my requirement. Thanks in Advance.

Madhu


    CommentAdd your comment...

    2 answers

    1.  
      2
      1
      0

      Hi Madhu,


      If you want to synchronize the RemoteJira's custom field value into the Sprint field in MyJira, this line would do it:

      MyJira.issue.customFields.Sprint?.value = RemoteJira.issue.customFields."SIT Sprint"?.value


      If you want it the other way around, that the RemoteJira's customField is populated with the value of MyJira's Sprint field, then it would be:


      RemoteJira.issue.customFields."SIT Sprint"?.value = MyJira.issue.customFields.Sprint?.value


      I know the "Sprint" is a system field, but in the Exalate logic we store that field in the custom Fields so the lines above should work. 


      Let me know if this answers your questions.


      Thanks,


      André

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Hi Madhu, 

        To map the following use-case:


        Field One --> “Dev Sprint” with values 1 , 2 , 3 , 4 .
        Field two --> “Test Sprint” with values Test1, Test2, Test3, Test4.

        1 = Test1
        2 = Test2
        3 = Test3
        4 = Test4


        Please try the sync rules below.


        Incoming sync on the side which has Dev Sprint:


        def testSprintToDevSprint =
        ["Test1":"1","Test2":"2","Test3":"3","Test4":"4"]
        def devSprint = testSprintToDevSprint.find {k, _ -> 
        k.equalsIgnoreCase(replica.customFields."Test Sprint"?.value?.value)}
        if (devSprint) {
        issue.customFields."Dev Sprint".value = devSprint
        }


        Incoming sync on the side which has TestSprint


        def devSprintToTestSprint =
        ["1":"Test1","2":"Test2","3":"Test3","4":"Test4"]
        def testSprint = devSprintToTestSprint.find {k, _ -> 
        k.equalsIgnoreCase(replica.customFields."Dev Sprint"?.value?.value)}
        if (testSprint) {
        issue.customFields."Test Sprint".value = testSprint
        }



        Hope this helps.

          CommentAdd your comment...