Changes between Version 29 and Version 30 of BluePrint/SaveSearch_Sub
- Timestamp:
- 08/22/12 03:47:59 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BluePrint/SaveSearch_Sub
v29 v30 1 1 [[TOC]] 2 2 3 Allow person entities (people, groups, organisations) to save a search and subscribe to it, notifying themwhen the results change.3 Allow person entities (people, groups, organisations) to save a search and be notified when the results change. 4 4 5 5 * ~~[wiki:DeveloperGuidelines/SaveSearchAndSubscription Developer Guidelines]~~ … … 11 11 12 12 === Models === 13 A single model for holding information about the search query and the parameters that are saved by the user. 13 A 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`. 14 14 15 ==== Saved Search ==== 16 name:: 17 Name of the saved search as specified by the user. 15 18 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. 17 20 query:: 18 21 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). 19 24 notification_method:: 20 25 Subscription mode, e.g., email (default), Twitter, SMS. 21 26 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. 23 28 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 25 35 26 36 === Views === … … 37 47 Page:: 38 48 Search Organisations (?) 49 Search:: 50 search strings 39 51 Type:: 40 52 Any of … … 54 66 55 67 ==== Saved Search Edit ==== 56 A page to edit a saved search. The pe_id, notification_method and notification_frequencycan be changed here.68 A page to edit a saved search. The `name`, `pe_id`, `notification_format`, `notification_method` and `notification_frequency` can be changed here. 57 69 58 70 === Workflow === 59 71 1. User executes search 60 1. Saves search 72 1. Activate Save Search widget 73 1. Redirected to Save Search add form 61 74 1. 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. 75 1. Request is sent to `/msg/search_notifications/`, with the first query string argument specifying what period this applies to, e.g., daily, monthly, etc. 76 1. Records with a `modified_on` value greater than `last_executed` are returned. 77 1. `last_executed` field updated to when the request was made. 78 1. If the pr_entity is a group, fetch the appropriate contact details from each member. Recursively? 79 1. 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