Changes between Version 28 and Version 29 of BluePrint/SaveSearch_Sub


Ignore:
Timestamp:
08/22/12 02:27:14 (13 years ago)
Author:
James O'Neill
Comment:

Updating with new requirements and fixes.

Legend:

Unmodified
Added
Removed
Modified
  • BluePrint/SaveSearch_Sub

    v28 v29  
    11[[TOC]]
    2 = Save Search & Subscription =
    32
     3Allow person entities (people, groups, organisations) to save a search and subscribe to it, notifying them when the results change.
    44
    5 == Save Search and Subscription Functional Specifications ==
    6 [[BR]]
    7 Developer Guidelines - [[BR]]
    8 http://eden.sahanafoundation.org/wiki/DeveloperGuidelines/SaveSearchAndSubscription
    9 [[BR]]
    10 This is wiki page for the project -[[BR]]
    11 http://eden.sahanafoundation.org/wiki/Projects/Advanced/SaveSearch
    12 [[BR]]
    13 http://eden.sahanafoundation.org/wiki/Projects/Advanced/Subscription
    14 [[BR]][[BR]]
     5* ~~[wiki:DeveloperGuidelines/SaveSearchAndSubscription Developer Guidelines]~~
     6* ~~[wiki:Projects/Advanced/SaveSearch Save Search Project]~~
     7* ~~[wiki:Projects/Advanced/Subscription Subscription Project]~~
    158 
    169=== Overview ===
     10In an event of disaster, this functionality would help a lot in terms of providing information (take the example of dissemination of information related to availability of food, shelter, hospitals etc.). The project's essential capability is to disseminate information about various aspects through various means such as email/twitter/sms. Integrating this service into a Sahana Eden system will add to the platforms' capability of tackling various issues faced in emergency/disaster management.
    1711
    18 In an event of disaster, this functionality would help a lot in terms of providing information (take the example of dissemination of information related to availability of food, shelter, hospitals etc.). The project's essential capability is to disseminate information about various aspects through various means such as email/twitter/sms. Integrating this service into Sahana system will add to the platform's capability of tackling various issues faced in emergency/disaster management.
     12=== Models ===
     13A single model for holding information about the search query and the parameters that are saved by the user.
    1914
    20 === Data Model ===
     15 pe_id::
     16  The person entity to be notified when the search results change.
     17 query::
     18  The query string for the search.
     19 notification_method::
     20  Subscription mode, e.g., email (default), Twitter, SMS.
     21 notification_frequency::
     22  How often the search is checked for changes, e.g., never (default), every 15 minutes, daily, weekly and monthly.
     23 last_executed::
     24  The date and time the search was last executed by the subscription method
    2125
     26=== Views ===
    2227
    23 ==== Saved Filters ====
     28==== Search ====
     29Each search page will have a widget the user can activate to save the current search. They will be directed to a new page where they can type a name for the search.
    2430
    25 Holds information about the search query and the parameters that are saved by the user.
     31==== Saved Search List ====
     32Each person entity has a component for saved searches. This page will list all searches saved for this person entity, displaying the name of the search (as defined by the user when it was saved) and the query parameters.
    2633
    27 ||'''Field Name'''||'''Purpose'''||'''Datatype/table'''||'''Required'''||
    28 ||  timestamp ||Keeps the track of time of creation and subsequent modifications. ||table || ||
    29 || user_id ||The user id of the user who saved the search. ||FK referenced from auth_user.id (integer) ||Yes ||
    30 ||subscribed||The subscribed status of the user to a particular saved search.||boolean||Yes||
    31 ||search_vars||The advanced filters selected by the user.||string (Assumption for the time being)||No  ||
     34(The any/all option will require special extraction)
    3235
    33 P.S. - Read filter_vars in the mockups ahead as search_vars
     36Query parameters will be displayed as human-readable definition lists, e.g.:
     37 Page::
     38  Search Organisations (?)
     39 Type::
     40  Any of
     41  * Red Cross / Red Crescent
     42 Sector::
     43  Any of
     44  * DRR
     45  * Food Security
     46 Home Country::
     47  Any of
     48  * New Zealand
    3449
    35 ==== Subscription ====
     50The user will have three options for each search record:
     51* ''run'' executes the search
     52* ''edit'' allows the user to edit the saved search record
     53* ''delete'' deletes the saved search record
    3654
    37 Holds information about the subscription details.
     55==== Saved Search Edit ====
     56A page to edit a saved search. The pe_id, notification_method and notification_frequency can be changed here.
    3857
    39 ||'''Field Name'''||'''Purpose'''||'''Datatype/table'''||'''Required'''||
    40 ||  timestamp ||Keeps the track of last updated time. ||table || ||
    41 ||user_id||The user_id of the user who selects the subscription mode ||FK referenced from auth_user.id (integer)|| ||   
    42 ||subscribe_mode||Describes the mode(s) of subscription selected || || ||       
    43 
    44 
    45 === UI Design ===
    46 
    47 * Save Search Widget - The widget for saving the search will appear on the search results page, basically it will be a button which asks the user the particular search must be saved.[[BR]]
    48 * Review of Saved Searches - A UI will be provided to view the searches that were made in the past. The user will have the option of reviewing the updated search results and delete the saved queries.[[BR]]
    49 * Widget for Subscribing - The widget for subscription will appear on the page which contains all the saved searches, basically it will be a button which asks the user the particular saved search must be subscribed/unsubscrined.[[BR]]
    50 * UI for Updating the User - A link to open the search page for a particular saved search will be present in the page containing saved searches.[[BR]]
    51 
    52 === Files to be modified/created ===
    53 
    54 ==== Modifications ====
    55 
    56 * S3Search Module for the retrieval of filters employed by the user.
    57 * Addition of a save search widget in the search form.
    58 * Addition of functions for saving searches and providing subscriptions in messaging module.
    59 
    60 ==== Created Files ====
    61 
    62 * New files need to be created in views/ for UI.
    63 
    64 === Flowcharts ===
    65 
    66 ==== Screens ====
    67 
    68 '''Save Search Widget-'''
    69 [[Image(myImage.png)]]
    70 
    71 '''Page containing Saved Searches and widget for subscribing -'''[[BR]]
    72 The Advanced Search options are generic.
    73 [[Image(myImage (2).png)]]
    74 
    75 === Timeline ===
    76 
    77 '''First trimester (25 April - 23 May) - '''
    78 ||'''SMART Goal'''||'''Measure'''||'''Due Date'''||'''Status'''||
    79 ||Exploring the S3Search module and adpc code||Preparing a save search model to integrate with the S3Search module and have the basic model in place||23rd May, 2011|| ||
    80 
    81 '''Second trimester (24 May - 11 July) -'''
    82 ||'''SMART Goal'''||'''Measure'''||'''Due Date'''||'''Status'''||
    83 ||Implementing the save search data model||Completion of /models/ part for saving searches||5th June, 2011|| ||
    84 ||Start UI and save search widget development||Elementary UI is in place||15th June, 2011|| ||
    85 ||Testing||Plug the gaps and make it fully compatible with the existing code||19th June, 2011|| ||
    86 ||Implementing the subscription data model||Completion of /models/ part for subscription||27th June, 2011|| ||
    87 ||Start UI development for subscription/updation||Elementary UI is in place||4th July, 2011|| ||
    88 ||Email sending, styling and custom frequency of notification||Feature of notifications through email is in place||11th July, 2011|| ||
    89 
    90 '''Third trimester (12 July - 15 August) - '''
    91 
    92 ||'''SMART Goal'''||'''Measure'''||Due Date||'''Status'''||
    93 ||Testing that Everything Works||Plug the gaps and make it fully compatible with the existing code||17th July, 2011|| ||
    94 ||Documentation and Merging||Code should adhere to standard and it's merging||20th July, 2011|| ||
    95 ||Contingencies and Polishing||Reserve time for contingencies||1st August, 2011|| ||
    96  
    97 
     58=== Workflow ===
     591. User executes search
     601. Saves search
     611. Name search
     621. Cron sends request specifying what period this applies to, e.g., daily, monthly, etc.
     631. Records with a modified_on value greater than the saved search last_executed value are returned.
     641. last_executed field updated to when the request was made.