Commit Graph

5235 Commits

Author SHA1 Message Date
Chris Hill-Scott
60ec5777be Merge pull request #1904 from alphagov/pyup-update-flask-migrate-2.1.1-to-2.2.0
Update flask-migrate to 2.2.0
2018-06-14 13:24:11 +01:00
Chris Hill-Scott
6e4ea76b73 Merge pull request #1892 from alphagov/pyup-update-marshmallow-sqlalchemy-0.13.2-to-0.14.0
Update marshmallow-sqlalchemy to 0.14.0
2018-06-14 13:23:59 +01:00
Chris Hill-Scott
f88d853d3a Merge pull request #1890 from alphagov/pyup-update-pyjwt-1.6.3-to-1.6.4
Update pyjwt to 1.6.4
2018-06-14 13:23:18 +01:00
Chris Hill-Scott
f1dfcfad7f Merge pull request #1897 from alphagov/pyup-update-pytest-3.6.0-to-3.6.1
Update pytest to 3.6.1
2018-06-14 13:20:38 +01:00
Chris Hill-Scott
7ac1ca517c Merge pull request #1905 from alphagov/smart-phone-search
Search for emails or texts, depending on term
2018-06-14 12:37:02 +01:00
Chris Hill-Scott
5741dd9251 Merge pull request #1901 from alphagov/add-caseworking-service-permission
Add ‘caseworking’ service permission
2018-06-14 10:33:39 +01:00
Chris Hill-Scott
27faf7912b Search for emails or texts, depending on term
The caseworking view is going to have a page which displays emails and
text messages combined together.

In order for the search to work on this page the user needs to be able
to search for an email or a text message. This commit makes it guess
what to search for when the `notification_type` isn’t known (basically
by saying ‘if the search term is only digits they’re probably looking
searching by phone number’).
2018-06-14 10:32:04 +01:00
pyup-bot
6100d4df69 Update flask-migrate from 2.1.1 to 2.2.0 2018-06-13 07:59:19 +01:00
Sakis
6d91867dcf Merge pull request #1902 from alphagov/syslog-drain-staging
Add syslog drain on staging
2018-06-11 16:32:21 +01:00
Athanasios Voutsadakis
11f69d2a0a Add syslog drain on staging 2018-06-11 16:14:36 +01:00
Chris Hill-Scott
234c5c705a Add ‘caseworking’ service permission
We want to add the option for a user to have a more restricted view of
Notify.

This should be opt in/out on a per service basis, because it will be
appropriate only for a minority of teams. It shouldn’t be the default
because most teams (those without a lot of users or those only using the
API) won’t need it.

So this commit adds it as a new service permission, which means we can
roll it out:
- in prototype form initially
- then as an opt-in service setting
2018-06-11 13:23:06 +01:00
Rebecca Law
87bff670ff Merge pull request #1900 from alphagov/add-ses-ref
Add some useful information to the log.
2018-06-07 15:18:31 +01:00
Rebecca Law
2381850d05 Refactor - extract common code into a method. 2018-06-07 14:54:40 +01:00
Rebecca Law
56c6d5101c Add some useful information to the log.
Fix unit test to actually test the right thing
2018-06-07 12:30:04 +01:00
Rebecca Law
7511c36dd7 Merge pull request #1899 from alphagov/fix-bounce-logging
Fix logging for a bounce message
2018-06-07 10:49:14 +01:00
Rebecca Law
e353a058e0 We'd like to see what the bounce message is from SES.
If there is a bounce we update the email to failed.
However, there is more than one reason for the failed message. Adding this logging will give us more details about the failure message.
2018-06-07 10:36:04 +01:00
Rebecca Law
439c8024dd Merge pull request #1898 from alphagov/get-all-complaints
Get all complaints
2018-06-06 11:00:37 +01:00
Rebecca Law
4966da8289 Fix to handle_complaints.
The json we were getting from SES was not quite as expected, the test data now reflects what we get.
New test added, fix a test that was passing regardless.
2018-06-06 10:37:31 +01:00
Rebecca Law
c5524a3fe9 [WIP] 2018-06-05 17:23:24 +01:00
Rebecca Law
64f077f2f4 New endpoint to return data for complaints. 2018-06-05 14:25:24 +01:00
pyup-bot
eebaca8df2 Update pytest from 3.6.0 to 3.6.1 2018-06-05 09:23:05 -04:00
Rebecca Law
2bc6315408 Merge pull request #1896 from alphagov/handle-ses-complaints
Save complaints from SES
2018-06-05 11:05:24 +01:00
Rebecca Law
7fa42c2cc5 When SES callback is for a complaint save that to the new complaints table.
When handling the complaint we don't want to throw an exception if the message is missing fields. Only log an exception if we are unable to tie a complaint to a notification.
2018-06-04 17:29:58 +01:00
Richard Chapman
3a7fe69ef7 Merge pull request #1860 from alphagov/pyup-update-flask-0.12.2-to-1.0.2
Update flask to 1.0.2
2018-06-01 14:07:34 +01:00
Richard Chapman
32b176ccc3 Merge pull request #1862 from alphagov/pyup-update-monotonic-1.4-to-1.5
Update monotonic to 1.5
2018-06-01 14:07:24 +01:00
Richard Chapman
b3bc91f189 Merge pull request #1895 from alphagov/rc_add_service_contact_link_to_db
Added Service contact_link column
2018-06-01 14:07:13 +01:00
Richard Chapman
2daaa5e19c Rebase of master and increment filename for as there was already a 196
migration script.
2018-05-31 16:30:14 +01:00
Richard Chapman
aaba157587 Added Service contact_link column
This is going to be used for for the document download citizen landing
page, a service will add a contact link
e.g. https://customerservicecontactnumber.uk/dwp/ which will allow the
user to contact the sending department if there is an error or any
issues with the download.

* Added the contact link to the model
* Added db migration script to add the column to the database
2018-05-31 16:03:12 +01:00
Rebecca Law
06807c3d16 Merge pull request #1894 from alphagov/handle-ses-complaints
Handle ses complaints
2018-05-31 15:52:18 +01:00
Rebecca Law
1faba916b2 New complaints model to persist complaints from SES.
If a someone gets an email from one of our services and then complain about it (mark as spam or otherwise), we get a callback from SES.
The service needs to know about these complaints so they can remove that email from their mailing list.
2018-05-31 14:43:49 +01:00
Rebecca Law
23e6b57c26 Remove email from the log message 2018-05-30 16:45:18 +01:00
Rebecca Law
621c81a9d8 Small refactor to reduce complexity and satisfy codestyle.
This module could do with a look to check if we can simplify it. But at the moment we just want to record the complaint.
2018-05-30 16:25:49 +01:00
Rebecca Law
e82fa2c8d4 Added a way to handle complaint responses from SES.
At this point we are just logging the message so that we can confirm the contents of the SES message.

refer to: https://www.pivotaltracker.com/story/show/157969699
2018-05-30 16:16:36 +01:00
Rebecca Law
9fcfcd5127 Merge pull request #1893 from alphagov/fix-date-issue-for-letters
Fix BST bug
2018-05-30 11:21:11 +01:00
Rebecca Law
41f3293cd5 This fixes a bug where the folder name was not correctly returning the right date because date used to compare was in UTC but the datetime used for the job start time is in BST.
Units tests have been added for the affected method.
2018-05-30 10:18:37 +01:00
pyup-bot
ee6bb99310 Update marshmallow-sqlalchemy from 0.13.2 to 0.14.0 2018-05-29 03:41:50 +01:00
Katie Smith
13c3aaa1b1 Merge pull request #1888 from alphagov/add-timestamps-to-ft-notification-status
Add created_at and updated_at columns to ft_notification_status
2018-05-24 11:35:40 +01:00
Katie Smith
27e66b8506 Merge pull request #1887 from alphagov/pyup-update-pytest-3.5.1-to-3.6.0
Update pytest to 3.6.0
2018-05-24 11:35:33 +01:00
Katie Smith
4d27972c90 Add created_at and updated_at columns to ft_notification_status
Added created_at and updated_at to the ft_notification_status table in order
to make it easier to track down any potential issues with the data.

Also updated the command to populate the data to take created_at and
updated_at into account and to simplify the command. This can all be done in
the same commit since the table is not being used anywhere yet and can
only be populated manually.
2018-05-24 10:51:38 +01:00
pyup-bot
8f40766121 Update pyjwt from 1.6.3 to 1.6.4 2018-05-24 04:12:43 +01:00
Katie Smith
369865cd82 Merge pull request #1885 from alphagov/ft-billing-created-at-non-nullable
Update created_at column of ft_billing to be non-nullable
2018-05-23 12:15:55 +01:00
Katie Smith
29a3264e9b Merge pull request #1873 from alphagov/pyup-update-eventlet-0.22.1-to-0.23.0
Update eventlet to 0.23.0
2018-05-23 12:15:47 +01:00
Katie Smith
105fcb6a67 Merge pull request #1879 from alphagov/pyup-update-pyjwt-1.6.1-to-1.6.3
Update pyjwt to 1.6.3
2018-05-23 12:15:39 +01:00
pyup-bot
95b8cd3819 Update pytest from 3.5.1 to 3.6.0 2018-05-23 12:04:30 +01:00
Katie Smith
c6c118fea1 Update created_at column of ft_billing to be non-nullable
`created_at` was added previously and made nullable temporarily. This
commit now populates the column, ensures that it will always have a
value, and makes `created_at` non-nullable.
2018-05-23 11:09:13 +01:00
Rebecca Law
b405b131f6 Merge pull request #1886 from alphagov/ft_billing-migration-fixes
Fix how the letter rates are selected
2018-05-23 11:07:59 +01:00
Leo Hemsted
9b7cd15586 Merge branch 'master' into pyup-update-monotonic-1.4-to-1.5 2018-05-23 09:59:00 +01:00
Katie Smith
0bd5a12a9c Merge pull request #1884 from alphagov/add-timestamps-to-ft-tables
Add timestamp columns to ft_billing table
2018-05-23 09:49:01 +01:00
Rebecca Law
1567e9bfe5 In order to correctly select the rate for letters you need the billable_unit or page count to use to match on the letter_rates.
A new column is added to the query to populate ft_billing which is only populated for letter.
2018-05-22 17:35:21 +01:00
Katie Smith
f6039d51e0 Add timestamp columns to ft_billing table
Added `created_at` and `updated_at` to the `ft_billing` table - having these
columns makes it easier to track down issues with the data in this table.

`created_at` is nullable initially, but will be changed to non-nullable
once the column is populated and the DAO etc. have been updated.
2018-05-22 14:32:49 +01:00