Commit Graph

2392 Commits

Author SHA1 Message Date
Ken Tsang
fc0cfa5dbf Corrected code to handle template types 2017-04-19 10:51:12 +01:00
Ken Tsang
ed953e992d Add check for subject when email type 2017-04-19 10:51:12 +01:00
Ken Tsang
c33b876c66 Remove get all template print 2017-04-19 10:51:12 +01:00
Ken Tsang
5ef0ecf9bf Added subject to get all templates email template 2017-04-19 10:51:12 +01:00
Ken Tsang
a5e514c356 Refactored to use template response as template 2017-04-19 10:51:12 +01:00
Ken Tsang
d290a2e0ad Removed paging from get all templates 2017-04-19 10:51:12 +01:00
Ken Tsang
e2ad8ba50d Renamed get template test 2017-04-19 10:51:12 +01:00
Ken Tsang
cb7cd233d1 Rrefactored schema 2017-04-19 10:51:12 +01:00
Ken Tsang
89e244ccd2 First commit 2017-04-19 10:51:12 +01:00
Ken Tsang
f5da3574b5 Add get all templates schema 2017-04-19 10:51:12 +01:00
minglis
ddda2bd158 Merge pull request #902 from alphagov/task-to-set-job-to-error
Task to set job to error
2017-04-18 16:07:32 +01:00
minglis
2d4bcde0a8 Merge pull request #901 from alphagov/update-the-notification-with-dvla-id
Added the random string reference to the letter
2017-04-18 15:12:55 +01:00
Martyn Inglis
2b4043515f fixed tests that used the new state. 2017-04-18 14:40:48 +01:00
Martyn Inglis
5081ffc675 roll error jobs into finished state - unsure where to go with these as these have failed, but this leaves them nowhere to go.
Making them finished and the whole job can be re-done.
2017-04-18 14:40:33 +01:00
Martyn Inglis
8956338d31 Add a new task to update a job to error - note it leaves the notifications in whatever state they were in. 2017-04-18 11:42:48 +01:00
Martyn Inglis
6a0efd80ab Add a new status to the job statuses to handle errors. 2017-04-18 11:42:21 +01:00
Martyn Inglis
81f0942f57 Merge branch 'master' into update-the-notification-with-dvla-id
Conflicts:
	requirements.txt
2017-04-18 11:21:26 +01:00
Martyn Inglis
739ff2dceb Extra test on personilisation block 2017-04-18 11:07:11 +01:00
Martyn Inglis
d6fc2335e6 Latest utils 2017-04-13 12:52:56 +01:00
Martyn Inglis
1894c96f3a updated test to use random string not numeric id formats 2017-04-13 12:52:49 +01:00
Martyn Inglis
b8cfaf02f6 Ordered the query - ambiguous orders made tests flaky 2017-04-13 12:52:30 +01:00
Chris Hill-Scott
f0811ca55e Merge pull request #900 from alphagov/bump-utils-dvla-output
Bump utils to fix problems with our output to DVLA
2017-04-13 10:30:14 +01:00
Chris Hill-Scott
78825db160 Bump utils to fix problems with our output to DVLA
Depends on:
- [ ] https://github.com/alphagov/notifications-utils/pull/148
2017-04-13 09:10:27 +01:00
Martyn Inglis
b0e5062df2 Added the random string reference to the letter
- uses the reference field on the notifications table to store a 16char random string used to cross reference DVLA letters back to the notification
- used as letter barcode does not have space for a UUID notification id

Depends on https://github.com/alphagov/notifications-utils/pull/149

Renamed the numeric_id to notification_reference in utils and changed validation rules to match this

Note also the persist_notification method set "reference" to be "client_reference" which is confusing and they are different things, so fixed this too.
2017-04-12 17:56:55 +01:00
Rebecca Law
7a891ab857 Merge pull request #899 from alphagov/update-utils
Reduce boto logging level.
2017-04-11 17:40:21 +01:00
Rebecca Law
b5368d296f Reduce boto logging level.
Update notifications-utils to version 15.1.1 in the hopes that the new logging level for s3tranfer will stop the boto logging of the letters body.
But I can only test this on preview.
2017-04-11 17:28:35 +01:00
kentsanggds
39ed760708 Merge pull request #898 from alphagov/update-letter-jobs
Update letter jobs
response changed to 201
2017-04-11 17:07:12 +01:00
kentsanggds
50ee6d98cd Merge pull request #892 from alphagov/v2-preview-subject-personalisation
V2 preview subject personalisation
2017-04-11 17:05:23 +01:00
Ken Tsang
c1ae3369a6 Update test for 201 response from send_letter_jobs 2017-04-11 16:53:30 +01:00
Ken Tsang
8792461998 Changed response to 201 for send_letter_jobs 2017-04-11 16:42:08 +01:00
Ken Tsang
ccd25382ea Refactored post template 2017-04-11 16:37:30 +01:00
Ken Tsang
7c0aeca66e Removed unused imports 2017-04-11 16:19:43 +01:00
Ken Tsang
06ec7a59a6 Refactored code to personalise subject 2017-04-11 16:19:43 +01:00
Ken Tsang
eba88b08c5 Removed URI from preview response 2017-04-11 16:19:43 +01:00
Leo Hemsted
b55b1007d0 Merge pull request #897 from alphagov/fix-slow-delete
remove slow join from template-last-use query
2017-04-11 16:03:21 +01:00
Ken Tsang
ad6bdbcc97 Removed redundant json import 2017-04-11 15:52:47 +01:00
Ken Tsang
155e173363 Update send letter jobs to return json 2017-04-11 15:44:33 +01:00
Rebecca Law
1e510487e2 Merge pull request #894 from alphagov/refactor-s3-upload
Refactor s3 upload
2017-04-11 11:32:12 +01:00
Rebecca Law
e022fe0403 Update build_dvla_file with a mocked notify_celery.send_task.
Check the task is being called with the right parameters.
2017-04-11 11:13:47 +01:00
Leo Hemsted
c7c47a029f remove slow join from template-last-use query 2017-04-10 17:33:31 +01:00
Rebecca Law
6949779544 Refactor s3upload
s3upload function has been moved to notifications-utils.
https://github.com/alphagov/notifications-utils/pull/138 must be merge first.

Remove scratch code that I was using to test celery.send_task method

Revert the update to default_retry_delay.
Increase the countdown, wait 1 minute before executing the task.

Some of the changes in my previous commit are included here, that branch will be merged before this one, so it will make sense.

Update version of notification_utils

Update the version of notifications-utils
2017-04-10 17:17:58 +01:00
Rebecca Law
65a91c440b Refactor s3upload
s3upload function has been moved to notifications-utils.
https://github.com/alphagov/notifications-utils/pull/138 must be merge first.
2017-04-10 17:12:56 +01:00
Rebecca Law
f8618f8989 Merge pull request #896 from alphagov/task-to-update-letter-job
Update the update statements with the updated_at and sent_at timestamps.
2017-04-07 15:37:20 +01:00
Rebecca Law
7ba9b1d261 Update the update statements with the updated_at and sent_at timestamps. 2017-04-07 15:21:27 +01:00
Rebecca Law
3e216fe83b Merge pull request #895 from alphagov/task-to-update-letter-job
Task to update letter job
2017-04-07 14:49:07 +01:00
Rebecca Law
2d9a449d1e Changed styling 2017-04-07 14:36:00 +01:00
Rebecca Law
5a810a47ac Fix type with status 2017-04-07 13:38:30 +01:00
Rebecca Law
22fc9e3c81 Fix dependency issue. When you import schemas in a test you need to do it locally in the method.
I've just taked it out all together.
2017-04-07 12:29:53 +01:00
Rebecca Law
f7ab49246a Added an endpoint that returns all letter jobs, ordered by created_at desc. 2017-04-07 11:50:56 +01:00
Rebecca Law
61d228e797 Remove test filter 2017-04-07 11:22:03 +01:00