diff --git a/etemplate/inc/class.bo_tracking.inc.php b/etemplate/inc/class.bo_tracking.inc.php index aeb9540375..b3fb6f40c7 100644 --- a/etemplate/inc/class.bo_tracking.inc.php +++ b/etemplate/inc/class.bo_tracking.inc.php @@ -491,6 +491,20 @@ abstract class bo_tracking $email_sent[] = $email; } + // members of group when entry owned by group + if ($this->creator_field && $GLOBALS['egw']->accounts->get_type($data[$this->creator_field]) == 'g') + { + foreach($GLOBALS['egw']->accounts->members($data[$this->creator_field],true) as $u) + { + if (($email = $GLOBALS['egw']->accounts->id2name($u,'account_email')) && + !in_array($email, $email_sent)) + { + $this->send_notification($data,$old,$email,$u,'notify_owner_group_member'); + $email_sent[] = $email; + } + } + } + // assigned / responsible users if ($this->assigned_field) { diff --git a/infolog/inc/class.infolog_hooks.inc.php b/infolog/inc/class.infolog_hooks.inc.php index 4997d90c17..3e2f901dc7 100644 --- a/infolog/inc/class.infolog_hooks.inc.php +++ b/infolog/inc/class.infolog_hooks.inc.php @@ -371,6 +371,17 @@ class infolog_hooks 'default'=> '0d', // Same day ); + // receive notification for items owned by groups you are part of + $settings['notify_owner_group_member'] = array( + 'type' => 'check', + 'label' => 'Receive notifications about items of type owned by groups you are part of', + 'name' => 'notify_owner_group_member', + 'help' => 'Do you want a notification if items owned by groups you are part of get updated ?', + 'xmlrpc' => True, + 'admin' => False, + 'default'=> '0', // No + ); + // Merge print if ($GLOBALS['egw_info']['user']['apps']['filemanager']) {