Hi All,
I am struggling to add watcher to an issue, the problem here is that
def user = userManager.getUserObject("userid")
if (user) watcherManager.startWatching(user, issue)
the above snippet works fine if it's placed in the post-function of the "issue", but what i am trying to achieve is that I am trying to clone an issue using script runner and during that process I am trying to add the assignee of the original issue as a watcher in the issue to be cloned and all this is in the post-function of the original issue thus while logging i get the error
[jira.issue.watchers.DefaultWatcherManager] You must specify an issue.
As I understand the above error is because the issue to be cloned as not yet been created and I am trying to add a watcher to it but is there another way to fix this problem apart from wirting a post-funciton in the cloned issue
Thanks!