s&d sends too many e-mails

Bug #399179 reported by Zimo
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Singing & Dancing
New
Undecided
Unassigned

Bug Description

Hi,
after 5 months of good working, it seems that s&d doesn't update the "Triggered the last time" field anymore.
It keeps on sending the same weekly scheduled newsletter till I manually update the field.

We use Singing & Dancing 0.8.8 and this is our configuration:
    * Plone 3.1.3
    * CMF 2.1.1
    * Zope (Zope 2.10.6-final, python 2.4.5, linux2)
    * Python 2.4.5 (#1, Sep 2 2008, 11:49:02) [GCC 4.1.2 20070626 (Red Hat 4.1.2-14)]
    * PIL 1.1.6

thanks in advance
Simone

Revision history for this message
tmog (mogensen) wrote :

Is this still an issue, Simone?

Revision history for this message
Daniel Widerin (saily) wrote :

I'm using WeeklyScheduler on S&D 0.9.0 which is working fine. "Triggered the last time" field is updated correctly.

Revision history for this message
Alex Sielicki (alex-sielicki) wrote :

I think I tracked down the issue. It only occurs when there is no sort order specified on the collector's collection. This results in S&D being unable to filter out the content what was already sent out. I think the default should be that it filters out by creation date. But currently no filter will be applied if the sort order is unspecified, or set to something like Title.

The problem is in the get_items_for_topic function of collective.dancing.collector.Collector:

    def get_items_for_topic(topic, cue):
        query_args = {}
        if cue is not None and topic.hasSortCriterion():
            sort_criterion = topic.getSortCriterion()
            fname = str(sort_criterion.field)
            query_factory = sort_criteria.get(
                fname, sort_criteria.get('default'))
            query_args[fname] = query_factory(cue)
        return topic.queryCatalog(full_objects=True, **query_args)

I think it should be changed to check what the sort_criteria is. Because it doesn't make sense to add a query filter of max date on the title field.

This caused me many hours of hair pulling. Maybe I missed this critical bit of info somewhere in the documentation.

Revision history for this message
adam tang (yuejun-tang) wrote :

I applied the sort rule by created date on collector,but the filter still do not work.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.