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
0
6 comments
Unfortunately it isn't possible to get issue watchers list in workflow, please follow JT-11376.
0
Avatar
Permanently deleted user
i have the same problem pls solve this issue
0
Avatar
Permanently deleted user
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
This code gets only the logged in user 'Star' tag but not all the 'Star' tags of watchers.
0

Is it possible to get watchers list now?

0

I'm afraid it's still not possible, please follow https://youtrack.jetbrains.com/issue/JT-11376 for updates. One possible way to do it is to issue a REST API request via workflow which will display all issue watchers. 

0

Please sign in to leave a comment.