<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Email notification: Alerting a subset of the principals? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/email-notification-alerting-a-subset-of-the-principals/m-p/323302#M10303</link>
    <description>&lt;P&gt;same as &lt;A href="http://answers.nuxeo.com/questions/3049/how-to-exclude-administrator-from-documentgetusersandgroups-operation"&gt;http://answers.nuxeo.com/questions/3049/how-to-exclude-administrator-from-documentgetusersandgroups-operation&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I built up the intersection using the &lt;STRONG&gt;run script&lt;/STRONG&gt; operation :&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;Context["mail_to_read"])&lt;/CODE&gt; = emails of "users with a given permission" including administrators&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;Context["mail_administrators"])&lt;/CODE&gt; : emails of administrators&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;foreach ( mail_administrator : Context["mail_administrators"]) 
{
    if( Context["mail_to_read"].indexOf(mail_administrator) &amp;gt;= 0 )
    {
        Context["mail_to_read"].remove(Context["mail_to_read"].indexOf(mail_administrator));
    } 
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and &lt;CODE&gt;Context["mail_to_read"]&lt;/CODE&gt; has been cleaned up of the administrators&lt;/P&gt;</description>
    <pubDate>Wed, 26 Sep 2012 08:52:32 GMT</pubDate>
    <dc:creator>pibou_Bouvret</dc:creator>
    <dc:date>2012-09-26T08:52:32Z</dc:date>
    <item>
      <title>Email notification: Alerting a subset of the principals?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/email-notification-alerting-a-subset-of-the-principals/m-p/323301#M10302</link>
      <description>&lt;P&gt;The &lt;A href="http://doc.nuxeo.com/display/Studio/Create+a+task+assignment+alert"&gt;Create a task assignment alert&lt;/A&gt; tutorial presents a method for writing an automation chain that notifies the principals (users with a given permission) on a document under some condition. But I would like to only send emails to users who have opted into email notification. For example, an office manager may be a principal, but her delegate routinely processes this type of work, so only her delegate should receive notifications.&lt;/P&gt;
&lt;P&gt;I was considering creating a group, "People who want Email Notifications," and taking the set-intersection of this group with the principals of the document. (In my example, the office manager and the delegate are both principals; but only the delgate is in the "Email" group.)&lt;/P&gt;
&lt;P&gt;Is it possible, in Studio, to "filter" the set of principals using such a group? If not, do you have better suggestions for other ways to model opt-in/opt-out notifications?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2012 22:06:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/email-notification-alerting-a-subset-of-the-principals/m-p/323301#M10302</guid>
      <dc:creator>Graham_Fawcett</dc:creator>
      <dc:date>2012-09-25T22:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Email notification: Alerting a subset of the principals?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/email-notification-alerting-a-subset-of-the-principals/m-p/323302#M10303</link>
      <description>&lt;P&gt;same as &lt;A href="http://answers.nuxeo.com/questions/3049/how-to-exclude-administrator-from-documentgetusersandgroups-operation"&gt;http://answers.nuxeo.com/questions/3049/how-to-exclude-administrator-from-documentgetusersandgroups-operation&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I built up the intersection using the &lt;STRONG&gt;run script&lt;/STRONG&gt; operation :&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;Context["mail_to_read"])&lt;/CODE&gt; = emails of "users with a given permission" including administrators&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;Context["mail_administrators"])&lt;/CODE&gt; : emails of administrators&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;foreach ( mail_administrator : Context["mail_administrators"]) 
{
    if( Context["mail_to_read"].indexOf(mail_administrator) &amp;gt;= 0 )
    {
        Context["mail_to_read"].remove(Context["mail_to_read"].indexOf(mail_administrator));
    } 
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and &lt;CODE&gt;Context["mail_to_read"]&lt;/CODE&gt; has been cleaned up of the administrators&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2012 08:52:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/email-notification-alerting-a-subset-of-the-principals/m-p/323302#M10303</guid>
      <dc:creator>pibou_Bouvret</dc:creator>
      <dc:date>2012-09-26T08:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: Email notification: Alerting a subset of the principals?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/email-notification-alerting-a-subset-of-the-principals/m-p/323303#M10304</link>
      <description>&lt;P&gt;Thank you! I'll give this a try.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2012 16:03:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/email-notification-alerting-a-subset-of-the-principals/m-p/323303#M10304</guid>
      <dc:creator>Graham_Fawcett</dc:creator>
      <dc:date>2012-09-26T16:03:29Z</dc:date>
    </item>
  </channel>
</rss>

