How to get a list of watchers of issue by the workflow?

Hello,

I'm trying to change one of my attributes (field) on certain event, but keep getting "Cannot set value to custom field ".

rule FLOW
 when State.becomes({Fixed})
{
  message("well done");
  issue.FatherState={Resolved};
}

The first line (message) works, but the second isn't.
I tried to change to just "FatherState" and nothing happened.
"Resolved" is one of the enums for the certain field.

Can you please help me?

Thanks,
Etay
4 comments
Comment actions Permalink
Unfortunately it isn't possible to get issue watchers list in workflow, please follow JT-11376.
0
Comment actions Permalink
i have the same problem pls solve this issue
0
Comment actions Permalink
Dmitry is not right. You can get list of watchers using tags property. Watchers are simply 'Star' tags.

for each tag in issue.tags {
  if (tag.name == "Star") {
    var watcher = tag.owner;
    ... do what you want with watcher ...
  }
}
0
Comment actions Permalink
This code gets only the logged in user 'Star' tag but not all the 'Star' tags of watchers.
0

Please sign in to leave a comment.