Rebecca Law
0596b210a5
Merge pull request #1033 from alphagov/job-stats-for-dashboard
...
Job stats for dashboard
2017-06-13 14:35:58 +01:00
Imdad Ahad
dfeda93bc5
Merge pull request #1015 from alphagov/imdad-feat-return-content-outbound
...
Return notification content for outbound messages
2017-06-13 12:27:16 +01:00
Rebecca Law
a83e744c68
Remove join to Template table.
...
Fix typo in unit test.
2017-06-13 11:55:14 +01:00
Rebecca Law
4fefec6aa3
New endpoints to return job stats.
...
Next step is to use the new endpoints in admin.
2017-06-13 10:56:03 +01:00
Rebecca Law
cc04b5eb1d
Added new endpoint for job statistics.
...
The structure has been flattened, so I need to create a new endpoint, start using that endpoint, then change the name back.
Added template_id and version to the get job stats by id.
2017-06-12 17:15:32 +01:00
Rebecca Law
c7707873e4
Queries to get job statistics by job_id or by service_id.
2017-06-12 14:25:17 +01:00
Rebecca Law
03c6e74c46
Merge pull request #1024 from alphagov/job-stats-for-dashboard
...
Change the job_statistics table structure
2017-06-08 13:19:15 +01:00
minglis
1b0ff63b1e
Merge pull request #1022 from alphagov/remove-nasty-query-from-dashboard
...
Remove nasty query from dashboard
2017-06-08 10:58:35 +01:00
Imdad Ahad
7e22f3823f
Merge pull request #1021 from alphagov/imdad-feat-get-inbound-by-id
...
Add endpoint to get inbound sms by id
2017-06-07 16:24:17 +01:00
Imdad Ahad
5b4ceda1c6
Refactor:
...
* Filter inbound by service_id
* Refactor to return 404 instead of 400 for consistency
2017-06-07 14:23:31 +01:00
Rebecca Law
1b4097cb16
Add three new columns to job_statistics for sent, delivered and failed.
...
A job only ever has one notification type.
This is the first deploy, where the columns are added and populated.
Next a data migration will happen to populate these new columns for the older jobs that do not have the values set.
Then we stop populating the old columns and remove them.
This refactoring of the table structure will make the queries to the table much easier to handle.
2017-06-07 11:15:05 +01:00
Imdad Ahad
23a501af16
Add dao to get inbound sms by id
2017-06-06 17:11:59 +01:00
Martyn Inglis
cad195949a
Ensure that the bill includes whatever free allowance is applicable.
2017-06-06 16:21:05 +01:00
Imdad Ahad
6b4597149f
Add filter to get jobs to delete (sms, email, letter)
2017-06-06 16:01:27 +01:00
Martyn Inglis
96d30d31b1
Get existing tests to pass.
...
Done by ensuring that the rate limit is 0, so that all messages are billable.
2017-06-06 14:55:37 +01:00
Martyn Inglis
18dcc10a06
Fixed typo
2017-06-06 14:04:11 +01:00
Martyn Inglis
941613a8bf
Merge branch 'master' into remove-nasty-query-from-dashboard
2017-06-06 14:03:47 +01:00
Martyn Inglis
7a03ef3de4
Pseudo Code
2017-06-05 17:25:40 +01:00
Imdad Ahad
bad0ce3d86
Return personalisation in notification dump in search by to
2017-06-05 15:53:57 +01:00
Imdad Ahad
0631b6c988
Add dao to delete inbound sms after seven days
2017-06-02 16:10:27 +01:00
Leo Hemsted
ef52337d85
add inbound sms api
...
two endpoints:
* get all inbound sms for a service (you can limit to the X most
recent, or filter by user's phone number [which will be normalised])
* get a summary of inbound sms for a service - returns the count of
inbound sms in the database, and the date that the most recent was
sent
2017-06-02 15:20:18 +01:00
Martyn Inglis
c57e2a6894
Merge branch 'master' into inbound-sms
...
Conflicts:
app/notifications/receive_notifications.py
tests/app/notifications/test_receive_notification.py
2017-06-01 15:56:33 +01:00
minglis
a4c8f83839
Merge pull request #983 from alphagov/remove-nasty-query-from-dashboard
...
Remove nasty query from dashboard
2017-06-01 15:31:02 +01:00
Martyn Inglis
7f65aa3eef
Merge branch 'master' into remove-nasty-query-from-dashboard
...
Conflicts:
app/service/rest.py
tests/app/service/test_rest.py
2017-06-01 13:11:54 +01:00
Chris Hill-Scott
78d071f22f
Ignore one-off messages in job list on dashboard
...
Same as how we ignore ‘send yourself a test’ messages (see:
d8467bfc3c ). The dashboard gets clogged
up with one off messages otherwise, which affects:
- performance
- users ability to find their jobs
2017-06-01 12:30:47 +01:00
Leo Hemsted
1530908228
manually set sms_sender when creating service
...
sqlalchemy default doesn't appear to work correctly when there is a
difference between the DB schema and the code (ie: during a migration)
in this case, lets just set sms_sender ourselves.
we can't write unit tests for this because this only happens when the
db is in an inconsistent state 😩
2017-05-31 17:31:06 +01:00
Chris Hill-Scott
9ada8b2753
Don’t 500 when searching with bad email address
...
In the future we might want to validate email addresses before
attempting to search by them. But for a first pass we can just return
no results when a user types in something that isn’t an email address
or phone number.
It definitely better than returning a 500.
2017-05-30 14:50:48 +01:00
Leo Hemsted
4a85818c34
add inbound sms table
2017-05-30 10:47:01 +01:00
kentsanggds
263adac805
Merge pull request #984 from alphagov/ken-update-api-service-permissions-handling
...
Ken update api service permissions handling
2017-05-26 14:39:27 +01:00
Ken Tsang
7aca3d8f43
Remove flags process in service_dao.create_service
2017-05-26 12:04:16 +01:00
Imdad Ahad
78c10b7d30
Search notification against normalised recipient with filter for status
2017-05-26 11:45:56 +01:00
Ken Tsang
1375bbe400
Refactor schema to improve error response
2017-05-25 17:55:24 +01:00
Ken Tsang
f7a18f77cf
Update model to cascade permissions assoc proxy
2017-05-25 17:48:09 +01:00
Ken Tsang
234312ece0
Update service permissions to ensure state in sync
2017-05-25 17:48:09 +01:00
Ken Tsang
8e3e31faaf
Updated service DAO and API end points
2017-05-25 17:47:21 +01:00
Rebecca Law
b745e13a28
Merge branch 'master' into schedule-api-notification
2017-05-25 13:37:04 +01:00
Leo Hemsted
d23a92fbc0
Merge pull request #952 from alphagov/international-delivery-receipts
...
update delivery receipts for countries that return them
2017-05-25 13:13:49 +01:00
Rebecca Law
96b0e42959
Merge branch 'master' into schedule-api-notification
...
Conflicts:
app/celery/scheduled_tasks.py
tests/app/celery/test_scheduled_tasks.py
2017-05-24 13:21:22 +01:00
Martyn Inglis
517dc6be8b
Typo removed. Wrong window focus
2017-05-24 09:59:51 +01:00
Martyn Inglis
9dd6041944
Usage DAO can now return rates and billable amount, alongside units.
2017-05-24 08:56:59 +01:00
Martyn Inglis
35af759f87
Adding rates to the billable units query
2017-05-23 13:54:51 +01:00
Martyn Inglis
aaa0f763a1
Updated delete notifications over a week old query
...
- PREVIOUS
based on status. so as we add new status we have some orphaned rows, as these delete queries would miss them
- NOW
based on type. In effect they do the same thing, deleting emails, sms or letters older than a week old irrespective of status. Can see is iterating on this to have more granularity say for letters, so split up. Also means that the delete action isn't so big, as we half the affected rows, by doing it by type.
2017-05-23 13:40:15 +01:00
Rebecca Law
76d0783c63
Add beat config for send-scheduled-notifications task to run every 15 minutes.
...
Added the missing commit to the update pending
2017-05-22 16:30:45 +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
Martyn Inglis
2a0669636d
Add and test new DAO method that counts the billable units multiplied by rate multiplier for a given service for a given time period.
...
Currently this is SMS only.
Used by the dashboard for a headline figure.
2017-05-19 16:42:33 +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
Ken Tsang
54446d5f4d
Add default permissions when creating a service
2017-05-17 14:18:12 +01:00
minglis
05a179c6ef
Merge pull request #941 from alphagov/load-service-on-auth
...
Load service on auth
2017-05-17 10:49:00 +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