Commit Graph

6033 Commits

Author SHA1 Message Date
Rebecca Law
8c6cebca17 Merge pull request #2358 from alphagov/remove-edit-folder-permission
Remove edit folder permission
2019-02-15 14:44:00 +00:00
Rebecca Law
718626f639 Remove all edit_folder permissions from service_permissions 2019-02-15 14:35:34 +00:00
Rebecca Law
331414d379 Merge pull request #2357 from alphagov/remove-edit-folder-permission
Remove the need for the edit_folders service permission.
2019-02-15 13:19:48 +00:00
Chris Hill-Scott
26ea503fc8 Merge pull request #2355 from alphagov/service-volumes
Add fields to record a service’s estimated volumes
2019-02-15 10:18:37 +00:00
Chris Hill-Scott
7ca62ce4cf Bump migration version 2019-02-15 10:09:44 +00:00
Chris Hill-Scott
f679731af8 Also store consent to research against a service
It makes most sense to collect this at the same time as the estimated
volumes. Which means we need to store it somewhere; we can’t put it
straight into the ticket.
2019-02-15 10:08:22 +00:00
Chris Hill-Scott
ecdf076506 Store anticipated volumes as integers
This will make it easier to do analysis on the data. Almost all users
are submitting data in a numerical format now anyway, because we ask the
question in a sensible way.
2019-02-15 10:08:22 +00:00
Chris Hill-Scott
17e32fa5f6 Add fields to record a service’s estimated volumes
When a service go live we ask people for their estimated sending
volumes. At the moment we only put this in the ticket, and store it in
a spreadsheet.

This means that a service can
- say they want to go live
- say they are sending 100,000 emails per year
- not have created any email templates
- still see ‘create templates’ as ‘completed’ in the go live checklist

If we store this data against the service we can collect it earlier, and
then use it to determine automatically what kind of templates the user
needs to create before their go live checklist can be considered
complete.
2019-02-15 10:08:22 +00:00
Leo Hemsted
f8f7d245b3 Merge pull request #2352 from alphagov/remove-dvla-part-2
remove dvla_organisation from database
2019-02-15 09:15:23 +00:00
Leo Hemsted
06f9e445f7 remove dvla_organisation from database
downgrade re-populates all static data but leaves all services with 001
(HM Government) branding
2019-02-14 14:27:59 +00:00
Leo Hemsted
e890e5cf32 Merge pull request #2351 from alphagov/remove-dvla-part-1
remove dvla_organisation
2019-02-14 14:27:12 +00:00
Rebecca Law
38852c4440 Merge pull request #2346 from alphagov/remove_unused_postage_artifacts
Remove unused postage artefacts
2019-02-13 15:50:10 +00:00
Rebecca Law
63e831c70d Merge branch 'master' into remove_unused_postage_artifacts 2019-02-13 15:44:20 +00:00
Rebecca Law
4ce5724bc7 Fix the downgrade of the migration.
By the way I'm not concerned about fixing service.postage data if we have to rollback.
2019-02-13 15:40:08 +00:00
Leo Hemsted
53ecaa3230 remove dvla_organisation
it's been superceeded by letter branding
2019-02-13 15:02:18 +00:00
Leo Hemsted
5037293724 Merge pull request #2349 from alphagov/stop-using-dvla-organisation
Don't fallback to dvla_organisation if letter branding unset
2019-02-13 14:32:24 +00:00
Leo Hemsted
afc5c96927 Don't fallback to dvla_organisation if letter branding unset
The template preview app now accepts a null value for the `filename` 
parameter. If a service doesn't have a letter branding option set, 
previously we defaulted to their dvla_organisation (probably HM 
Government). Now, we pass through None, so that we generate letters 
without any logo or branding.
2019-02-13 11:58:54 +00:00
Pea Tyczynska
97b1e034b8 Remove service.postage and choose_postage permission from database
Also change constraint on template postage so it cannot be null for
letters

Also add postage to all letters in template_history to respect new constraint
2019-02-13 11:50:00 +00:00
Pea (Malgorzata Tyczynska)
a8ee92cf03 Merge pull request #2348 from alphagov/remove_service_postage_and_choose_postage_from_code
Remove service postage and choose postage from code
2019-02-13 11:09:35 +00:00
Leo Hemsted
b5b1056c02 Merge pull request #2343 from alphagov/reqs
reqs bump
2019-02-13 10:20:09 +00:00
Pea Tyczynska
08663b386c Don't test whether deleting service doesn't delete service permission
types. As we found it unncessarry.
2019-02-12 14:38:35 +00:00
Pea Tyczynska
6320882876 Make service postage nullable 2019-02-12 12:15:38 +00:00
Pea (Malgorzata Tyczynska)
d65315335b Merge pull request #2347 from alphagov/fix_templates_history_postage
dao_update_template_reply_to maintains postage in TemplateHistory
2019-02-12 11:05:41 +00:00
Pea Tyczynska
2b0668c7c8 Fix dao_update_template_reply_to so it maintains postage in TemplateHistory 2019-02-12 10:41:44 +00:00
Pea Tyczynska
8ea55c3f5c Remove service.postage and choose_postage permission from models
Also change constraint on templates postage so letter postage
cannot be null
2019-02-11 18:22:46 +00:00
Pea Tyczynska
8ef581de69 Remove service.postage and choose_postage permission from the code and tests 2019-02-11 18:20:34 +00:00
Rebecca Law
38a599c758 Remove the need for the edit_folders service permission.
We need another PR to remove it from ServicePermissionTypes and remove the data in service_permissions.
2019-02-11 17:26:17 +00:00
Leo Hemsted
a6660b7d91 Merge pull request #2345 from alphagov/wigan
fix new services being assigned to wrong letter branding
2019-02-11 13:44:14 +00:00
Leo Hemsted
478de8bb8e fix new services being assigned to wrong letter branding
when creating a service, the api accepts a `service_domain` field that
it uses to populate the letter branding - if the service domain is
known to match an existing letter branding option, use that
automatically. However, the admin currently doesn't know about this
field yet so doesn't pass anything through - the api erroneously
searches the DB for letter branding with a domain of None - which they
currently all have.

This meant that when services were created, their letter branding was
set to the most recent row in the DB (that matched None).
2019-02-11 11:46:33 +00:00
Chris Hill-Scott
e708c93b1c Merge pull request #2344 from alphagov/html-response
Return rendered HTML when previewing a template
2019-02-08 15:09:51 +00:00
Chris Hill-Scott
aab36157a5 Test for HTML response in the schema
Because we test for the other properties in the schema.

Also sets `additionalProperties` to `False` so we’re forced to update
the schemas if we make similar changes in the future. This means
removing `created_by` from the test data because it’s not returned by
the real response.
2019-02-08 13:10:42 +00:00
Chris Hill-Scott
f185dbecbe Return rendered HTML when previewing a template
If you’re trying to show what a Notify email will look like in your
caseworking system all the API gives you at the moment is raw markdown
(with the placeholders replaced).

This isn’t that useful if your caseworkers have no idea what markdown
is. If we also give teams the HTML then they can embed this in their
systems, and the people using those systems will be able to see how
headings, bulleted lists, etc. look.
2019-02-07 17:43:46 +00:00
Leo Hemsted
a0e33f0d75 Merge pull request #2320 from alphagov/letter_branding_data_migration
Letter branding data migration
2019-02-07 14:36:35 +00:00
Rebecca Law
429997e778 Data migration to populate letter_branding and service_letter_branding.
Only service_letter_branding is added where the service.dvla_org_id is not 001 (hm-government)
2019-02-07 14:28:09 +00:00
Leo Hemsted
27fc67bdae reqs bump 2019-02-06 16:49:56 +00:00
Chris Hill-Scott
2d9d1945c6 Merge pull request #2311 from alphagov/update-gsi-email-addressess
Update gsi email addresses
2019-02-06 15:47:33 +00:00
Katie Smith
510e6bd7bf Update print statement in command 2019-02-06 15:34:34 +00:00
Pea (Malgorzata Tyczynska)
470b79a092 Merge pull request #2342 from alphagov/choosing_postage_goes_live
Set postage on basis of postage argument or template postage
2019-02-06 14:17:40 +00:00
Katie Smith
c36660708f Fix codestyle 2019-02-06 14:13:45 +00:00
Rebecca Law
53858473d0 Make the replace more specific 2019-02-06 14:08:16 +00:00
Rebecca Law
abc2dbb147 Fix update statement to be case insensitive. 2019-02-06 14:08:16 +00:00
Rebecca Law
9fe9187a19 New server command to remove .gsi from the email address of all users for a given service. 2019-02-06 14:08:16 +00:00
Pea Tyczynska
5b9e6c2086 Set postage on basis of postage argument or template postage 2019-02-06 13:23:09 +00:00
Pea (Malgorzata Tyczynska)
da36de4e38 Merge pull request #2341 from alphagov/migrate_postage_template_history
Migrate postage into templates_history table
2019-02-05 16:49:12 +00:00
Pea Tyczynska
ab5fd972b0 Migrate postage into templates_history table 2019-02-05 15:00:53 +00:00
Leo Hemsted
26a90f72fa Merge pull request #2326 from alphagov/error-downgrade
downgrade error to info for notification not found for callback
2019-02-05 14:51:12 +00:00
Leo Hemsted
0065afad11 downgrade error to info for notification not found for callback
When we get a callback from SES, we identify the notification by the
SES reference that we set on the notification after sending. When we
wrote the log message, we assumed that we'd always have a notification
for every callback, so if one couldn't be found we would raise an error
log. This isn't the case for a few reasons:

* We might receive a callback before the sender worker has persisted
  the reference to the database.
* We might have deleted the notification, especially if the service has
  a short data retention period
* We sometimes receive callbacks for references that we have no record
  of whatsoever (this is quite alarming but we have no way of knowing
  why this happens)

The error logs were happening pretty frequently, and we don't have a
real way to solve them at the moment, so lets cut down on noise and
downgrade them to info level for now.
2019-02-05 14:44:51 +00:00
Chris Hill-Scott
f6d3e87de5 Merge pull request #2286 from alphagov/folders-for-all-services
Give folders to all existing services
2019-02-01 15:19:35 +00:00
Chris Hill-Scott
cf2d88c87e Squeeze in some letter logos too 2019-02-01 15:11:51 +00:00
Chris Hill-Scott
a04f41d4d8 Give folders to all existing services
Step 2 of 2 of shipping folders.
2019-02-01 15:04:27 +00:00