Questions for Confluence license has expired.

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

Sync fixversions from Instance A to B in the visual mode

 
3
2
1

There is an example in the documentation but this is not working: https://docs.idalko.com/exalate/display/ED/Script+rules+examples


// assign fix versions from JIRA A to JIRA B
your_instance_shortname.issue.fixVersions = remote_instance_shortname.
  .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
your_instance_shortname.issue.affectedVersions = remote_instance_shortname
  .affectedVersions
  .collect { v -> nodeHelper.createVersion(issue, v.name, v.description) }


We did create every fixversion on every instance - just to be sure. Both sides are the same

  1. Francis Martens (Exalate)

    What is not working - can you provide an example

  2. SDGTLS

    there comes no error or something like that. Only no sync of fixversion. So nothing is happening. Don't know why (smile) and yes we did change the "your_instance_shortname." and "remote_instance_shortname." also in both directions

  3. Francis Martens (Exalate)

    can you inspect why it is not working?

    You can add

    debug.error("Version = ${someVersionVariable}")

    Where you replace 'someVersionVariable' with something that needs to be inspected
    This will raise an error, allowing you to see what the information is 

  4. SDGTLS

    not working, this is the errormessage:


    Errormessage.txt


  5. Francis Martens (Exalate)

    You will have to use a proper construct.  


    Script117.groovy: 3: unexpected token: . @ line 3, column 3..fixVersions

    Means that the line needs to be reviewed.  

  6. SDGTLS

    and this is not a proper construct?

    // assign fix versions from JIRA A to JIRA B
    BELLVIS.issue.fixVersions = DGTLS.
      .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
    BELLVIS.issue.affectedVersions = DGTLS
      .affectedVersions
      .collect { v -> nodeHelper.createVersion(issue, v.name, v.description) }

    Is it casesensitiv?

  7. Francis Martens (Exalate)

    Something is wrong with


    BELLVIS.issue.fixVersions = DGTLS.
      .fixVersions
  8. Serhiy Onyshchenko

    Hello, Francis Martens (Exalate) , SDGTLS 
    The problem is it should be

    BELLVIS.issue.fixVersions = DGTLS.issue
      .fixVersions
      // ensure that all the fixVersions are available on B
      .collect { v -> nodeHelper.createVersion(issue, v.name, v.description) }

    instead.
    Or better yet, check the response here for the full script and a video: Sync the epic and epic link in visual mode

CommentAdd your comment...