Closed DolezalDavid closed 4 years ago
Nobody? It would be very useful... ;-)
OK, here is solution which work for me OK!
# = after_save = #
# assignee - do this after save because assignee may
# be assigned by Category or by assignee plugin
if self.assigned_to.is_a?(Group)
arr = Array.new
arr = Group.find(self.assigned_to_id).user_ids
for item in arr
self.add_watcher(User.find(item)) unless self.watched_by?(User.find(item))
end
end
but must before check if the assigne have permision to added watcher??
becasue i have error msgwatcher unvalid
@DolezalDavid
Hi, I have issue, where is a group as assignee. How do I set up all users from group as watchers?
I try edit this part from "Example Workflows" but unsuccessfully
Can you help me with this please?
With best regards David