Leo Hemsted
4ef084464d
update notification_history table from notification_dao create/update functions
...
please ensure that any changes to notifications table happen through either dao_create_notification or dao_update_notification.
changed the notification status update triggered by the provider callbacks to ensure that sets updated_by and can update the history table.
also re-added the character_count so we can reconstruct billing data if needed.
2016-07-12 13:28:45 +01:00
Leo Hemsted
722699a72a
Update notification_history table on insert/update of notifications
...
triggered via calls in dao_create_notification and dao_update_notification - if you don't use those functions (eg update in bulk) you'll have to update the history table yourself!
2016-07-12 13:27:31 +01:00
Leo Hemsted
47ef63adbe
add notification_history table
...
table will be used for storing archival versions of notifications. It's an exact duplicate of notifications table, but with the following modifications:
* removed _personalisation
* removed to
* removed content_char_count
All foreign keys to other tables still exist. additionally, removed defaults (for id and created_at) since they'll be set when we create, and we should ensure that we don't forget about them when inserting/udpating this table.
2016-07-12 13:27:31 +01:00
Rebecca Law
f9004f983a
Merge pull request #524 from alphagov/email-registered-users
...
Email registered users
2016-07-12 10:51:17 +01:00
Rebecca Law
7927901938
Fix indentation
2016-07-12 10:45:47 +01:00
Rebecca Law
8acb373f07
Merge pull request #523 from alphagov/fix-temp-failure-job
...
Add a lockmode for the update_notifications_status_by_id to prevent t…
2016-07-12 09:49:00 +01:00
Rebecca Law
b2da3f563b
Merge branch 'master' into email-registered-users
2016-07-08 14:53:38 +01:00
Rebecca Law
1bfd25107b
Add a lockmode for the update_notifications_status_by_id to prevent the timeout task from updating the same notification more than once.
...
This happens because more than one beat process was creating the timeout task, resulting in multiple workers running the same queries at the same time.
2016-07-08 14:48:07 +01:00
Chris Hill-Scott
6c4f098852
Merge pull request #520 from alphagov/pass-through
...
Use `PassThrough` renderer
2016-07-08 12:34:58 +01:00
Chris Hill-Scott
aa12c88551
Add a test for sending email to provider
...
We had a test like this for sending sms, but not email. This meant that,
for example, we weren’t checking that the provider was getting passed
the HTML and plain text versions of the email.
2016-07-08 11:16:45 +01:00
Chris Hill-Scott
bb3c55ca6c
Make send sms test use a template with a newline
2016-07-08 11:16:45 +01:00
Rebecca Law
f4976539e4
Make email a required field for the email_data_schema.
2016-07-08 10:57:20 +01:00
Chris Hill-Scott
a8a556d02a
Use PassThrough renderer
...
Implements and depends on:
- [ ] https://github.com/alphagov/notifications-utils/pull/49
2016-07-07 22:48:07 +01:00
Rebecca Law
36ecdca04c
Add new email template for the GOV.UK Notify service, to send an email to users that register with the same email address.
...
Add a new endpoint to send the email.
2016-07-07 17:23:07 +01:00
Chris Hill-Scott
d28775800c
Merge pull request #519 from alphagov/update-utils
...
Bring in changes to template and CSV processing
2016-07-07 16:32:56 +01:00
Chris Hill-Scott
9f3bf763e9
Merge pull request #515 from alphagov/pip-accel
...
add pip-accel to travis to speed up builds
2016-07-07 16:32:50 +01:00
Chris Hill-Scott
a09333a678
Merge pull request #514 from alphagov/rates
...
mmg rates set to 1.65p
2016-07-07 16:32:45 +01:00
Rebecca Law
55adc9239f
Fix update script
2016-07-07 16:01:04 +01:00
Chris Hill-Scott
824085ead8
Bring in changes to template and CSV processing
...
Functional changes:
- adds the blue bar
Performance changes
- faster CSV processing
Depends on:
- [ ] https://github.com/alphagov/notifications-utils/pull/47
- [ ] https://github.com/alphagov/notifications-utils/pull/48
Also brings in some breaking changes, which do not affect utils (apart
from a weird import).
2016-07-07 15:44:30 +01:00
Rebecca Law
638ea1b12b
Set the start date for the new rate as July 1
2016-07-07 14:31:50 +01:00
Rebecca Law
3e6a59ad46
Merge pull request #516 from alphagov/fix-counts
...
Fix update script
2016-07-06 16:54:07 +01:00
Rebecca Law
fac5727ad7
Fix update script
2016-07-06 16:42:49 +01:00
Leo Hemsted
a39552f81f
add pip-accel to travis to cache builds better
2016-07-06 16:12:23 +01:00
Leo Hemsted
2b7972dc1d
mmg rates set to 1.65p
...
note this db value not actually used in app yet
2016-07-06 16:02:10 +01:00
Rebecca Law
f58ee7a8f8
Merge pull request #512 from alphagov/fix-count
...
Fix bug where all notifications were getting a type = email.
2016-07-06 15:17:09 +01:00
Rebecca Law
16eb20371f
Fix import
2016-07-06 15:07:09 +01:00
Rebecca Law
764bfc6203
Fix file name for migration script
2016-07-06 14:46:46 +01:00
Rebecca Law
a1209ed9a4
Merge branch 'master' into fix-count
2016-07-06 14:45:10 +01:00
Rebecca Law
8bea8b6a8f
Fix bug where all notifications were getting a type = email.
...
Includes a fix to notification and notification_statistics data.
2016-07-06 14:31:52 +01:00
Leo Hemsted
447086d065
Merge pull request #510 from alphagov/test-api-keys
...
Test api keys
2016-07-06 14:12:07 +01:00
Leo Hemsted
96513442fe
notifications from test api keys dont send for real - a la research_mode
...
also added a bunch more tests around api keys to help ensure we're behaving in at least a consistent way
2016-07-05 16:29:53 +01:00
Leo Hemsted
eee98e3e52
move callback tests into separate file
...
also fix syntax errors
2016-07-05 16:20:03 +01:00
Leo Hemsted
011afa4b16
make tests parametrized for all three key types
2016-07-05 16:20:02 +01:00
Leo Hemsted
a5e488c035
add test api key type
2016-07-05 16:20:02 +01:00
Leo Hemsted
c46622993b
Merge pull request #507 from alphagov/reply-to-nondestructive-part-b
...
remove reply_to_addresses from task kwargs
2016-07-05 15:17:51 +01:00
Leo Hemsted
242be97bfa
remove reply_to_addresses from task kwargs
...
also added a test for aws_ses.send_email to prove it handles reply_to_address correctly
2016-07-04 17:29:41 +01:00
Leo Hemsted
e5b417305f
Merge pull request #504 from alphagov/reply-to-nondestructive-part-a
...
dont pass reply-to-addresses about
2016-07-04 16:24:27 +01:00
Leo Hemsted
f5e14f043d
dont pass reply-to-addresses about
...
dont send reply_to_addresses around from process_job and send_email -
take it from the service in send_email_to_provider. also clean up
the kwarg in aws_ses.send_email to more accurately reflect what we
might pass in
2016-07-04 15:04:43 +01:00
Adam Shimali
8dafab952e
Merge pull request #501 from alphagov/fix-alembic-clash
...
Fix alembic clash.
2016-07-04 10:50:11 +01:00
Adam Shimali
1f4fc77a1e
Fix alembic clash.
2016-07-04 10:45:56 +01:00
Adam Shimali
19f2ccb594
Merge pull request #498 from alphagov/set-sms-sender-api
...
Set sms sender on service
2016-07-04 10:32:04 +01:00
Leo Hemsted
0b9ccd1acc
Merge pull request #496 from alphagov/notifications-get-api-key-filter
...
filter GET /notifications by api type
2016-07-04 09:53:53 +01:00
Leo Hemsted
4e2a14ed28
Merge branch 'master' into notifications-get-api-key-filter
2016-07-01 17:12:03 +01:00
Adam Shimali
b32f0ab2cd
Resolve conflicts
2016-07-01 16:53:12 +01:00
Rebecca Law
2a904b5ff7
Merge pull request #497 from alphagov/split-send_email-task
...
Split send email task
2016-07-01 16:47:03 +01:00
Leo Hemsted
f992240192
make notification.key_type not nullable
...
set to 'normal' for all existing notifications, and all job notifications also created as 'normal' - so if your eg reporting service hits notify, it gets notifications created from both API calls and front-end csv jobs.
2016-07-01 16:36:11 +01:00
Adam Shimali
c29dd23702
Add sms sender to service to be used in sms templates
...
in place of default numeric short code.
If not present default short code is used.
2016-07-01 15:27:54 +01:00
Rebecca Law
4a321497fc
Remove print
2016-07-01 15:03:28 +01:00
Rebecca Law
3aff22cf87
Improve the logging message
2016-07-01 14:42:40 +01:00
Leo Hemsted
2cf1d22748
add filters to GET /notifications endpoints to only return for provided key_type
...
if api_key used to access endpoint is type team, endpoints only return that type -
will 404 if you provide a different ID. Same applies for normal (normal api keys
cannot see team notifications)
also, for convenience, set sample_notification to supply key_type of KEY_TYPE_NORMAL
by default
2016-07-01 14:35:02 +01:00