pfitzpaddy / ngm-reportDesk

The workdesk for ReportHub
1 stars 6 forks source link

Bugfix: Do not send notifications to reports already submitted #336

Closed pfitzpaddy closed 4 years ago

pfitzpaddy commented 4 years ago

It keeps on sending notification emails for the months the partner has already submitted a report.

drfaustusfade commented 4 years ago

there is some mismatch between report_status of reports and locations, as there is a check for locations users

db.getCollection("report").find({report_year: 2020, report_month: 0, report_status: "complete"}).forEach(function(d){
    l =  db.getCollection("location").findOne({report_year: 2020, report_month: 0, report_status: "todo", report_id: d._id.valueOf()});
    if (l) print (d.admin0pcode, d._id, l._id);
});

could be somewhere problem on location repor_status not overwritten

pfitzpaddy commented 4 years ago

This has been resolved