Commit Graph

4416 Commits

Author SHA1 Message Date
Rebecca Law
d6683d9630 If template has a default address use that address ELSE the address is blank. 2018-01-08 15:54:58 +00:00
Rebecca Law
06197478e1 Merge pull request #1548 from alphagov/populate-default_on_letter_templates
Migration script for setting a default on the template.
2018-01-08 10:58:23 +00:00
Rebecca Law
7792c18efb Migration script to update the templates and templates_history (latest version only) with the service default letter contact block. 2018-01-05 17:34:51 +00:00
Rebecca Law
46ef58ab4d Merge pull request #1544 from alphagov/revert-is_letter_contact_blank
Revert adding the is_letter_contact_blank column.
2018-01-05 17:02:31 +00:00
Rebecca Law
884b8f3990 Merge branch 'master' into revert-is_letter_contact_blank 2018-01-05 16:20:50 +00:00
Rebecca Law
acc1842df7 Merge pull request #1545 from alphagov/revert_is_blank-code
Because life is difficult today...
2018-01-05 16:20:09 +00:00
Rebecca Law
f34a380f7f Fix file name 2018-01-05 16:00:29 +00:00
Rebecca Law
0bc42d1873 Forgot script 2018-01-05 15:58:13 +00:00
Rebecca Law
5be5e17e46 Because life is difficult today...
Need to alter the column to nullable and remove reference to the column in any code. Next PR will drop column
2018-01-05 15:55:02 +00:00
Rebecca Law
9e9b8ab1a3 There was a misunderstanding about how we wanted the feature to work.
There is no need for the extra column.
If a template does not have a default address set - they address will be blank.
Otherwise use the address of the service_letter_contact.

There will be another PR to do a db migration.
Template.service_letter_contact = blank if no service_letter_contacts for service ELSE use set Template.serivce_letter_contact_id = service default service_letter_contact
2018-01-05 15:32:43 +00:00
Richard Chapman
89116d683b Merge pull request #1542 from alphagov/rc-sqlalchemy-config-updates
Moved the SQL Alchemy config from staging to all environments
2018-01-05 14:18:48 +00:00
Rebecca Law
ab96932ca0 Merge branch 'master' into rc-sqlalchemy-config-updates 2018-01-05 13:26:34 +00:00
Chris Hill-Scott
01fd43d64d Merge pull request #1541 from alphagov/pyup-update-pytest-3.3.1-to-3.3.2
Update pytest to 3.3.2
2018-01-05 12:46:49 +00:00
Richard Chapman
b90ee832a7 Moved the SQL Alchemy config from staging to all environments
During database upgrades and database fail overs there has been errors
because the database connection stays open, when a query is run the
query fails and the connection is re-established. To avoid these errors
shorter timeouts have been used to keep the connections from getting
stale.

-  SQLALCHEMY_POOL_TIMEOUT timeout idle connections after 30 secs
- Updated SQLALCHEMY_POOL_RECYCLE to recycle the connection every 5 mins

See guide on optimistic disconnect handling - using the pool recycle
as a way to manage this:
http://docs.sqlalchemy.org/en/latest/core/pooling.html#disconnect-handling-optimistic
2018-01-05 05:53:40 +00:00
pyup-bot
4ef287e8b2 Update pytest from 3.3.1 to 3.3.2 2018-01-05 00:00:16 +00:00
Rebecca Law
8ace370765 Merge pull request #1540 from alphagov/fix-reply-to
Fix the schema for reply_to and added reply_to_text.
2018-01-04 16:18:31 +00:00
Rebecca Law
0c5625fb8b Fix the schema for reply_to and added reply_to_text. 2018-01-04 15:56:58 +00:00
Rebecca Law
d9668974ae Merge pull request #1539 from alphagov/update_template_schema
Update template schema to return the contact block
2018-01-04 12:21:36 +00:00
Rebecca Law
6e6f388f88 Merge branch 'master' into update_template_schema 2018-01-04 11:45:36 +00:00
Rebecca Law
6a3831eace Added a boolean column to templates called is_letter_contact_blank.
If is_letter_contact_blank then the user has set the letter contact block to be blank on purpose
ELSE IF is_letter_contact_blank is false THEN use the template default
IF template default is blank THEN the service_letter_contact is blank use the service default
2018-01-04 11:33:10 +00:00
Katie Smith
9b18afc314 Merge pull request #1506 from alphagov/remove-delivery-receipt-callback-for-letters
Remove the delivery receipt callback for letters
2018-01-03 17:05:24 +00:00
Katie Smith
83711a9a0d Remove the delivery receipt callback for letters
This has been removed because the services only see one status.

Pivotal story: https://www.pivotaltracker.com/story/show/153674962
2018-01-03 16:41:10 +00:00
Sakis
5301a7198d Merge pull request #1532 from alphagov/clean-makefile
Clean makefile
2018-01-03 16:05:16 +00:00
Athanasios Voutsadakis
39181ba5b3 Merge branch 'master' into clean-makefile 2018-01-03 15:58:30 +00:00
Rebecca Law
33e8e55dc6 Update the tests and revert adding the service_letter_contact_id 2018-01-03 15:30:26 +00:00
Rebecca Law
8732506138 Add reply_to in the template schema 2018-01-03 15:10:16 +00:00
Athanasios Voutsadakis
48c37dcaee Merge branch 'master' into clean-makefile 2018-01-03 13:48:34 +00:00
Katie Smith
2e7f1579bb Merge pull request #1536 from alphagov/group-letters-into-max-number-of-files
Group letters into a max number of files for sending to DVLA
2018-01-03 13:27:32 +00:00
Katie Smith
440012288d Add test for max file size and file count when grouping letters 2018-01-03 11:31:22 +00:00
Katie Smith
644b110a8d Group letters into a max number of files for sending to DVLA
Grouping the letters into a maximum number of files is necessary because
the SQS task needs to be under a certain size. We also compress the task
when sending.
2018-01-03 11:31:22 +00:00
Chris Hill-Scott
609fabe206 Merge pull request #1515 from alphagov/custom-invite-urls
Allow admin to specify domain to use for invite links
2018-01-03 11:28:08 +00:00
Chris Hill-Scott
a6a44987a1 Allow admin to domain to use for invite links
When we’re doing user research we often:
- start the task by inviting the participant to a service on Notify
- have them use a prototype version of the admin app, hosted on a
  different domain

Currently we can’t do both of these things together, because the invite
emails always send people to `notifications.service.gov.uk` (because
it’s the API that sends the emails, and the prototype admin app points
at the production API).

This commit changes the API to optionally allow an instance of the admin
app to specify which domain should be used when generating invite links.
2018-01-03 10:47:16 +00:00
Alexey Bezhan
713b1eaf35 Merge pull request #1505 from alphagov/set-sms-sender-to-international-format
Set SMS sender to international format
2018-01-03 10:41:01 +00:00
Alexey Bezhan
7df9fdf42a Normalize outbound SMS sender number in notifications API
Some of the tests don't set up a service sms_sender, so we need to
check if it's None before trying to format the number.
2018-01-03 10:32:34 +00:00
Alexey Bezhan
d5b6bd85fe Normalize outbound SMS sender number in one off notifications 2018-01-03 10:32:34 +00:00
Alexey Bezhan
545ff7dda6 Normalize outbound SMS number for job notifications
Replaces 0 with 44 in UK SMS sender number to make it possible to
respond to the SMS from an international number.
2018-01-03 10:32:34 +00:00
Athanasios Voutsadakis
2470faf04b Remove unused scripts
These were referenced by appspec and have not been used since we
migrated to paas, so they can be removed.
2018-01-02 14:25:40 +00:00
Chris Hill-Scott
577fe623b0 Merge pull request #1535 from alphagov/markdown-links-emails
Enable Markdown links in emails
2018-01-02 12:20:09 +00:00
Chris Hill-Scott
45c9c084e7 Enable Markdown links in emails
Brings in:
- [ ] https://github.com/alphagov/notifications-utils/pull/293
2018-01-02 11:22:18 +00:00
kentsanggds
f4796f39b0 Merge pull request #1510 from alphagov/collate-letter-pdfs-for-day
add collate-letter-pdfs task
2018-01-02 10:56:18 +00:00
Leo Hemsted
9debc96c8c exclude non-pdfs from collate task
and fix celery kwargsg
2018-01-02 10:39:21 +00:00
Leo Hemsted
309b4d7d33 add collate-letter-pdfs task
add collate-letter-pdfs task (name pending). This retrieves a list of
letter pdf files (just the metadata, not the actual data) from s3, and
loops through them, calling the ftp task zip-and-send-letter-pdfs. It
groups them up by adding them to lists while counting the total
filesize, if it gets over a certain filesize (currently set to 500mb)
it breaks at that chunk, sends off that list of files to the ftp app,
and then starts building up a new list.

DVLA have a hard 2gb limit on how big the zip files we can send is -
however we're going to be limited by the amount of memory on the ftp
app well before we get around to handling 2gb of pdf data - so the
limit is 500mb for now. We'll adjust it after we see how ftp performs.
2018-01-02 10:39:21 +00:00
Athanasios Voutsadakis
806e880ec2 Fix .PHONY reference 2017-12-28 18:29:31 +00:00
Athanasios Voutsadakis
e06b15aa3b Remove unused cf-build and cf-build-with-docker
We are using the non-cf versions of these commands
2017-12-28 18:28:51 +00:00
Athanasios Voutsadakis
4cc8bfb174 Remove unused DNS_NAME variable 2017-12-28 18:28:02 +00:00
Athanasios Voutsadakis
d487d57509 Remove targets related to AWS deployments
Also remove checks for unused variables
2017-12-28 18:24:36 +00:00
Athanasios Voutsadakis
2b829e1f17 Remove upload-codedeploy-artifact target 2017-12-28 18:21:39 +00:00
Athanasios Voutsadakis
a833bbf6d5 Remove build-codedeploy-artifact target
Also remove appspec files that are not used in the paas world.
2017-12-28 18:18:32 +00:00
Leo Hemsted
360fa787f9 Merge pull request #1531 from alphagov/reqs-txt
update requirements.txt
2017-12-28 11:25:38 +00:00
Leo Hemsted
d2080d754f update requirements.txt 2017-12-28 10:58:15 +00:00