1
0
-1

Sync sprints from Jira Cloud to Jira server. 

I followed the KB 


https://docs.idalko.com/exalate/pages/viewpage.action?pageId=46203325#HowtosynchronizesprintsonJira?-JiraServer


I will sync only from Cloud (outgoing) to server (incoming). 

When i try to save the code I get this error: 


'Script cannot be saved. Details: startup failed: Script55.groovy: 1: expecting ')', found '=' @ line 1, column 51. rint" && sprint.originBoardId = "19"){ ^ 1 error '


Line 1 is: 

if(entityType == "sprint" && sprint.originBoardId = "19"){ 


19 is the board ID i got from my Sprint Active board. 


The original code from KB. 


if(entityType == "sprint" && sprint.originBoardId = "1"){
    //We only sync sprints on board with id '1'
    replica.name = sprint.name
    replica.goal = sprint.goal
    replica.state = sprint.state
    replica.startDate = sprint.startDate
    replica.endDate = sprint.endDate
    replica.originBoardId = sprint.originBoardId
}


The kb says its only available for Cloud for connections created with scripting mode, but it saw no difference. 

I have created first the project sync, and then im updating as i need with scripting, and no problems so far.

Is this the cause the error? Should I create a new connection to support this? 

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi Patricia, line:

      if(entityType == "sprint" && sprint.originBoardId = "1")

      should be

      if(entityType == "sprint" && sprint.originBoardId == "1")


      Best regards,

      Juan

      1. PATRICIA FRANCEZI

        Need to updated the docs. 

        • some of the users are not developers 


        thanks

      2. Juan Grases

        Thanks a lot for pointing out! Already fixed on docs.

        Best regards,

        Juan

      3. PATRICIA FRANCEZI

        Juan, i got this error from Jira Server side, after correcting the outgoing script


        Script error details: No such property: entityType for class: Script118. Error line: Script118.groovy:1


        Need a new topic? 

      4. Juan Grases

        Hi! Are you running a 4.7.x version of exalate on Jira Server?

      5. PATRICIA FRANCEZI

        No 4.6.0-j7 is the version client has. 

      6. Juan Grases

        Unfortunately the sprint sync is supported from 4.7.0 

      7. PATRICIA FRANCEZI

        well, updated know the error moved to

        Script error details: No such property: value for class: Script24. Error line: Script24.groovy:43

        my line 43 is the status mapping, that was working before updating

        def checkboxCollection = replica.customFields."Flagged".

                                        value?.

                                        collect{

                                                a->

                 (line43)                               nodeHelper.getOption (issue, "Flagged", a.value)

                                                }

        issue.customFields."Flagged".value = checkboxCollection


        Remembering that i still trying to sync sprints ,and divided the script in to if sprint and if issue as requested. There is no issue sync in the queue

      8. Juan Grases

        Hi Patricia, it will be better if you open a ticket in our support and we go from there into a call to look into this issue and the sync of sprints (Jira server - cloud)

        Best regards,

        Juan

      CommentAdd your comment...