Re: 2.3: emailing chief editors in publication workflow

Andy Altepeter <[email protected]> Fri, 14 Oct 2011 10:53:03 -0500
Newsgroups gmane.comp.web.zope.silva.devel
Message-ID <CAC1Sm5aF6BxF0a=84rw-PfMkn0GQiRFYMuz8Jjk4-BNbCUJUKA@mail.gmail.com>
--===============7731988002339890310==
Content-Type: multipart/alternative; boundary=20cf307f3834a584d304af4440a5

--20cf307f3834a584d304af4440a5
Content-Type: text/plain; charset=ISO-8859-1

Sylvain,

It turns out there was an addition bug in messaging workflow.  While sending
pending messages was actually happening, in Silva 2.3 the message service
(service_messages) is always "disabled" even if the ZMI management screen
shows it as "enabled".  On line 162 of Products.Silva.EmailMessageService.py,
the name of the 'enabled' field is incorrect.  It is listed as '_enable',
but in fact needs to be '_enabled'.

I've adjusted this code in Products.Silva in the default branch and pushed
it in to infrae's hg.  Not sure if this also needs to be pushed into the 3.0
branch.

regards,
Andy

On Mon, Sep 19, 2011 at 2:40 PM, Andrew Altepeter <[email protected]>wrote:

> Thanks Sylvain.
>
> I've pushed this out to our production servers, and will let the list know
> if we encounter any other issues with this.
>
> peace,
> Andy
>
> On Mon, Sep 19, 2011 at 8:12 AM, Sylvain Viollon <[email protected]>wrote:
>
>>
>> Op 15 sep 2011, om 09:50 heeft Sylvain Viollon het volgende geschreven:
>>
>> >
>> > Op 13 sep 2011, om 03:53 heeft Andy Altepeter het volgende geschreven:
>> >
>> >> Hi All,
>> >>
>> >   Hello,
>> >
>>
>>   Hello,
>>
>> >>>
>> >>> One of our chief editors recently mentioned they were not receiving
>> >>> 'request for approval' messages from her authors.  The messages
>> service
>> >>> (service_messages) is configured to "send emails when asked to".  My
>> >>> service_mailhost does not have mail queuing enabled.
>> >>>
>> >>> I've dug a bit in to why this does not work.  It appears that Silva
>> 2.3
>> >>> that the 'request approval' button in the middleground is now in
>> >>> silva.core.smi SMIAction
>> (silva.core.smi.edit.content.RequestApproval).
>> >>> Running through the request approval process in my debugger, I see
>> that the
>> >>> approval request message is actually logged in service_messages:
>> >>> RequestApproval calls Versioning.request_version_approval
>> >>> Versioning.request_version_approval calls
>> >>> Versioning._send_message_to_editors
>> >>> Versioning._send_message_to_editors calls
>> service_messages.send_message (to
>> >>> the nearest chiefeditors)
>> >>>
>> >>> The form action is now finished. The message service queues the
>> message (it
>> >>> does NOT send it immediately).
>> >>>
>> >>> Looking in the legacy handlers for these actions, e.g.
>> >>> Products.Silva.views.edit.VersionedContent.tab_status_request, the
>> last
>> >>> thing this handler does is to call
>> service_messages.send_pending_messages.
>> >>>
>> >>> It seems this behavior of calling send_pending_messages no longer
>> happens
>> >>> in the publication workflow in 2.3.  Is this a bug, or is there an
>> >>> alternative means for sending pending messages which is preferred
>> (e.g.
>> >>> calling send_pending_messages via cron)?
>> >>>
>> >
>> >   No, this seems to be a bug.
>> >
>> >   I will have a look today, as I will be porting optimizations for the
>> sidebar to 2.3
>> >
>> >   Sorry for the long reply.
>> >
>>
>>
>>    This should be fixed in the default branch of silva.core.smi.
>>
>>   Regards,
>>
>>   Sylvain,
>>
>> --
>> Sylvain Viollon -- Infrae
>> t +31 10 243 7051 -- http://infrae.com
>> Hoevestraat 10 3033GC Rotterdam -- The Netherlands
>>
>>
>>
>> _______________________________________________
>> silva-dev mailing list
>> silva-dev-IAPFreCvJWM6s/[email protected]
>> https://lists.infrae.com/mailman/listinfo/silva-dev
>>
>
>
> _______________________________________________
> silva-dev mailing list
> silva-dev-IAPFreCvJWM6s/[email protected]
> https://lists.infrae.com/mailman/listinfo/silva-dev
>
>

--20cf307f3834a584d304af4440a5
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Sylvain,<div><br></div><div>It turns out there was an addition bug in messa=
ging workflow. =A0While sending pending messages was actually happening, in=
 Silva 2.3 the message service (service_messages) is always &quot;disabled&=
quot; even if the ZMI management screen shows it as &quot;enabled&quot;. =
=A0On line 162 of <a href=3D"http://Products.Silva.EmailMessageService.py">=
Products.Silva.EmailMessageService.py</a>, the name of the &#39;enabled&#39=
; field is incorrect. =A0It is listed as &#39;_enable&#39;, but in fact nee=
ds to be &#39;_enabled&#39;.</div>
<div><br></div><div>I&#39;ve adjusted this code in Products.Silva in the de=
fault branch and pushed it in to infrae&#39;s hg. =A0Not sure if this also =
needs to be pushed into the 3.0 branch.</div><div><br></div><div>regards,</=
div>
<div>Andy<br><br><div class=3D"gmail_quote">On Mon, Sep 19, 2011 at 2:40 PM=
, Andrew Altepeter <span dir=3D"ltr">&lt;<a href=3D"mailto:aaltepet@bethel.=
edu">[email protected]</a>&gt;</span> wrote:<br><blockquote class=3D"gmai=
l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left=
:1ex;">
Thanks Sylvain.<div><br></div><div>I&#39;ve pushed this out to our producti=
on servers, and will let the list know if we encounter any other issues wit=
h this.</div><div><br></div><div>peace,</div><div>Andy<br><br><div class=3D=
"gmail_quote">
<div><div></div><div class=3D"h5">
On Mon, Sep 19, 2011 at 8:12 AM, Sylvain Viollon <span dir=3D"ltr">&lt;<a h=
ref=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>&=
gt;</span> wrote:<br></div></div><blockquote class=3D"gmail_quote" style=3D=
"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div></div><div class=3D"h5">
<br>
Op 15 sep 2011, om 09:50 heeft Sylvain Viollon het volgende geschreven:<br>
<div><div></div><div><br>
&gt;<br>
&gt; Op 13 sep 2011, om 03:53 heeft Andy Altepeter het volgende geschreven:=
<br>
&gt;<br>
&gt;&gt; Hi All,<br>
&gt;&gt;<br>
&gt; =A0 Hello,<br>
&gt;<br>
<br>
 =A0 Hello,<br>
<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; One of our chief editors recently mentioned they were not rece=
iving<br>
&gt;&gt;&gt; &#39;request for approval&#39; messages from her authors. =A0T=
he messages service<br>
&gt;&gt;&gt; (service_messages) is configured to &quot;send emails when ask=
ed to&quot;. =A0My<br>
&gt;&gt;&gt; service_mailhost does not have mail queuing enabled.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I&#39;ve dug a bit in to why this does not work. =A0It appears=
 that Silva 2.3<br>
&gt;&gt;&gt; that the &#39;request approval&#39; button in the middleground=
 is now in<br>
&gt;&gt;&gt; silva.core.smi SMIAction (silva.core.smi.edit.content.RequestA=
pproval).<br>
&gt;&gt;&gt; Running through the request approval process in my debugger, I=
 see that the<br>
&gt;&gt;&gt; approval request message is actually logged in service_message=
s:<br>
&gt;&gt;&gt; RequestApproval calls Versioning.request_version_approval<br>
&gt;&gt;&gt; Versioning.request_version_approval calls<br>
&gt;&gt;&gt; Versioning._send_message_to_editors<br>
&gt;&gt;&gt; Versioning._send_message_to_editors calls service_messages.sen=
d_message (to<br>
&gt;&gt;&gt; the nearest chiefeditors)<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; The form action is now finished. The message service queues th=
e message (it<br>
&gt;&gt;&gt; does NOT send it immediately).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Looking in the legacy handlers for these actions, e.g.<br>
&gt;&gt;&gt; Products.Silva.views.edit.VersionedContent.tab_status_request,=
 the last<br>
&gt;&gt;&gt; thing this handler does is to call service_messages.send_pendi=
ng_messages.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; It seems this behavior of calling send_pending_messages no lon=
ger happens<br>
&gt;&gt;&gt; in the publication workflow in 2.3. =A0Is this a bug, or is th=
ere an<br>
&gt;&gt;&gt; alternative means for sending pending messages which is prefer=
red (e.g.<br>
&gt;&gt;&gt; calling send_pending_messages via cron)?<br>
&gt;&gt;&gt;<br>
&gt;<br>
&gt; =A0 No, this seems to be a bug.<br>
&gt;<br>
&gt; =A0 I will have a look today, as I will be porting optimizations for t=
he sidebar to 2.3<br>
&gt;<br>
&gt; =A0 Sorry for the long reply.<br>
&gt;<br>
<br>
<br>
</div></div> =A0 This should be fixed in the default branch of silva.core.s=
mi.<br>
<div><br>
 =A0 Regards,<br>
<br>
 =A0 Sylvain,<br>
<br>
--<br>
Sylvain Viollon -- Infrae<br>
t <a href=3D"tel:%2B31%2010%20243%207051" value=3D"+31102437051" target=3D"=
_blank">+31 10 243 7051</a> -- <a href=3D"http://infrae.com" target=3D"_bla=
nk">http://infrae.com</a><br>
Hoevestraat 10 3033GC Rotterdam -- The Netherlands<br>
<br>
<br>
<br>
</div></div></div><div class=3D"im"><div><div></div><div>__________________=
_____________________________<br>
silva-dev mailing list<br>
<a href=3D"mailto:silva-dev-IAPFreCvJWM6s/[email protected]" target=3D"_blank">silva-dev@l=
ists.infrae.com</a><br>
<a href=3D"https://lists.infrae.com/mailman/listinfo/silva-dev" target=3D"_=
blank">https://lists.infrae.com/mailman/listinfo/silva-dev</a><br>
</div></div></div></blockquote></div><br></div>
<br>_______________________________________________<br>
silva-dev mailing list<br>
<a href=3D"mailto:silva-dev-IAPFreCvJWM6s/[email protected]">silva-dev-IAPFreCvJWM6s/[email protected]</a=
><br>
<a href=3D"https://lists.infrae.com/mailman/listinfo/silva-dev" target=3D"_=
blank">https://lists.infrae.com/mailman/listinfo/silva-dev</a><br>
<br></blockquote></div><br></div>

--20cf307f3834a584d304af4440a5--

--===============7731988002339890310==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
silva-dev mailing list
silva-dev-IAPFreCvJWM6s/[email protected]
https://lists.infrae.com/mailman/listinfo/silva-dev

--===============7731988002339890310==--