76 | | 1. Subscription notifications are sent by a cron task sending a request to `/msg/search_subscription_notifications/` |
77 | | * The first query string argument specifies what period this applies to, e.g., daily, monthly, etc. |
78 | | 1. The controller fetches the saved searches with that frequency. |
79 | | 1. The resource is created, and the filters are applied. |
80 | | 1. The resource, with filters, and saved search record is passed to a notification function for the specific notification_method of each saved search. |
| 82 | 1. Scheduled tasks are used to fetch the saved searches for a particular frequency, e.g., daily, monthly, etc. |
| 83 | 1. The notification function fetches the saved searches with that frequency. |
| 84 | 1. An HTTP request is made for each search so that the search results are filtered properly. |
85 | | |
86 | | === Tasks === |
87 | | Phase I |
88 | | * Implement model |
89 | | * Implement representation functions for query string |
90 | | * Implement or update controllers |
91 | | * `/msg/search_notifications/` to be called via cron, first argument is the frequency. |
92 | | * Records with a `modified_on` value greater than `last_executed` are returned. |
93 | | Phase II |
94 | | * Expand `/msg/search_notifications/` to notify all people within a pr_group by fetching the relevant contact details from all members. |
95 | | * Add formatters/codecs to format the response for Twitter, SMS, etc. |
96 | | * Extend OAuth implementation for Twitter and Facebook to allow posting to users account. |
97 | | |
98 | | === Tests === |
99 | | * Save a search without any filters. |
100 | | * Save a search after performing a search with filters. |
101 | | * Attempt to save a search with empty name; must fail. |
102 | | * Delete a saved search. |
103 | | * Edit and save a saved search. |
104 | | * Executing a search from the saved search list page. |
105 | | * Send notification email. |