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