Report ML check status in summary emails.
This commit is contained in:
parent
d24b7c4136
commit
6947dd37b3
4 changed files with 22 additions and 11 deletions
|
@ -9,6 +9,7 @@ ChangeLog
|
|||
* handle unicode characters with 3-byte UTF-8 representation correctly
|
||||
* calculate expected income with respect to discounts granted
|
||||
* report soon-expiring members in the summary emails
|
||||
* report mailing lists check status in summary emails
|
||||
|
||||
1.15.1
|
||||
------
|
||||
|
|
|
@ -333,7 +333,8 @@ NOTIFICATIONS-SOURCES=notifications.scm brmember.import.scm \
|
|||
brmember-format.import.scm configuration.import.scm \
|
||||
util-time.import.scm members-fees.import.scm mbase.import.scm \
|
||||
members-print.import.scm table.import.scm \
|
||||
bank-account.import.scm logging.import.scm
|
||||
bank-account.import.scm logging.import.scm \
|
||||
mailinglist.import.scm
|
||||
|
||||
notifications.o: notifications.import.scm
|
||||
notifications.import.scm: $(NOTIFICATIONS-SOURCES)
|
||||
|
|
|
@ -396,8 +396,8 @@
|
|||
(print-git-status))
|
||||
((summary)
|
||||
(if (-send-emails-)
|
||||
(make+send-summary-email MB)
|
||||
(make+print-summary-email MB)))
|
||||
(make+send-summary-email MB MLS)
|
||||
(make+print-summary-email MB MLS)))
|
||||
((list)
|
||||
(for-each (lambda (mr)
|
||||
(print (brmember-nick mr)))
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
(chicken format)
|
||||
(chicken string)
|
||||
(chicken sort)
|
||||
(chicken port)
|
||||
brmember
|
||||
util-mail
|
||||
util-bst-ldict
|
||||
|
@ -54,7 +55,8 @@
|
|||
table
|
||||
bank-account
|
||||
logging
|
||||
srfi-1)
|
||||
srfi-1
|
||||
mailinglist)
|
||||
|
||||
;; Prints email to the console
|
||||
(define (print-notification-email em)
|
||||
|
@ -142,7 +144,7 @@
|
|||
(send-notification-email em)))
|
||||
|
||||
;; Summary email of membership fees payments
|
||||
(define (summary-email-body mb)
|
||||
(define (summary-email-body mb mls)
|
||||
(let* ((mbs (members-summary mb))
|
||||
(students (car mbs))
|
||||
(full (cdr mbs))
|
||||
|
@ -175,6 +177,12 @@
|
|||
(brmember-format "~N (~S)" mr))
|
||||
soonexps)
|
||||
",")))))
|
||||
(mlcheck-lst
|
||||
(string-split
|
||||
(with-output-to-string
|
||||
(lambda ()
|
||||
(print-mailing-list-checks mb mls)))
|
||||
"\n"))
|
||||
(debtors (sort
|
||||
(members-to-notify mb 1)
|
||||
brmember<?))
|
||||
|
@ -272,6 +280,7 @@
|
|||
(append income-lst
|
||||
unpaired-lst
|
||||
soonexps-lst
|
||||
mlcheck-lst
|
||||
debtors-lst
|
||||
boring-lst
|
||||
dw-lst
|
||||
|
@ -282,21 +291,21 @@
|
|||
))))
|
||||
|
||||
;; Creates the summary email structure
|
||||
(define (make-summary-email mb)
|
||||
(define (make-summary-email mb mls)
|
||||
(make-ldict
|
||||
`((to . ,(*summary-mailto*))
|
||||
(subject . ,(format "Členské příspěvky ~A"
|
||||
(today/iso)))
|
||||
(body . ,(summary-email-body mb)))))
|
||||
(body . ,(summary-email-body mb mls)))))
|
||||
|
||||
;; Just print to standard output
|
||||
(define (make+print-summary-email mb)
|
||||
(let ((em (make-summary-email mb)))
|
||||
(define (make+print-summary-email mb mls)
|
||||
(let ((em (make-summary-email mb mls)))
|
||||
(print-notification-email em)))
|
||||
|
||||
;; Actually send emails
|
||||
(define (make+send-summary-email mr)
|
||||
(let ((em (make-summary-email mr)))
|
||||
(define (make+send-summary-email mr mls)
|
||||
(let ((em (make-summary-email mr mls)))
|
||||
(send-notification-email em)))
|
||||
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue