Commit Graph

2894 Commits

Author SHA1 Message Date
Martyn Inglis
efb045fc68 Removed pre-populate column to run after migration 2017-06-05 11:55:13 +01:00
Martyn Inglis
b296e736f2 Reorder the migrations. 2017-06-05 11:51:30 +01:00
Martyn Inglis
f15d235d1e Merge branch 'master' into firetext-inbound-sms 2017-06-05 11:33:53 +01:00
Martyn Inglis
400096520d Not null the provider column on the inbound SMS table. 2017-06-02 16:51:27 +01:00
Martyn Inglis
199c43c507 Migration script to populate the provider.
- initial build of this ONLY support MMG so we can assume that all existing entries are all MMG, so any nulls == MMG.
- This PR will put in fire text so not so safe to keep doing this back and forward.
2017-06-02 16:49:11 +01:00
Martyn Inglis
012f8d2675 Adds provider onto the inbound sms table so we know where this came from. 2017-06-02 16:37:57 +01:00
Imdad Ahad
56c3f3cf7c Add task to delete inbound sms everyday at 1am 2017-06-02 16:10:27 +01:00
Imdad Ahad
0631b6c988 Add dao to delete inbound sms after seven days 2017-06-02 16:10:27 +01:00
Martyn Inglis
3e1de2e901 Capture the fire text callbacks.
Parse the form data, and stop the message
2017-06-02 15:58:36 +01:00
Leo Hemsted
449c47c227 Merge pull request #1010 from alphagov/inbound-sms-api
Inbound sms api
2017-06-02 15:54:58 +01:00
Leo Hemsted
69c299dd6c ensure international numbers are handled correctly
the international flag semantically means 'Should we throw an error if an
international number is passed in?' (and the answer is no. We should not.)
2017-06-02 15:20:18 +01:00
Leo Hemsted
bf18b179b0 ensure the user_number in inbound sms is international
rather than using the `normalise_phone_number` function, use the
`validate_and_format_phone_number` function - this will also convert
all numbers to international format, which means we won't need to
worry about whether the user enters internaional or UK phone numbers
when searching
2017-06-02 15:20:18 +01:00
Leo Hemsted
ef52337d85 add inbound sms api
two endpoints:
* get all inbound sms for a service (you can limit to the X most
  recent, or filter by user's phone number [which will be normalised])
* get a summary of inbound sms for a service - returns the count of
  inbound sms in the database, and the date that the most recent was
  sent
2017-06-02 15:20:18 +01:00
Leo Hemsted
d89cb2c120 add an admin_request fixture
this gets rid of some boilerplate around mocking requests
from the front-end
2017-06-02 15:19:24 +01:00
Rebecca Law
91a525e213 Merge pull request #1000 from alphagov/letters-billing-table
Added table and model for letter rates.
2017-06-02 15:03:12 +01:00
Rebecca Law
9d80bdc70f Merge branch 'master' into letters-billing-table
Conflicts:
	app/models.py
2017-06-02 14:47:28 +01:00
Leo Hemsted
92752ff408 Merge pull request #1009 from alphagov/mmg-inbound-datetimes
parse datetimes from mmg inbound sms
2017-06-02 10:32:51 +01:00
Leo Hemsted
d9bdacb5cd parse datetimes from mmg inbound sms
the DateRecieved field from MMG comes in with +s instead of spaces,
and uriencoded (the same as how they format their messages)
Make sure we decode this, and then convert to a UTC timestamp
2017-06-02 10:14:01 +01:00
Leo Hemsted
cb219ffea8 Merge pull request #1008 from alphagov/recieved
mmg spell received incorrectly, lets use that
2017-06-02 09:09:55 +01:00
Leo Hemsted
dba4e2ad89 mmg spell received incorrectly, lets use that 2017-06-01 17:27:09 +01:00
Leo Hemsted
891a29e1dc Merge pull request #995 from alphagov/inbound-sms
add inbound sms table
2017-06-01 16:26:47 +01:00
Martyn Inglis
3df868823d Fixed DB migration order 2017-06-01 15:58:15 +01:00
Martyn Inglis
c57e2a6894 Merge branch 'master' into inbound-sms
Conflicts:
	app/notifications/receive_notifications.py
	tests/app/notifications/test_receive_notification.py
2017-06-01 15:56:33 +01:00
minglis
a4c8f83839 Merge pull request #983 from alphagov/remove-nasty-query-from-dashboard
Remove nasty query from dashboard
2017-06-01 15:31:02 +01:00
Martyn Inglis
c29f95381e Remved test re-added as part of a merge 2017-06-01 14:57:46 +01:00
Martyn Inglis
a60d40bbc0 Merge branch 'master' into remove-nasty-query-from-dashboard
Conflicts:
	tests/app/service/test_rest.py
2017-06-01 14:47:00 +01:00
Chris Hill-Scott
af087f36d6 Merge pull request #1005 from alphagov/hide-one-off-dashboard
Ignore one-off messages in job list on dashboard
2017-06-01 14:37:50 +01:00
Chris Hill-Scott
eb493f6817 Rename ‘One-off message’ to ‘Report’
See 7915845cb5
2017-06-01 13:56:47 +01:00
Leo Hemsted
e068f6815f Merge pull request #1007 from alphagov/version-fix
fix versions
2017-06-01 13:20:33 +01:00
Leo Hemsted
ab50a3557e fix versions 2017-06-01 13:18:56 +01:00
Leo Hemsted
3e47519045 Merge pull request #1006 from alphagov/revert-1001-revert-988-non-null-again
Revert "Revert "Remove nulls from sms_sender""
2017-06-01 13:14:03 +01:00
Leo Hemsted
dd9fd6cf92 still return RECEIVED even if we couldn't find a matching service
mmg don't need to retry that message or anything. just log it.
2017-06-01 13:13:51 +01:00
Martyn Inglis
7f65aa3eef Merge branch 'master' into remove-nasty-query-from-dashboard
Conflicts:
	app/service/rest.py
	tests/app/service/test_rest.py
2017-06-01 13:11:54 +01:00
Rebecca Law
40aadf2748 Merge pull request #991 from alphagov/invite-service-to-schedule
Invite the service to schedule notifications from the API
2017-06-01 12:37:32 +01:00
Chris Hill-Scott
78d071f22f Ignore one-off messages in job list on dashboard
Same as how we ignore ‘send yourself a test’ messages (see:
d8467bfc3c). The dashboard gets clogged
up with one off messages otherwise, which affects:
- performance
- users ability to find their jobs
2017-06-01 12:30:47 +01:00
Leo Hemsted
d33698216c Revert "Revert "Remove nulls from sms_sender"" 2017-06-01 11:00:26 +01:00
Imdad Ahad
0141e53c7a Merge pull request #1002 from alphagov/imdad-fix-use-python3-make-command
Use python3 when running migration-check script
2017-06-01 10:57:53 +01:00
minglis
94e0315715 Merge pull request #1004 from alphagov/firetext-inbound-sms
Firetext inbound sms
2017-06-01 10:28:53 +01:00
minglis
501506f849 Merge pull request #996 from alphagov/stop-reading-from-old-queues
Removed references to old queus
2017-06-01 09:43:12 +01:00
Leo Hemsted
309759690d Merge pull request #1003 from alphagov/fix-govuk-migration
manually set sms_sender when creating service
2017-06-01 09:43:04 +01:00
Martyn Inglis
a7fd624db5 Added simple logging endpoint for fire text inbound SMS calls
- logs post data
- OK to log all as not currently in use so no real user data expected.
2017-06-01 08:21:18 +01:00
Leo Hemsted
1530908228 manually set sms_sender when creating service
sqlalchemy default doesn't appear to work correctly when there is a
difference between the DB schema and the code (ie: during a migration)
in this case, lets just set sms_sender ourselves.

we can't write unit tests for this because this only happens when the
db is in an inconsistent state 😩
2017-05-31 17:31:06 +01:00
Martyn Inglis
8e3b20e51d Gone back to 1G as fails if less 2017-05-31 16:46:56 +01:00
Rebecca Law
e3baf71016 Update error message 2017-05-31 16:22:56 +01:00
Martyn Inglis
3c416d3631 Simple end point for fire text inbound SMS callbacks. 2017-05-31 16:15:25 +01:00
Martyn Inglis
502024b3bc Boost API to 1G from 256M 2017-05-31 15:56:56 +01:00
Rebecca Law
505aae6f92 Merge branch 'master' into letters-billing-table 2017-05-31 15:49:23 +01:00
Imdad Ahad
726371269a Use python3 on jenkins otherwise SSL erorr occurs 2017-05-31 15:38:57 +01:00
minglis
5d75f2f871 Merge pull request #999 from alphagov/reduce-memory-footprint
Reduced memory footprint of the API apps.
2017-05-31 15:08:44 +01:00
minglis
033fe0f4dd Merge pull request #998 from alphagov/update-queues-script
Did some work around the delete queues script
2017-05-31 15:08:35 +01:00