Rebecca Law
047a7d5488
Only test the items of the template that can change on an update request.
...
Return 200 if no change is made.
2016-06-01 12:19:59 +01:00
Rebecca Law
05e72b07ae
Return status code 304 when template is not updated.
...
Moved import
2016-06-01 11:50:45 +01:00
Rebecca Law
0a9cdbd75a
Do not create a new version of the template if there is no change to the tempalte.
2016-06-01 10:53:03 +01:00
Martyn Inglis
909fac3c05
Added research mode tasks
...
- if a service is in research mode the don't send the notifications via the providers (MMG/SES/etc)
- instead set up a task to mimic those services callbacks - this completes the loop, and show stats, delivery receipts and so on.
- Use the "to" field to choose the response, allows users to create successful and errored notifications
temp fail sms, uses "07833333333"
perm fail sms, uses = "07822222222"
success = "07811111111" (or anything else)
success email = "delivered@simulator.notify "
perm fail = "perm-fail@simulator.notify "
temp fail = "temp-fail@simulator.notify "
2016-05-31 16:55:26 +01:00
NIcholas Staples
a97f3bbb4f
Merge pull request #359 from alphagov/send_tasks_bug
...
Notification not created in send_sms or send_email when service is in…
2016-05-31 15:42:54 +01:00
Nicholas Staples
79dfc360f2
Notification not created in send_sms or send_email when service is in restricted mode.
2016-05-31 14:55:06 +01:00
Martyn Inglis
9617f0748b
Added some tests around creating and updated services
...
- ensure research mode is respected on creation and update
- ensure rest client gives an error for bad research mode update
2016-05-31 12:49:06 +01:00
Martyn Inglis
9aa727e0cf
Add research mode to service/history tables
...
- added as a nullable boolean column.
2016-05-31 11:29:20 +01:00
minglis
8710c103f7
Merge pull request #354 from alphagov/deadlock-fix
...
Reorder updates to the notification / stats tables to match create.
2016-05-31 10:28:32 +01:00
Martyn Inglis
2108bb52d5
Reorder updates to the notification / stats tables to match create.
2016-05-31 10:17:15 +01:00
Rebecca Law
a7a669a7c2
Merge pull request #353 from alphagov/permanent-failure-firetext
...
Permanent failure firetext
2016-05-27 14:32:45 +01:00
Rebecca Law
97088a4af1
Added a comment to explain how the delivery receipt will affect the notification status.
2016-05-27 12:28:58 +01:00
Rebecca Law
2bfa9b7e10
Merge branch 'master' into permanent-failure-firetext
2016-05-27 12:10:59 +01:00
Rebecca Law
885abcaf16
Make update notification status transcational.
...
Refactor methods for reusability.
2016-05-27 12:09:36 +01:00
Leo Hemsted
b563953626
Merge pull request #352 from alphagov/notification-statistics-bug
...
notifications/statistics returns when no stats exist for today
2016-05-26 17:15:34 +01:00
Leo Hemsted
a90a18541f
notifications/statistics returns when no stats exist for today
...
moved filtering from WHERE to JOIN ON so that when join suceeds but filter fails, we dont lose the service's data from the results set
2016-05-26 16:48:30 +01:00
Rebecca Law
25a1b7f31c
Firetext does not have a status code for temporary-failure.
...
In order to set a message as temporary-failure, we check if it is in pending status first.
Otherwise a delivery receipt for failure is set to permanent failure.
2016-05-26 16:46:00 +01:00
Rebecca Law
c5ec07a9ce
Merge branch 'master' into permanent-failure-firetext
2016-05-25 15:45:42 +01:00
Rebecca Law
83df16025d
Merge pull request #347 from alphagov/get-jobs-created-in-last-7-days
...
Add a limit days query param for get all jobs.
2016-05-25 11:36:31 +01:00
Rebecca Law
a67793cf8a
Updated date query so that the created_at date is truncated so that we get all jobs created number of days requested.
2016-05-25 11:13:49 +01:00
Rebecca Law
31f4bfd4f3
Merge pull request #349 from alphagov/fix-migration
...
Remove the status from the group by clause of the update statement.
2016-05-25 10:14:34 +01:00
Rebecca Law
a0b974f4ac
Remove the status from the group by clause of the update statement.
...
This script has been applied to all environments except live, this can be pushed through to live without issue because of how alembic works.
2016-05-25 09:13:32 +01:00
Rebecca Law
2a7872cce1
Add a limit days query param for get all jobs.
2016-05-24 17:21:04 +01:00
Rebecca Law
6735a7103c
Merge pull request #345 from alphagov/notification-job-status-counts
...
Notification job status counts
2016-05-24 16:47:00 +01:00
Rebecca Law
d6c7f03607
Added another assert to the test
2016-05-24 16:37:05 +01:00
Rebecca Law
fa152c4431
Mark a declined message from Firetext as permanent-failure rather than failed.
2016-05-24 15:32:48 +01:00
Leo Hemsted
06473431ba
Merge pull request #341 from alphagov/no-jobs-for-archived-templates
...
Prevent creating jobs for deleted templates
2016-05-24 13:43:23 +01:00
Leo Hemsted
24625a44f3
prevent public api from sending archived templates
2016-05-24 13:08:38 +01:00
Leo Hemsted
7801efd5ca
don't create job if template has been archived
2016-05-24 13:08:02 +01:00
Rebecca Law
e4eecb894a
Update job.notifications_delivered and job.notifications_failed count when updating the status of a notification.
2016-05-24 11:31:44 +01:00
Rebecca Law
dff60175a4
Add jobs.notifications_delivered and jobs.notifications_failed counts to the jobs table.
2016-05-23 15:44:57 +01:00
Leo Hemsted
c87cce3c91
Merge pull request #340 from alphagov/dont-return-archived-templates
...
only return unarchived templates when getting all templates
2016-05-23 15:06:35 +01:00
Leo Hemsted
5ebae9c66c
only return unarchived templates when getting all templates
...
get_specific_template functions happily return archived templates
2016-05-23 14:20:02 +01:00
Rebecca Law
a436ff32a1
Merge pull request #338 from alphagov/only-update-status-when-sending
...
Only update status when status is sending.
2016-05-23 10:31:28 +01:00
Rebecca Law
cf2723bdc9
If the sms client provider sends more than one delivery receipt only take the update for the the first one.
...
Only update the notification.status if status = sending.
2016-05-20 17:04:56 +01:00
Rebecca Law
2b27ca9187
Merge pull request #335 from alphagov/fix-history-data
...
Data migration script to fix templates_history.updated_at.
2016-05-20 16:02:23 +01:00
Rebecca Law
e0864dfdb5
Data migration script to fix templates_history.updated_at.
...
There was a bug that was not setting the updated_at for the history table.
2016-05-20 15:56:07 +01:00
Rebecca Law
a8c79bf80d
Merge pull request #334 from alphagov/case-insensitive-email
...
Make the get_user_by_email_address case insensitive.
2016-05-20 15:55:38 +01:00
Leo Hemsted
436992adaa
Merge pull request #333 from alphagov/notification_statistics_endpoint
...
notification_statistics endpoint
2016-05-20 15:39:08 +01:00
Leo Hemsted
81e5eb2c0a
return all zeros when NotificationStatistics dont exist
2016-05-20 15:24:57 +01:00
Rebecca Law
0f9a019945
Make the get_user_by_email_address case insenstive.
2016-05-20 13:43:31 +01:00
Leo Hemsted
1b27c15c16
/notifications/statistics now takes 'day' parameter
...
avoids potential issues with date.today being inconsistent with user timezone
2016-05-20 11:31:35 +01:00
Leo Hemsted
f7768366a1
added test_notification_statistics file
...
put in new rest subfolder in anticipation of refactoring test_rest.py
2016-05-20 09:57:31 +01:00
Leo Hemsted
0ad050043c
new /notification/statistics endpoint
2016-05-20 09:48:06 +01:00
NIcholas Staples
297f8aac6e
Merge pull request #332 from alphagov/json_template_dates
...
Update template json to return created_at and updated_at. Also fixed …
2016-05-20 09:43:48 +01:00
Nicholas Staples
1797d9360b
Update template json to return created_at and updated_at. Also fixed a bug where updated_at was not being added to the templates_history model.
2016-05-19 17:02:55 +01:00
NIcholas Staples
e0f6b4e571
Merge pull request #327 from alphagov/add_job_row_number
...
Added job row number to the notification for csv jobs. All tests pass…
2016-05-19 14:33:21 +01:00
Martyn Inglis
b550ee1e8f
Lowercasing the instance name to ensure that matches across AWS builds
2016-05-19 14:33:14 +01:00
Martyn Inglis
5f7292f92c
Renamed the instance keys
2016-05-19 14:07:02 +01:00
minglis
36cf00df4e
Merge pull request #329 from alphagov/adding-nodowntime-scripts
...
Adding nodowntime scripts
2016-05-19 13:58:29 +01:00