Commit Graph

6562 Commits

Author SHA1 Message Date
Rebecca Law
2b0ef807d6 Merge pull request #2568 from alphagov/add-nhs-trust-org
Add email and letter branding to the add organisation command
2019-07-30 14:49:22 +01:00
Rebecca Law
b39da01573 Remove white space from email branding column. 2019-07-30 14:34:23 +01:00
Leo Hemsted
2b06e810c5 Lower the max dvla zip size from 500mb to 40mb
There's a bug in pysftp that appears to cause quadratic performance loss. See https://github.com/paramiko/paramiko/issues/1141 for more details.

As a temporary band-aid fix, lower the size of the files we're sending.
2019-07-29 17:23:22 +01:00
Leo Hemsted
de42b1004d Merge pull request #2567 from alphagov/handle-405s
handle 405s
2019-07-29 16:28:27 +01:00
Rebecca Law
467d9780c1 Add email and letter branding to the add organisation command (by csv file) 2019-07-29 15:35:54 +01:00
Leo Hemsted
2c2eb2abad handle 405s
Handle werkzeug http errors separately. Also, improve the generic
`Exception` handler to be more flexible when exceptions don't look
like http errors.

note: because they're 405s the route isn't matched, so the v2 error
handlers don't trip properly. this might be an issue because the
internal endpoints expect a different return format. Might have to
think about how to handle this.
2019-07-26 13:26:20 +01:00
Pea (Malgorzata Tyczynska)
359016de6a Merge pull request #2565 from alphagov/migrate_org_types
Migrate org types
2019-07-26 10:51:42 +01:00
Pea Tyczynska
5977adef1c Add live to excluded environments in migration 2019-07-25 16:03:08 +01:00
Pea Tyczynska
38bb2c1cf6 Simpify org types migration script and introduce foreign key
Don't transform org types on prod
2019-07-24 17:55:56 +01:00
Katie Smith
d8d85db7c3 Merge pull request #2564 from alphagov/engagement-team-report
Add endpoint with data for report for the engagement team
2019-07-23 10:13:14 +01:00
Katie Smith
b4a6aecbb9 Add endpoint to return monthly notification stats per service
This will be used by notifications-admin to create a CSV report.
2019-07-23 10:00:50 +01:00
Katie Smith
81de71dc1f Add dao function that gets the required data 2019-07-23 10:00:50 +01:00
Pea Tyczynska
5b256fa64e Migrate all orgs and services onto new organisation types
Remove all mentions of generic 'nhs' organisation type.
2019-07-22 14:58:41 +01:00
Pea (Malgorzata Tyczynska)
da61bb3b06 Merge pull request #2557 from alphagov/more_org_types
Introduce new organisation types and organisation_types db table
2019-07-22 14:55:30 +01:00
Pea (Malgorzata Tyczynska)
c0966ad90d Merge pull request #2563 from alphagov/change_content_cancel_letter_job
Change content of error messages when letter job can't be cancelled.
2019-07-22 13:28:11 +01:00
Chris Hill-Scott
01c4ec3e68 Merge pull request #2554 from alphagov/dissociate-default-template-replies
Dissociate letter contact blocks before archiving
2019-07-22 11:55:29 +01:00
Pea (Malgorzata Tyczynska)
957cf46748 Change apostrophes to prettier ones
Co-Authored-By: Chris Hill-Scott <me@quis.cc>
2019-07-22 10:48:34 +01:00
Chris Hill-Scott
da1219fadf Let services have no default letter contact blocks
If they delete the default we’ll treat ‘Blank’ as the default on the
frontend.
2019-07-22 10:40:18 +01:00
Chris Hill-Scott
dd225fbc6e Dissociate letter contact blocks before archiving
Otherwise you can’t archive it.
2019-07-19 15:40:28 +01:00
Pea Tyczynska
edda816ffa Temporarily add generic 'nhs' 2019-07-19 15:13:24 +01:00
Pea Tyczynska
aa88252cf7 Drop making crown not nullable on downgrade as it would fail anyway 2019-07-18 17:05:24 +01:00
Pea Tyczynska
610bf5d149 For now include nhs type orgs in allowed organisation types 2019-07-18 17:05:24 +01:00
Pea Tyczynska
d89ef0594f nhs_central is crown org and also we do not update org type while
updating service anymore.
2019-07-18 17:05:24 +01:00
Pea Tyczynska
e4cb56b5d3 Emergency service instead of emergency services 2019-07-18 17:05:23 +01:00
Pea Tyczynska
8a3ac8400f Update service type and crown when service is added to organisation 2019-07-18 17:05:23 +01:00
Pea Tyczynska
9dfc550f46 Add org types table 2019-07-18 17:05:22 +01:00
Rebecca Law
ed6f9e4736 Merge pull request #2562 from alphagov/fix-reporting-tables
Bug fix for report tasks (stat tables)
2019-07-18 17:05:16 +01:00
Rebecca Law
996dcdd88c Increase the number of days we rebuild the tables for 2019-07-18 16:45:27 +01:00
Pea Tyczynska
e9de84beb0 Change content of error messages when letter job can't be cancelled.
This content was first done without help of content designer so
now it is improved with the help of one. New content is more
in line with the content in the admin app and more human-readable
and following GOV.UK standard.
2019-07-18 16:38:08 +01:00
Rebecca Law
a52c65ea29 Remove the delete query when updating the ft_billing. It's in the wrong place and we also should not need it. 2019-07-18 16:24:06 +01:00
Katie Smith
5ce3f2661c Merge pull request #2561 from alphagov/bump-utils
Bump utils to 33.2.4
2019-07-18 15:38:41 +01:00
Rebecca Law
ed611f982c We found a problem with the report tasks that populate the fact tables (or statistic tables). It is possible that the notification status can change for notifications after 4 days.
This PR updates those queries to look in either Notification or NotificationHistory. Since the data does not exist in both tables at the same time we can do with and not worry about the data retention.
The query will iterate over each service, then each notification type and query the data if no results then try the history table.
2019-07-18 15:29:54 +01:00
Katie Smith
3a9bc36b54 Bump utils to 33.2.4 2019-07-18 15:27:13 +01:00
Katie Smith
68f19b847c Merge pull request #2560 from alphagov/bump-utils
Bump utils to 33.2.3
2019-07-18 14:43:04 +01:00
Katie Smith
db95a8460b Bump utils to 33.2.3 2019-07-18 14:11:41 +01:00
Katie Smith
663ab6d96b Merge pull request #2553 from alphagov/automtically-set-service-org-type
Set org_type of a service when adding/updating org org type
2019-07-16 10:22:06 +01:00
Chris Hill-Scott
46fa576a2c Merge pull request #2558 from alphagov/bump-utils-33.2.2
Bump utils to 33.2.2
2019-07-15 15:24:38 +01:00
Chris Hill-Scott
a87a8f3fc6 Bump utils to 33.2.2
Changes:
- https://github.com/alphagov/notifications-utils/compare/33.2.1...33.2.2
2019-07-15 15:16:38 +01:00
Katie Smith
cec87a9de0 Delete unused code
* The `_should_record_notification_in_history_table` function stopped being
used in this commit: c23ae15f32
* `NOTIFICATIONS_ALERT` stopped being used in this commit: 5aa37f09b6
2019-07-12 16:43:37 +01:00
Katie Smith
1671221642 Set org_type of a service when adding/updating org org type
The organisation_type of a service should match the organisation_type of
the service's organisation (if there is one). This changes
dao_update_organisation and dao_add_service_to_organisation to set the
organisation_type of any services when adding / updating an org.
2019-07-12 16:43:37 +01:00
Leo Hemsted
86f14563d0 Merge pull request #2548 from alphagov/mou-recipts
tell people when they've signed an MOU
2019-07-12 16:00:50 +01:00
Leo Hemsted
a0c0dec429 add tests
include dynamically loading the template contents from the alembic upgrade file itself
2019-07-12 15:14:13 +01:00
Leo Hemsted
8e32995c8d only send emails if a user signed the MOU
the agreement_signed field can also be edited by a platform admin - if
that happened we might not have details for who signed it, and even if
we did they shouldn't find out about, and we don't need an email since
we were the ones who clicked the button.

the `agreement_signed_by` field is only set when a user confirms that
they are signing the MOU on the admin page - not if a platform admin
modifies the page from the platform admin page
2019-07-12 15:08:55 +01:00
Leo Hemsted
07bb0f0332 send emails when MOU is signed
we build up one personalisation dict, and then pass it in to all the
different templates - so be careful editing things. also of note, we
check if the agreement_signed_on_behalf_of is set, and send a different
template with slightly different wording to the person who clicked the
confirm button.
2019-07-12 15:08:55 +01:00
Chris Hill-Scott
3e11d2492a Merge pull request #2552 from alphagov/create-update-org-extra-fields
Add extra fields to create/update organisation
2019-07-12 15:03:56 +01:00
Chris Hill-Scott
df0361b6d9 Merge pull request #2556 from alphagov/bump-utils-br-spacing
Bump utils to bring in changes to email HTML
2019-07-10 11:02:34 +01:00
Chris Hill-Scott
4a2e906dfb Merge pull request #2540 from alphagov/remove-old-fields-from-organisations-and-services
Remove old fields from organisations and services
2019-07-10 11:02:26 +01:00
Chris Hill-Scott
a2e1c812b2 Bump utils to bring in changes to email HTML
Changes:
https://github.com/alphagov/notifications-utils/compare/33.1.0...33.2.1
2019-07-10 10:17:19 +01:00
Leo Hemsted
65a9df0196 Merge pull request #2555 from alphagov/mou-templates
add emails to send when an MOU is signed
2019-07-09 16:05:28 +01:00
Leo Hemsted
a61a28a8c8 add emails to send when an MOU is signed
* tell the user that clicks the button
* tell the notify team
* tell the person that the button was clicked on behalf of

there are two templates for the first case
2019-07-09 11:57:13 +01:00