Commit graph

429 commits

Author SHA1 Message Date
Bradley M. Kuhn
2cde8096a9 Begin work on delivery_error database tables.
No code supports this yet, IIRC.
2019-12-10 09:35:16 -08:00
Bradley M. Kuhn
84a73aa0f6 Support amounts. 2019-12-10 09:35:16 -08:00
Bradley M. Kuhn
51d0db3fab Add tests for Preferred email addresses. 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
f50c4d6053 paperMailOk: correct contact-setting typo. 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
Brett Smith
8cffed1c68 donors2csv: Check for import errors as early as possible.
This has to be done before argument parsing because that uses
import2ledger.strparse.
2018-06-01 11:13:21 -04:00
Brett Smith
2e2c783657 python: Add donors2csv script. 2018-05-31 16:19:50 -04:00
Denver Gingerich
4d3b8b0673 models: flexible returning supporter mth count API
Rename months_expired() to months_expired_at_return() and have the
method return an integer representing the month count rather than an
enum-like so that the API user has more flexibility with respect to
what they then do with the result.  Thanks to Brett for the review
that suggested this, and for much of the clever math in this change.

The results produced by returning_report.py (which is updated here to
use the new API) are almost identical to the results produced before
the change.  In rare cases (about 2-5% of the time) a supporter's
lapsed month count will fall into an adjacent bucket instead of the
one it fell into before, usually because the previous result was wrong
to begin with (due to the ugly days-per-3-months table that we used
previously, which this change thankfully eliminates).
2018-01-25 17:03:09 -05:00
Denver Gingerich
6ab6441e14 python: report front-end for returning supporters
A reporting script similar to status_report.py that uses the new
returning supporter method (added in 7aaba96) to provide a list of
how many supporters have started supporting again after lapsing,
bucketed by the number of months for which they had been lapsed.
2018-01-25 17:03:09 -05:00
Denver Gingerich
0d3d9db4ed models: add months returning supporter had lapsed
A new public method, months_expired(), which is similar to the
existing status() in layout, but instead of returning whether the
supporter is new/active/lapsed/etc., it checks to see whether the
supporter is returning after having been lapsed, and if so, returns
the month range corresponding to how long they had been lapsed before
returning as a supporter in the current month.
2018-01-25 17:03:09 -05:00
Bradley M. Kuhn
9350167d29 Merge branch 'master' of ssh://k.sfconservancy.org/supporters 2018-01-24 11:48:43 -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
2816c8ab2e emailOk: attempts to make more versatile.
Most of this commented out because I was attempting to make it more versatile
and it failed.
2018-01-24 11:45:03 -08:00
Brett Smith
5b43b6d3f3 README: Update database migration method for Django 1.10. 2018-01-22 10:15:30 -05:00
Brett Smith
271f7a8c5b models: Update DateField to use Django 1.10 method. 2018-01-22 10:15:30 -05:00
Bradley M. Kuhn
a82ebfb0a9 _lookupDeliveryError: begun
Verify beginnings of implementation
2017-12-26 12:32:15 -08:00
Bradley M. Kuhn
9ffd4d4e88 Tests: addEmailError: initial functionality tests
These tests lay out the basic functionality for adding an email error.

BTW, I decided we need an entirely different but mirrored setup for
postal errors, since the database tables for email and postal addresses
are hard-coded.
2017-11-26 15:04:21 -08:00
Bradley M. Kuhn
bce2679573 Tests: addSupporter(): fix two spelling typos. 2017-11-26 15:00:51 -08:00
Bradley M. Kuhn
99650b23ee releaseRequestHold(): Implement & update tests.
Some of these tests were written a while ago, and the function never
implemented.  It is now implemented and test are updated.
2017-11-26 14:32:17 -08:00
Bradley M. Kuhn
a3ea7a58df Tests: clearly should be ok(), not is().
This was a Boolean test, so it clearly should be ok(), not an is().
2017-11-26 14:30:44 -08:00
Bradley M. Kuhn
faf1a239a4 holdRequest(): requestId is not a parameter. 2017-11-22 13:32:44 -08:00
Bradley M. Kuhn
ebcabc5231 holdRequest(): Document function API. 2017-11-22 13:32:30 -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
77ac4ba16f Merge branch 'master' from k.sfconservancy.org 2017-08-01 09:20:19 -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
Brett Smith
2b1bdb073d python models: Implement Supporter.supperter_type() with filters. 2017-02-17 15:24:40 -05:00
Brett Smith
8481bbf3b9 python models: Supporter.supporter_type() handles untagged payments. 2017-02-17 15:11:32 -05:00
Brett Smith
e2eab732ac python models: Add Date.strptime constructor. 2017-02-17 11:41:39 -05: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
Brett Smith
3751fe870f python: Initial documentation. 2017-01-25 15:35:10 -05:00
Brett Smith
8eb1854b8b python: Add status_report script. 2017-01-25 11:08:21 -05:00
Brett Smith
bc21b83951 python: Add Supporter pseudo-model. 2017-01-25 08:58:54 -05:00
Brett Smith
b32e72b1e8 python: Start Django project.
This is enough code to load Ledger data into Django models.
2017-01-24 13:31:30 -05:00
Bradley M. Kuhn
02e80b8d08 Correct typo in variable name. 2017-01-18 14:34:15 +11:00
Bradley M. Kuhn
722105b1ff contact-setting is not plural!
This was working incorrectly because contact-setting is not plural.
It's one setting.
2017-01-18 14:33:40 +11:00
Bradley M. Kuhn
ffd609b0cf Typo fix. 2017-01-16 06:05:51 +11:00
Bradley M. Kuhn
92717294f9 Correct tests based on recent changes.
These tests are not passing I believe from recent changes.
2017-01-16 05:50:34 +11:00
Bradley M. Kuhn
258d9fad0f Never fulfill requests that are on hold.
Requests on hold can never be fulfilled.

If you want to fulfill a request that is currently on hold, the right
semantic is that you should remove the hold, then fulfill the request.

Note that this test now passes and it didn't before:
  fulfillRequest: .... but undef is returned when attempting to fulfill a held request.
2017-01-14 20:37:56 -08:00
Bradley M. Kuhn
836a70c0ab holdRequest():testing hold on already held request
It's clear from the Supporters.pm code that when an hold is attempted on
an already held request, it simply returns the id of the existing hold.

I don't actually remember what behavior I really wanted here.  There are
certainly possibility for semantic confusion in the API with the current
functionality, since the API caller must actually check to verify if the
hold they got is a new one or just an existing one.

Perhaps this should be rethought.  I left a comment in the test code for
that reason.
2017-01-14 19:45:19 -08:00
Bradley M. Kuhn
68133e8cee holdRequest(): holdReleaseDate is required.
holdReleaseDate is now a required argument for holdRequest().
2017-01-14 14:43:01 -08:00