Commit graph

151 commits

Author SHA1 Message Date
Bradley M. Kuhn
8f6bd0e563 Handle multiple addresses. 2019-12-10 09:38:20 -08:00
Bradley M. Kuhn
f9e94aec25 Add YAML output. 2019-12-10 09:38:02 -08:00
Bradley M. Kuhn
c2443bfcf7 Rework to handle multiple t-shirt designs. 2019-12-10 09:37:38 -08:00
Bradley M. Kuhn
2e45e52e01 Add license notice. 2019-12-10 09:37:19 -08:00
Bradley M. Kuhn
46ca0efb12 Different folks send shirts. 2019-12-10 09:36:59 -08:00
Bradley M. Kuhn
56e6716248 Various changes for proper email selection and encoding. 2019-12-10 09:36:38 -08:00
Bradley M. Kuhn
84a73aa0f6 Support amounts. 2019-12-10 09:35:16 -08:00
Bradley M. Kuhn
4e765fd8a3 Time HiRes module is needed. 2019-12-10 09:35:16 -08:00
Bradley M. Kuhn
fa6aa31801 Add additional years. 2019-12-10 09:35:16 -08:00
Bradley M. Kuhn
0e1ace2f76 Rework email address selection. 2019-12-10 09:35:16 -08:00
Bradley M. Kuhn
270e9d40bf First draft of category mailing. 2019-12-10 09:35:16 -08:00
Bradley M. Kuhn
a41b53f78d Finish t-shirt-print-need script. 2019-12-10 09:35:16 -08:00
Bradley M. Kuhn
a301716263 New script: t-shirt-print-need
Just prints a list of t-shirts we need.
2019-12-10 09:35:16 -08:00
Bradley M. Kuhn
c0714f3995 mass email changes for encoding and skipping addresses. 2018-01-24 11:47:47 -08:00
Bradley M. Kuhn
693a844212 type list variable should be used for loop. 2017-08-01 12:13:10 -07:00
Bradley M. Kuhn
96c04d988e t-shirts: control by type when we send.
Allow for controlled sending of t-shirts by type.
2017-08-01 10:17:19 -07:00
Bradley M. Kuhn
434f2de875 send-mass-email: improve email presentation 2017-08-01 09:21:34 -07:00
Bradley M. Kuhn
98f72ee232 Update email text. 2017-08-01 09:19:57 -07:00
Bradley M. Kuhn
07593c7b15 send-t-shirts: Improve email line processing. 2017-08-01 09:19:45 -07:00
Bradley M. Kuhn
1508660842 $type argument must be repeated in arguments.
I use it twice in the format.

I think this was a local change I inadvertently failed to commit which
got overwritten by a pull.
2017-02-09 19:04:08 -08:00
Bradley M. Kuhn
be2409792f Improve monthly lapse detection.
Previously, we were over-requesting renewals from monthly donors.  This
code corrects the problem.
2017-02-09 18:57:49 -08:00
Brett Smith
8f102e54c4 send-renewal-notices: Fix lapse rate math.
The lapse rate by Supporter type was being miscalculated.
2017-01-26 13:59:29 -05:00
Bradley M. Kuhn
02e80b8d08 Correct typo in variable name. 2017-01-18 14:34:15 +11:00
Bradley M. Kuhn
1900575269 Add renewal percentage per group. 2017-01-12 10:33:50 -08:00
Bradley M. Kuhn
1a6fdd8f09 Merge changes from upstream 'master' branch. 2017-01-12 10:32:32 -08:00
Bradley M. Kuhn
35b47468b4 send-mass-email script: wrote this a while ago.
This script has never been committed before.  I wrote it a while ago
though.
2017-01-12 10:31:50 -08:00
Brett Smith
9655c13220 Read and write UTF-8 in address scripts. 2017-01-11 12:27:25 -05:00
Bradley M. Kuhn
22e02fb40e Final corrections to handle multiple shirt request
With this adjustments, the script seems to now handle multiple
shirt-requests properly.
2017-01-10 11:36:50 -08:00
Martin Michlmayr
18ccb9d152 Set UTF8 mode
Set UTF8 mode so the information is printed correctly.
2017-01-03 12:11:47 -05:00
Brett Smith
14fbb42dd6 find-supporter: Remove excessive whitespace.
Inspired by a patch from Martin, but unfortunately it doesn't apply cleanly
anymore.
2017-01-03 12:11:30 -05:00
Bradley M. Kuhn
3283cff2e1 Correct variable name typo. 2017-01-02 14:53:08 -08:00
Bradley M. Kuhn
211bd09c65 First hack of script to add people to announce 2017-01-02 11:59:23 -08:00
Bradley M. Kuhn
0e57d54747 Add missing newline. 2017-01-02 11:58:34 -08:00
Bradley M. Kuhn
595f96d869 Better support for multiple t-shirts to same donor
This change better handles the situation where t-shirt-0 and t-shirt-1
are requested and owed to the same donor.  We've added even more t-shirt
request types at this point meaning many shirts can go to one donor, and
this change should better handle that situation.
2017-01-02 11:57:42 -08:00
Bradley M. Kuhn
1a6cb14254 Support email settings for donors.
This change, which is not properly documented nor tests present, adds
support for making sure those who don't want emails from us do not
receive them.

I believe I've caught most of the places we want this change supported.
2017-01-02 11:54:25 -08:00
Bradley M. Kuhn
7d39d40e61 Find lapsed large donors separately and report.
This generates a report for particular large donors who are lapsed.
2016-12-31 17:51:21 -08:00
Bradley M. Kuhn
fda04200df Support paper mailing for renewal notices.
This allows adding a .tex file and sending a paper renewal notice.

This worked for me to send the paper renewal notices to Conservancy
Supporters in late 2016.
2016-12-31 11:31:51 -08:00
Bradley M. Kuhn
5cf6dfb805 Send postal shipment via an email address? Really?
This would have only worked if we had solved generalized energy-matter
conversion.... and I haven't invented a Heisenberg compensator.
2016-12-17 11:35:56 -08:00
Bradley M. Kuhn
07dc1bf515 add-postal address script. 2016-12-09 13:48:24 -08:00
Bradley M. Kuhn
460352b7c4 Ignor blank lines and comments in the inventory. 2016-12-09 13:47:02 -08:00
Bradley M. Kuhn
26c7e938ff fulfillFailure: turn fulfill into hold.
if we are unable to fulfill a request, this method turns it into an
indefinite hold on the request.

This design model for handling failure in fulfillment may not be the
best one, but it seemed to roughly fit the behavior and data model we're
looking for.

A little information is lost, but is at least saved in the 'why' field
of the request_hold table.
2016-12-09 13:46:51 -08:00
Bradley M. Kuhn
89bd74a50a Implement ability to put requests on hold.
Requests can now be placed "on hold", and getRequest() can ignore held
requests.

This required addition of a table, and another API call holdRequest().

Tests were not written here, which was a mistake.  Unit tests and docs
are needed.  A FIXME was added, at least.

Also, minor imporvements to reporting on fulfilled requests.
2016-12-08 15:10:16 -08:00
Bradley M. Kuhn
3c81b423b9 Support special contributions. 2016-12-07 17:10:11 -08:00
Bradley M. Kuhn
0333ea45fa Fix typo in variable name. 2016-12-05 12:38:35 -08:00
Bradley M. Kuhn
d4e8b71bee First draft of fulfill-request script.
It seems to work, just used it.
2016-12-02 14:51:10 -08:00
Bradley M. Kuhn
98026dd16d These two places should be $laspesSoon
Only debugging output is impacted here, but it really should be based on
the variable we're actually using in the next statement.
2016-12-02 14:39:36 -08:00
Bradley M. Kuhn
65070094ed Do not attempt to intuit renewal response here.
This code worked reasonable well when there was only one type of renewal
notice in play for a long period of time, but the point here is that we
can have many of them and this script should handle sending out the
different ones at different types.

We probably need an entirely separate script to intuit response.
2016-12-02 14:37:38 -08:00
Bradley M. Kuhn
13198815f3 Print the display_name, when public_ack requested 2016-12-02 13:53:06 -08:00
Bradley M. Kuhn
fb9c43d119 Count supporters rather than use all ids returned.
We actually can't rely on a call to $sp->findDonor({}) to give us *just*
Supporters, as eventually, this may be a donor database too.  So, count
them.

Really, $sp->findDonor() should be able to take { isSupporter => 1 }
instead.
2016-12-02 13:07:59 -08:00
Bradley M. Kuhn
522df6bbfa add display_name to outgoing email.
In an effort to improve the formatting on outgoing emails from the
renewal script, add the display_name to the To: field.

I'm not completely happy with what the MIME encoding is doing here.
Specifically, it chops the line on the < of <email@example.org> so you
get this:

"A very long name that leads to wrapping of the MIME encoded line" <
 email@example.org>

As I read https://www.ietf.org/rfc/rfc2822.txt, it violates this SHOULD:

  Note: Though structured field bodies are defined in such a way that
    folding can take place between many of the lexical tokens (and even
    within some of the lexical tokens), folding SHOULD be limited to
    placing the CRLF at higher-level syntactic breaks.  For instance, if
    a field body is defined as comma-separated values, it is recommended
    that folding occur after the comma separating the structured items
    in preference to other places where the field could be folded, even
    if it is allowed elsewhere.

Brett and I decided to leave it for now and go with it.
2016-12-02 12:56:53 -08:00