Rebecca Law
cdbf34eddb
Change order of query
2017-12-19 13:50:21 +00:00
Rebecca Law
e599db2684
Update the query
2017-12-19 13:47:24 +00:00
Rebecca Law
c5c40a0866
Merge branch 'master' into populate-monthly-letter-usages
2017-12-19 13:28:00 +00:00
Alexey Bezhan
4db698b175
Merge pull request #1500 from alphagov/notification-reply-to-text-from-template
...
Notification reply to text from template
2017-12-19 11:06:42 +00:00
Alexey Bezhan
87b56567b2
Set job notifications reply_to_text from the template.reply_to
...
When creating notification objects from the job sets the reply_to_text
from template's reply_to if it's present. Otherwise uses the service
default.
2017-12-19 10:23:24 +00:00
Alexey Bezhan
a98e5247b8
Update notificaiton API endpoints to use template's reply_to
...
Sets the reply_to_text on notification from the template value if
it's set.
2017-12-19 10:23:24 +00:00
Alexey Bezhan
3b0790f950
Add Template.get_reply_to_text helper method
...
Returns either template's reply_to text if set or the related field
from the default service record.
Return value can be used as default for `Notification.reply_to_text`
when per-notification value is not provided.
2017-12-19 10:23:24 +00:00
Alexey Bezhan
8afe9aced7
Allow setting reply_to when creating a test template
2017-12-19 10:23:24 +00:00
Alexey Bezhan
da247680a4
Validate that template reply_to belongs to template's service
...
Checks that email/sms/letter reply to object has the same service_id
as the template it's being attached to, to make sure it's not possible
to retrieve data about return addresses for other services.
2017-12-19 10:23:24 +00:00
Alexey Bezhan
509441f1d9
Add validators for service_letter_contact_id and reply_to
...
Validators check that service_letter_contact_id belongs to the
same service as the notification/template.
Generic reply_to validator calls the correct function for the given
type (for either notification or template). It can be used by the
template API endpoints to verify that given reply_to ID has the same
service_id as the template itself.
The original approach was to create a DB foreign key constraint,
but this caused issues with the `version_class` decorator saving
related Service objects without creating a history record.
2017-12-19 10:23:24 +00:00
Alexey Bezhan
17c239bf3d
Remove accidentally committed app/__ file
2017-12-19 10:23:24 +00:00
kentsanggds
18c4e7df43
Merge pull request #1495 from alphagov/ken-test-manifest-delivery-base
...
Add test for manifest-delivery-base.yml
2017-12-18 16:58:07 +00:00
kentsanggds
b0d0b694e4
Merge branch 'master' into ken-test-manifest-delivery-base
2017-12-18 16:51:00 +00:00
Rebecca Law
c4d869175a
Add join to LetterRates for the billing query.
...
Fix the yearly totals to work for letters.
2017-12-18 16:46:59 +00:00
Alexey Bezhan
8e2f2818d7
Merge pull request #1504 from alphagov/change-reply-to-address-for-invites
...
Change reply to address for invitation emails to be invitation sender
2017-12-18 16:11:35 +00:00
kentsanggds
1048bd026a
Merge branch 'master' into ken-test-manifest-delivery-base
2017-12-18 15:21:38 +00:00
Katie Smith
1b82afb6bb
Change reply to address for invitation emails to be invitation sender
...
If someone receives an invitation email for Notify the reply-to address
of the email was the GOV.UK Notify email address. This has been changed
to be the email address of the user who sent the invite.
Pivotal story: https://www.pivotaltracker.com/story/show/153094646
2017-12-18 11:39:21 +00:00
Rebecca Law
ec28f48968
Merge branch 'master' into populate-monthly-letter-usages
2017-12-18 10:41:33 +00:00
Rebecca Law
995d70740a
Add letter type when getting billing data for financial year
2017-12-18 10:40:13 +00:00
Rebecca Law
e0e64d51d5
[WIP]
...
Fix the query to count rather than sum the billing units.
Need to fix the query that returns the monhtly billing, there is only one row but there should be two if there are two rates.
2017-12-15 17:29:32 +00:00
Venus Bailey
3015d4fc07
Merge pull request #1492 from alphagov/add-mmg-inbound-sms-auth
...
Add MMG_INBOUND_SMS_AUTH config variable and auth check
2017-12-15 15:01:10 +00:00
Rebecca Law
c08f67ea63
Merge branch 'master' into populate-monthly-letter-usages
2017-12-15 14:26:39 +00:00
venusbb
a374f94dbb
Merge branch 'add-mmg-inbound-sms-auth' of https://github.com/alphagov/notifications-api into add-mmg-inbound-sms-auth
2017-12-15 12:22:30 +00:00
venusbb
a57264d5c8
Merge branch 'master' of https://github.com/alphagov/notifications-api into add-mmg-inbound-sms-auth
2017-12-15 12:21:24 +00:00
venusbb
ab66f5c0ac
Change MMG username to look at env variable
2017-12-15 12:19:58 +00:00
Rebecca Law
9b884770e5
Remove extra if clause added when trying to merge.
2017-12-15 11:58:55 +00:00
Leo Hemsted
cc574474eb
Merge pull request #1485 from alphagov/letters-tomorrow
...
put pdfs in tomorrow's dvla bucket after 17:30
2017-12-15 11:55:48 +00:00
Leo Hemsted
1ca252dcf9
put pdfs in tomorrow's dvla bucket after 17:30
...
So if someone sends a letter in the evening, it gets picked up the
next day
2017-12-15 11:47:52 +00:00
Rebecca Law
6ae8415974
Update test
2017-12-15 10:47:55 +00:00
Rebecca Law
63799f5ff2
Merge branch 'populate-monthly-letter-usages' of github.com:alphagov/notifications-api into populate-monthly-letter-usages
2017-12-15 10:34:20 +00:00
Venus Bailey
189692773d
Merge branch 'master' into add-mmg-inbound-sms-auth
2017-12-15 09:21:39 +00:00
venusbb
2e6c46c163
Merge branch 'master' of https://github.com/alphagov/notifications-api into add-mmg-inbound-sms-auth
2017-12-15 09:15:49 +00:00
Rebecca Law
012d80003a
Update montly billing with letters
2017-12-14 17:17:05 +00:00
kentsanggds
a25024f52c
Merge branch 'master' into ken-test-manifest-delivery-base
2017-12-14 17:11:50 +00:00
Ken Tsang
5e1eac1f6f
Add test for manifest-delivery-base.yml
...
- This should ensure that queue names defined in config.py / QueueNames are in the manifest-delivery-base.yml
2017-12-14 17:05:36 +00:00
kentsanggds
42318cc335
Merge pull request #1488 from alphagov/ken-update-letters_pdf-billable_units
...
Update billable units for letters pdf task
2017-12-14 16:30:20 +00:00
kentsanggds
5dc238671f
Merge branch 'master' into ken-update-letters_pdf-billable_units
2017-12-14 16:16:00 +00:00
kentsanggds
cf8770d0c1
Merge pull request #1494 from alphagov/ken-rename-create-letters-pdf-queue
...
Create letters pdf queue was renamed with tasks, but was lost in another merge
2017-12-14 16:14:04 +00:00
Ken Tsang
0ad43f0c5b
Create letters pdf queue was renamed with tasks, but was lost in another merge
...
- needs to be correct name otherwise the delivery worker will not pick up the queue
2017-12-14 16:00:51 +00:00
Leo Hemsted
87ea027824
Merge pull request #1493 from alphagov/error-on-app-crash
...
fix makefile syntax
2017-12-14 15:32:02 +00:00
Leo Hemsted
7d1c4ea722
fix makefile syntax
2017-12-14 15:16:43 +00:00
Ken Tsang
0045cd6b72
Use dao_update_notification to update billable_units for letter notifications
2017-12-14 15:09:25 +00:00
Ken Tsang
f23074596b
Update billable units for letters pdf task
2017-12-14 15:09:25 +00:00
Leo Hemsted
5430eb9fc7
Merge pull request #1491 from alphagov/error-on-app-crash
...
if apps crash on startup, then fail deploy process
2017-12-14 15:06:12 +00:00
Leo Hemsted
c6e6fad01f
if apps crash on startup, then fail deploy process
...
we saw an issue where the app started, then immediately crashed due to
a setup error. However, jenkins had already returned positively, and
the deploy continued.
cf-deploy should fail if the app doesn't start up.
We do this by looking through the cloudfoundry events, and aborting
if there are any `app.crash` events for the new GUID.
2017-12-14 14:23:32 +00:00
Leo Hemsted
304d500078
Merge pull request #1490 from alphagov/leohemsted-patch-1
...
Can't have spaces between queue names in manifest
2017-12-14 13:51:00 +00:00
Katie Smith
a8d3b0952f
Add MMG_INBOUND_SMS_AUTH config variable and auth check
...
Checks authentication header value on inbound SMS requests from
MMG against a list of allowed API keys set in the application
config.
At the moment, we're only logging the attempts without aborting the
requests. Once this is rolled out to production and we've checked
the logs we'll switch on the aborts and add the tests for 401 and 403
responses.
This work has already been done for Firetext in a previous PR:
https://github.com/alphagov/notifications-api/pull/1409
2017-12-14 13:37:50 +00:00
Leo Hemsted
5d3a3ab042
Can't have spaces between queue names
2017-12-14 13:26:38 +00:00
Venus Bailey
a9a8ef8ff1
Merge pull request #1489 from alphagov/vb-callback-seperate-queue
...
Create and use separate queue for callbacks
2017-12-14 11:04:26 +00:00
venusbb
2e7b3cf5e5
Merge branch 'master' of https://github.com/alphagov/notifications-api into vb-callback-seperate-queue
2017-12-14 10:29:31 +00:00