Questions for Confluence license has expired.

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

Synchronising Watchers

 
1
0
-1

I am trying to sync watchers between two Jira Server instances. 


Source Side:

    replica.watchers = issue.watchers

Destination Side:

  issue.watchers = replica.watchers.collect { w ->
    def _localW = nodeHelper.getUserByEmail(w.email)
    if (_localW == null) {
        // We create a user with no permissions, and with randomly generated password
        return nodeHelper.createUser(
            w.username,
            scala.util.Random$.MODULE$.alphanumeric().take(12).mkString(), 
            w.email, 
            w.displayName
        )
    }
    _localW
    } 

However after synchronisation when I check on the issue that has been created in destination instance it does not appear that it has properly worked.  On the destination side in the filter results the watcher count is 0.  If I search for issues being watched by user the issue does not appear in the result (on the source side it does). If I go into the issue on the destination side it tells me there are two watchers, same as the source ticket.  However if I remove one from the destination side it reappears when I refresh the ticket.


Has someone successfully synchronised watchers.  Has anyone else encountered these issues.

I am only synchronising one way.  The destination is not synchronising back to the source. 

    CommentAdd your comment...