Imdad Ahad
24dfcd2128
Add normalised_to field to notification
2017-05-23 10:44:39 +01:00
Ken Tsang
de7ad6fb95
Refactored service_permissions data model
2017-05-22 17:25:58 +01:00
Leo Hemsted
2535a7fe98
set sms_sender to be 'GOVUK' if not otherwise specified
...
this is a precursor to making the column non-nullable
2017-05-22 17:13:35 +01:00
kentsanggds
f5d3eed7e0
Revert "Refactored service permissisons data model"
2017-05-22 16:05:31 +01:00
Rebecca Law
9bfba52f53
Add pending flag to scheduled_notifications.
...
Set pending flag to false when the notification has been sent to provider task.
2017-05-22 15:07:16 +01:00
Rebecca Law
3a3161ecc4
Merge branch 'master' into schedule-api-notification
...
Conflicts:
app/celery/scheduled_tasks.py
app/v2/notifications/post_notifications.py
tests/app/celery/test_scheduled_tasks.py
2017-05-22 14:05:57 +01:00
Ken Tsang
052004bef0
Refactored data model to remove cascade
2017-05-22 13:33:43 +01:00
Ken Tsang
28ef9a1853
Refactored service permissisons data model
2017-05-22 10:58:41 +01:00
Martyn Inglis
7268bc28fe
New array of non-billable states
2017-05-19 16:42:47 +01:00
Martyn Inglis
8dc7a86148
Merge branch 'master' into async-job-stats
...
Conflicts:
app/dao/services_dao.py
2017-05-18 09:34:54 +01:00
Rebecca Law
973cc2c4c9
Changed the scheduled_for datetime to only send and hour of a day to send.
...
Also expect the date being passed in is BST. The date is converted to UTC before saving. And converted to BST when returning a notification.
2017-05-17 15:06:15 +01:00
Ken Tsang
54446d5f4d
Add default permissions when creating a service
2017-05-17 14:18:12 +01:00
Martyn Inglis
83a1b1526e
Merge branch 'master' into async-job-stats
...
Conflicts:
app/notifications/notifications_ses_callback.py
2017-05-17 09:49:43 +01:00
Rebecca Law
1034762489
Ensure the relationship between Notification and ScheduledNotification is one-to-one.
...
Update db script with the right number
2017-05-16 15:29:31 +01:00
Rebecca Law
3c0da9c8fd
Merge branch 'master' into schedule-api-notification
2017-05-16 10:50:53 +01:00
Rebecca Law
f0e2713bef
Add scheduled_for in the post notification request form.
...
Return scheduled for in get_notification requests.
2017-05-15 17:27:38 +01:00
Ken Tsang
380bc22f22
Add relationship for service in ServicePermission
2017-05-15 13:44:52 +01:00
Rebecca Law
75a4dad8c1
New table to hold scheduled_notifications.
2017-05-15 12:59:44 +01:00
Ken Tsang
359c4d2138
add service permissions model + migration script
2017-05-15 12:52:28 +01:00
Martyn Inglis
835dcc6273
Not null job_id and rebuilt the migration script to include this
2017-05-12 13:18:12 +01:00
Martyn Inglis
63b7a4e9fe
New status grouping - success
2017-05-12 12:19:44 +01:00
Martyn Inglis
d324d72926
Merge branch 'master' into async-job-stats
2017-05-11 15:41:20 +01:00
Martyn Inglis
f0e47029f2
"Created at" on the model
2017-05-11 15:23:18 +01:00
Martyn Inglis
a5caed5ac8
Changed job_stats table to have an update at time stamp
2017-05-09 14:04:19 +01:00
Martyn Inglis
d647640b65
Added job statistics table
2017-05-09 11:22:05 +01:00
Leo Hemsted
4ff4717fdf
make sure we update both statuses when updating notification history
2017-05-09 11:09:16 +01:00
Leo Hemsted
7e52fa4d13
add new notification_status column to models.py
...
We now have a new column in the database, but it isn't being
populated. The first step is to make sure we update this column,
while still keeping the old enum based column up to date as well.
A couple of changes have had to happen to support this - one irritating
thing is that if we're ever querying columns individually, including
`Notification.status`, then we'll need to give that column a label,
since under the hood it translates to `Notification._status_enum`.
Accessing status through the ORM (i.e., my_noti.status = 'sending' or
similar) will work fine.
2017-05-04 17:24:28 +01:00
kentsanggds
56e5045e9a
Merge pull request #928 from alphagov/update-billing-api-with-rate
...
Update billing api with rate
2017-04-28 11:40:05 +01:00
Leo Hemsted
fd4e27bfd3
add type conversion to report downloads
...
"sent" is fine as an internal marker but not very obvious to the end
user that it specifically refers to international messages. We now
say "Sent internationally" in the CSV
2017-04-28 11:00:55 +01:00
Rebecca Law
3b41478a0a
Updated Notification model to use Float(asdecimal=False) for rate_mutliplier.
...
Added test with multiple rows for a month.
2017-04-28 10:10:49 +01:00
Rebecca Law
1a64509186
Change the resultset from the yearly and monthly billing data queries.
...
Fix some formatting of the return objects.
2017-04-28 10:10:49 +01:00
Rebecca Law
a186fc95be
Added new endpoints to return the yearly-usage and monthly-usage for a given financial year and service id.
...
Since the response has changed I have created new endpoints so that the deployments for Admin are more managable.
Removed print statements from some tests.
2017-04-28 10:10:48 +01:00
Imdad Ahad
164ba0c6b3
as_decimal defaults to False
2017-04-27 13:50:51 +01:00
Imdad Ahad
868e102f8a
Make rate_multiplier on notification return non-decimal
2017-04-27 13:24:42 +01:00
Leo Hemsted
a138ec478a
Merge branch 'master' into sent-status
2017-04-26 16:52:16 +01:00
Imdad Ahad
26b35c5d15
Add intl notificiation fields
2017-04-26 11:31:05 +01:00
Imdad Ahad
5171547990
Remove blank lines
2017-04-26 09:52:02 +01:00
Imdad Ahad
25ce3851eb
Add international support flag for providers
2017-04-25 17:33:16 +01:00
Leo Hemsted
02e8f454e1
add new notification status 'sent'
...
for international text messages, when we may not ever receive callback info,
so we need a separate status that doesn't get timed out etc
2017-04-25 17:08:29 +01:00
Rebecca Law
e8a7762688
Merge branch 'master' into update-sms-rate
2017-04-25 10:15:54 +01:00
Rebecca Law
6c8ff80440
Rename class to be singular
2017-04-25 09:53:43 +01:00
Rebecca Law
43226dc932
Added a new rates table.
...
We only need one rate per channel. This reflects that. The provider_rates has been left for now, it is still not being used.
New dao has been added to select the right rate for the given notification_type and date of notificaiton.
2017-04-24 16:20:03 +01:00
Ken Tsang
04796b39a8
Add international sms feature flag in db
2017-04-24 12:43:19 +01:00
Imdad Ahad
c4fac1d937
Revert "Revert "add DVLA organisations to API""
2017-04-21 16:05:07 +01:00
Imdad Ahad
9fbd43c072
Serialise notifications for csv separately:
...
* Introduces separate method on Notification to serialise the notification
* ready for csv output
* Fixes issue where job_row_number = 0 not being accounted for correctly
2017-04-20 11:52:00 +01:00
Ken Tsang
89e244ccd2
First commit
2017-04-19 10:51:12 +01:00
Martyn Inglis
8956338d31
Add a new task to update a job to error - note it leaves the notifications in whatever state they were in.
2017-04-18 11:42:48 +01:00
Rebecca Law
add0cfa62f
Add a task for the FTP app to call that will update the job to sent to dvla and all the notifications for that job as sending.
2017-04-06 17:16:08 +01:00
Ken Tsang
9e4b1b2bfc
Add schemas, endpoints and supporting tests
2017-03-14 15:40:38 +00:00
Rebecca Law
ecb63a8008
Add new job status.
...
ready to send == we have created a dvla file in S3, the job id is in the file name
sent to dvla == we have created an aggregate dvla file to send for the day and have sent the file via sftp
2017-03-10 16:33:15 +00:00