CDR Tickets

Issue Number 4301
Summary Fix Bug in Partner Email Notification
Created 2017-08-14 17:42:21
Issue Type Bug
Submitted By Englisch, Volker (NIH/NCI) [C]
Assigned To Englisch, Volker (NIH/NCI) [C]
Status Closed
Resolved 2017-08-14 18:01:42
Resolution Fixed
Path /home/bkline/backups/jira/ocecdr/issue.212839
Description

Our script to notify the PDQ partners is supposed to only send email to active persons. This is true for permanent partners but we forgot to exclude deleted contacts from our list of test partners.

In order to fix this we need to update
\Inetput\wwwroot\cgi-bin\cdr\get-pdq-contacts.py
and add the line
AND contact_type <> 'D'
to the second SELECT statement of the UNION statement.

Comment entered 2017-08-14 17:49:13 by Englisch, Volker (NIH/NCI) [C]

, requesting permission to include this ticket in Feynman.

Comment entered 2017-08-14 17:53:07 by Kline, Bob (NIH/NCI) [C]

Yes, we should fix this quickly.

Comment entered 2017-08-14 18:01:33 by Englisch, Volker (NIH/NCI) [C]

The SQL statement has been fixed and unit tested against the PROD database:

  • R14885: get-pdq-contacts.py

There were a total of 3 deleted emails we've kept notifying.

Comment entered 2017-09-12 14:42:22 by Englisch, Volker (NIH/NCI) [C]

The Monday Partner notification failed, so I'm unable to confirm that this change is working correctly.
I'll have to wait until next Monday to check again.

Comment entered 2017-09-18 16:01:11 by Englisch, Volker (NIH/NCI) [C]

We moved past the error of last week's notification and ran into another one.
I believe the referred group PDQ Partner Notification in the task data-partners.py is missing which caused the job to fail when an internal warning message had to be submitted to a non-existing email address.

2017-09-18 15:05:54.573 [INFO] https://cdr.cancer.gov/cgi-bin/cdr/update-pdq-contact.py?action=notified&id=227: OK
2017-09-18 15:05:54.575 [INFO] warning Cyril Doussin at Liquid State <cyril@liquid-state.com> of pending expiration
2017-09-18 15:05:55.663 [ERROR] failure sending to []
Traceback (most recent call last):
  File "D:\cdr\Scheduler\tasks\data_partners.py", line 157, in send
    msg = sendMail(self.SENDER, recips, subject, message, True)
  File "D:\cdr\lib\Python\cdrutil.py", line 594, in sendMail
    raise Exception("sendMail: no recipients specified")
Exception: sendMail: no recipients specified
Comment entered 2017-09-28 10:45:24 by Dugan, Amy (NIH/NCI) [C]

Feynman is in production

Comment entered 2017-10-02 15:12:58 by Englisch, Volker (NIH/NCI) [C]

I had left this ticket open because the notification job failed with errors the first few times it ran.
However, the notification job now finished successfully and we could close the ticket if it was still open. :-)

Elapsed: 0:00:00.001312