Changes between Version 37 and Version 38 of BluePrint/SaveSearch_Sub

09/11/12 05:00:03 (12 years ago)
James O'Neill



  • BluePrint/SaveSearch_Sub

    v37 v38  
    1717 pe_id::
    1818  The person entity to be notified when the search results change. Defaults to the pe_id record associated with the current user account.
     19 prefix::
     20  The module prefix where the search was performed.
     21 function::
     22  The controller function where the search was performed. This is used with the prefix to build requests that go through the same controllers.
     23 resource_name::
     24  The module resource that the search is being performed on.
    1925 query::
    2026  The query string for the search.
    7581==== Notifications ====
    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.
     821. Scheduled tasks are used to fetch the saved searches for a particular frequency, e.g., daily, monthly, etc.
     831. The notification function fetches the saved searches with that frequency.
     841. An HTTP request is made for each search so that the search results are filtered properly.
    81851. Records with a `modified_on` value greater than `last_executed` are added to the message.
    82861. Format the response for special media, e.g., Twitter, SMS.
    83871. The message is sent via the method specified.
    84881. `last_executed` field updated to when the request was made.
    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.
    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.