Changes between Version 29 and Version 30 of BluePrint/SaveSearch_Sub


Ignore:
Timestamp:
08/22/12 03:47:59 (9 years ago)
Author:
James O'Neill
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BluePrint/SaveSearch_Sub

    v29 v30  
    11[[TOC]]
    22
    3 Allow person entities (people, groups, organisations) to save a search and subscribe to it, notifying them when the results change.
     3Allow person entities (people, groups, organisations) to save a search and be notified when the results change.
    44
    55* ~~[wiki:DeveloperGuidelines/SaveSearchAndSubscription Developer Guidelines]~~
     
    1111
    1212=== Models ===
    13 A single model for holding information about the search query and the parameters that are saved by the user.
     13A single model for holding information about the search query and the parameters that are saved by the user. This will be in `/modules/eden/pr.py` as a component of `pr_entity`.
    1414
     15==== Saved Search ====
     16 name::
     17  Name of the saved search as specified by the user.
    1518 pe_id::
    16   The person entity to be notified when the search results change.
     19  The person entity to be notified when the search results change. Defaults to the pe_id record associated with the current user account.
    1720 query::
    1821  The query string for the search.
     22 notification_format::
     23  Format for the notification, either a list (default), map, report, graph (this is a report).
    1924 notification_method::
    2025  Subscription mode, e.g., email (default), Twitter, SMS.
    2126 notification_frequency::
    22   How often the search is checked for changes, e.g., never (default), every 15 minutes, daily, weekly and monthly.
     27  How often the search is checked for changes, e.g., never (default), every 15 minutes (not hourly?), daily, weekly and monthly.
    2328 last_executed::
    24   The date and time the search was last executed by the subscription method
     29  The date and time the search was last executed by the subscription method. Set to match `modified_on` when record is first created.
     30
     31==== Public Saved Searches ====
     32 saved_search::
     33  The saved search to make public.
     34 
    2535
    2636=== Views ===
     
    3747 Page::
    3848  Search Organisations (?)
     49 Search::
     50  search strings
    3951 Type::
    4052  Any of
     
    5466
    5567==== Saved Search Edit ====
    56 A page to edit a saved search. The pe_id, notification_method and notification_frequency can be changed here.
     68A page to edit a saved search. The `name`, `pe_id`, `notification_format`, `notification_method` and `notification_frequency` can be changed here.
    5769
    5870=== Workflow ===
    59711. User executes search
    60 1. Saves search
     721. Activate Save Search widget
     731. Redirected to Save Search add form
    61741. Name search
    62 1. Cron sends request specifying what period this applies to, e.g., daily, monthly, etc.
    63 1. Records with a modified_on value greater than the saved search last_executed value are returned.
    64 1. last_executed field updated to when the request was made.
     751. Request is sent to `/msg/search_notifications/`, with the first query string argument specifying what period this applies to, e.g., daily, monthly, etc.
     761. Records with a `modified_on` value greater than `last_executed` are returned.
     771. `last_executed` field updated to when the request was made.
     781. If the pr_entity is a group, fetch the appropriate contact details from each member. Recursively?
     791. Format the response for special media, e.g., Twitter, SMS.
     80
     81=== Tasks ===
     82* Implement model
     83* Implement representation functions for query string
     84* Implement or update controllers
     85* Extend OAuth implementation for Twitter and Facebook to allow posting to users account.
     86
     87=== Tests ===
     88* Save a search without any filters.
     89* Save a search after performing a search with filters.
     90* Attempt to save a search with empty name; must fail.
     91* Edit and save a saved search.
     92* Executing a search from the saved search list page.
     93* Sending the notification email