Project

General

Profile

Plugin Custom Redmine_Custom_Workflows (Email, Watchers list), Custom email notification

Added by Moritz Koehler over 9 years ago

Hi community,

I have a question regarding manipulating the watchers list.

I would like to send users emails when a custom field has a certain value. At the moment my best idea is to use the Custom Workflows plug in and check if the value is set and than add them to the watchers list. Does someone know if is possible to manipulate the watchers list? or is it even possible to send a mail direly via the Custom Workflows plug in ?

If there are other ways to gain an custom email notification, I would also be happy to learn about it.

thank you in advance for your help

Kind Regards

Moritz

http://www.redmine.org/plugins/custom-workflows


Replies (2)

RE: Plugin Custom Redmine_Custom_Workflows (Email, Watchers list), Custom email notification - Added by Philip Lapczynski almost 9 years ago

I am looking to do the same thing. I have three custom fields that have users in them. I would like to automatically add all the entries in my "user" type custom fields as watchers.

There is a way to do it via the REST api. There must be a way to do it via ruby also.
http://www.redmine.org/projects/redmine/wiki/Rest_Issues#Updating-an-issue

RE: Plugin Custom Redmine_Custom_Workflows (Email, Watchers list), Custom email notification - Added by @ go2null about 8 years ago

With Custom Workflows plugin, here is a sample to add the current user to the Watchers.


def add_project_user_as_watcher(user = User.current)
    if addable_watcher_users.include?(user)
        self.add_watcher(user) unless watched_by?(user)
    end
end

if subject.present?
    add_project_user_as_watcher
end

https://github.com/anteo/redmine_custom_workflows/

    (1-2/2)