Closed Hernan22 closed 3 months ago
Something like that as an after_save script might work:
if subject.present? && journals.all.size == 0
project.members.each do |m|
add_watcher(m.user) unless watched_by?(m.user)
end
end
Thanks, it worked!
Hello again, how can I exclude the 'cliente' role with ID 10 from being added to the watchers?
Best regards
if subject.present? && journals.all.size == 0
project.members.each do |m|
add_watcher(m.user) unless watched_by?(m.user) || m.role.id == 10
end
end
Thank you, but it doesn't work, it doesn't add anyone as followers.
And is there a member who is not among watchers yet and hasn't got role id 10?
How can I add all members of a project as watchers when an issue is created?