Questions for Confluence license has expired.

Please purchase a new license to continue using Questions for Confluence.

Affected Version won't sync from project A to project B

 
1
0
-1

I'm using Jira Cloud with a Visual Sync and some scripting. Right now my sync is working perfectly for everything except for Affects version. We have automation that creates the versions in all projects when it's created in one, so it's not an issue of the version not existing. 


Also, prior to deciding to move to a visual sync plus script when I was just using script, the version sync was working just using the replica.version = issue.version code, but that also doesn't work in this case. 


I am using a direct cut and paste of the script suggested here: https://docs.idalko.com/exalate/display/ED/Script+rules+examples


Here is my script:

// assign fix versions from JIRA A to JIRA B
ServiceDesk.fixVersions = Main
  .fixVersions
  // ensure that all the fixVersions are available on B
  .collect { v -> nodeHelper.createVersion(issue, v.name, v.description) }
// assign affected versions from JIRA A to JIRA B
ServiceDesk.issue.affectedVersions = Main
  .affectedVersions
  .collect { v -> nodeHelper.createVersion(issue, v.name, v.description) }

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Did you check the content of the Main.affectedVersions?


      Incoming | Untested
      debug.error("Main.affectedVersions = ${Main.affectedVersions.properties}")
      1. Destri Weir

        Can I do this sort of debugging with Jira Cloud? 

      2. Francis Martens (Exalate)

        Yes.  the debug.error results in an error containing the provided message

        Give it a try.

      3. Destri Weir

        Thank you! Using that info and the info here: https://docs.idalko.com/exalate/display/ED/How+to+use+scripts+in+Visual+connections, I was able to get the version sync to work. 

      CommentAdd your comment...