Commit Graph

2045 Commits

Author SHA1 Message Date
Imdad Ahad
fa3f4f3c20 Add dao to store letter contacts and upsert 2017-09-25 12:26:29 +01:00
Rebecca Law
03ea09fd6a Add order by in the dao_get_reply_to_by_service_id() 2017-09-22 10:02:59 +01:00
Rebecca Law
9bc1d13785 Merge pull request #1272 from alphagov/get-reply-to-by-id
New endpoint to fetch a single reply-to email address by id
2017-09-22 09:41:19 +01:00
Rebecca Law
795bd4271c New endpoint to fetch a single reply-to email address by id 2017-09-21 17:02:58 +01:00
Ken Tsang
91a618531d Update serialization and service schema
- added id and service_id in serialization
- added 'letter_contacts' to the exluded list for marshmallow service schema
2017-09-21 16:38:24 +01:00
Ken Tsang
366d07dbbe Add ServiceLetterContact data model and script 2017-09-21 16:08:49 +01:00
Chris Hill-Scott
ee5888f07f Fix sending emails with no logo
Code was not expecting logo to be `None`, thereby causing the task to
throw an exception, and retry until eventually putting the email in
technical error (for services with org branding but no logo).
2017-09-21 13:37:57 +01:00
Chris Hill-Scott
8360b9a122 Merge pull request #1265 from alphagov/logoless-organsations
Make organisation logo nullable
2017-09-21 13:01:06 +01:00
Rebecca Law
0c9f16a8d1 Add id and service_id to the serialize method on ServiceEmailReplyTo 2017-09-21 10:21:32 +01:00
Rebecca Law
08fdcbfc67 Merge pull request #1266 from alphagov/use-reply-to-from-new-table
Use reply to email address from new table
2017-09-21 09:54:52 +01:00
Leo Hemsted
9afb2c36e7 Merge pull request #1241 from alphagov/letter-received
Letters are accepted, not created or sending
2017-09-20 16:51:31 +01:00
Rebecca Law
9e818a558e Fix the ServiceSchema to only dump the reply_to_email_address 2017-09-20 15:47:29 +01:00
Leo Hemsted
4174c72f21 allow 'accepted' as a proxy for created + sending as well as 'failed' for the three failure types when querying the api 2017-09-20 15:30:14 +01:00
Rebecca Law
06ffac9a0f Merge branch 'master' into use-reply-to-from-new-table 2017-09-20 14:00:04 +01:00
Rebecca Law
3a5706994f Merge pull request #1258 from alphagov/add-multiple-reply-to-email-endpoints
Add multiple reply to email endpoints
2017-09-20 13:26:02 +01:00
Rebecca Law
877d8a2877 Remove the default value - expect it to always be set. 2017-09-20 12:20:12 +01:00
Rebecca Law
c6bf38e869 - is_default is required on the add_service_email_reply_to_request schema
- Added check that the service exists for the POST reply-to methods.
- Added tests
2017-09-20 11:58:18 +01:00
Leo Hemsted
cb3379d0b6 rename received_by_notify to accepted
accepted is nice since it both implies that things look good, while
not being commital about next steps.
2017-09-20 11:20:51 +01:00
Leo Hemsted
4936fa384c return fake "received_by_notify" status for letter notifications
created and sending aren't quite as helpful for letters, since their
journey through notify and our providers is so different to emails/sms.
So instead, we should return estimated_dispatch_date (in a future PR)
and the status should just read received_by_notify
2017-09-20 11:20:13 +01:00
Chris Hill-Scott
bde6a9e131 Make organisation logo nullable
Now we have the org banner branding, not all organisations need a logo.
So it shouldn’t be an error to not provide one.
2017-09-20 11:06:16 +01:00
Rebecca Law
a53a0da414 [WIP] need to fix the tests 2017-09-20 10:45:35 +01:00
chrisw
f49eca5324 Add a non-GOV.UK banner option for email branding
Added an extra name, 'org_banner', for branding types into branding_type table
Added org banner into user model in database
Added checks for new branding type to ensure that the correct data is passed into the dict
Tested new checks in html email options
2017-09-19 14:40:22 +01:00
chrisw
9ecb666290 Fixed bug where a user with an organisation that wanted the GOVUK only branding ended up with both
If a user was to have an organisation selected in the email settings within the platform admin section, they would be sending emails that contained both the organisation's branding and GOV.UK's.

Fix adds a check to ensure that the branding dictionary does not contain organisation details if the the service branding settings is set to 'gov'
2017-09-18 11:33:47 +01:00
Rebecca Law
34aa541199 Merge branch 'master' into add-multiple-reply-to-email-endpoints 2017-09-15 17:13:29 +01:00
Chris Hill-Scott
29a962060f Return delivery estimate for letter notifications
> For get all or get one letter the response needs to be updated so that
> it looks similar to admin app.
>
> status: created|sending --> received letter
> new column: `estimated delivery date`: derived from created at date.
> (see how the admin app is doing it)
>
> NOTE:
> At the moment we only have 2 statuses for a letter created and
> sending, but we will want to have other internal statuses that make
> sense to the Notify team but not our services. When we know those
> statuses the status map will be updated at that point.

– https://www.pivotaltracker.com/story/show/150512525

This commit implements the date (not status) part of this story.
2017-09-15 14:58:07 +01:00
Venus Bailey
0029a0cc0f Merge pull request #1254 from alphagov/Inbound-sms-ip
fixing minor problem, logged ip variable name changed
2017-09-15 14:48:01 +01:00
Leo Hemsted
69ba0ba743 Merge pull request #1249 from alphagov/rename-tasks
use new send-jobs-to-dvla task instead of send-files-to-dvla
2017-09-15 11:33:52 +01:00
Leo Hemsted
c453c06e20 Merge pull request #1224 from alphagov/celery_logging
log unhandled celery exceptions
2017-09-15 11:33:25 +01:00
venusbb
db977be8d0 delete old variable ip 2017-09-15 10:54:25 +01:00
Rebecca Law
6b2c2962c9 New endpoint to insert new service reply to email address and update existing one. 2017-09-14 17:54:38 +01:00
venusbb
09bc392097 Merge branch 'master' of https://github.com/alphagov/notifications-api into Inbound-sms-ip 2017-09-14 16:55:04 +01:00
venusbb
449bc8d8d0 fixing minor problem, logged ip variable name changed 2017-09-14 13:53:08 +01:00
Katie Smith
45512228e1 Merge pull request #1253 from alphagov/add-multiple-reply-to-email-endpoints
Add multiple reply to email endpoints
2017-09-14 13:30:45 +01:00
Rebecca Law
a5d3b787e1 Merge branch 'master' into add-multiple-reply-to-email-endpoints 2017-09-14 13:04:01 +01:00
Rebecca Law
5366968cc9 Added some more tests 2017-09-14 12:23:52 +01:00
venusbb
160b878745 Minor change in how we inteprete Incoming IP 2017-09-13 17:23:23 +01:00
venusbb
d4a3c96a75 Merge branch 'master' of https://github.com/alphagov/notifications-api into Inbound-sms-ip 2017-09-13 17:09:58 +01:00
Katie Smith
72760550bd Add endpoint to get the email reply to addresses for a service
- Changed the dao_get_reply_to_by_service_id method to return a list of
results.
- Added a GET /service/<service_id>/email-reply-to endpoint
2017-09-13 16:58:36 +01:00
Rebecca Law
63b62e74bb Merge pull request #1251 from alphagov/updating-service_sms_senders
Insert or update service sms senders
2017-09-13 15:10:11 +01:00
Chris Hill-Scott
5f696ca696 Merge pull request #1223 from alphagov/quis-patch-1
Warn devs about changing healthcheck page response
2017-09-13 14:11:16 +01:00
venusbb
9efc17a941 Use ipaddress library for the masked bits 2017-09-13 14:08:23 +01:00
venusbb
c285ab0b45 inbound sms monitoring 24bit mask 2017-09-13 11:29:11 +01:00
Rebecca Law
a03c199225 Merge pull request #1238 from alphagov/imdad-migrate-to-new-reply-to
[3/5] Migrate existing data to new service_email_reply_to table
2017-09-13 09:17:20 +01:00
Leo Hemsted
2c758cbccd use new send-jobs-to-dvla task instead of send-files-to-dvla
the tasks (on the ftp app) do the same thing, but to improve clarity
i've renamed it to jobs, because we'll be adding a notifications one
soon
2017-09-12 17:28:07 +01:00
kentsanggds
ca1856eb20 Merge pull request #1246 from alphagov/ken-prevent-blank-letter-address
Raise validation errors for empty letter fields
2017-09-12 14:36:54 +01:00
Rebecca Law
3779f9d1df Merge branch 'master' into updating-service_sms_senders 2017-09-12 12:11:38 +01:00
Rebecca Law
5439b01a6e When an inbound number is allocated insert or update a row in service_sms_senders. 2017-09-12 12:09:32 +01:00
Katie Smith
d88e437005 Merge pull request #1248 from alphagov/update-reply-to-email-test
Update reply to email test
2017-09-12 11:30:06 +01:00
Rebecca Law
d356957974 Change the ServiceEmailReplyTo model to uselist for the backref to services (allow 0 to many reply to emails)
Add another assert in the test
2017-09-12 10:14:58 +01:00
Rebecca Law
9bd3ed2dac Use a unique id 2017-09-12 09:30:55 +01:00