Version 29 (modified by 12 years ago) ( diff ) | ,
---|
Table of Contents
Allow person entities (people, groups, organisations) to save a search and subscribe to it, notifying them when the results change.
Overview
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 a Sahana Eden system will add to the platforms' capability of tackling various issues faced in emergency/disaster management.
Models
A single model for holding information about the search query and the parameters that are saved by the user.
- pe_id
- The person entity to be notified when the search results change.
- query
- The query string for the search.
- notification_method
- Subscription mode, e.g., email (default), Twitter, SMS.
- notification_frequency
- How often the search is checked for changes, e.g., never (default), every 15 minutes, daily, weekly and monthly.
- last_executed
- The date and time the search was last executed by the subscription method
Views
Search
Each 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.
Saved Search List
Each 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.
(The any/all option will require special extraction)
Query parameters will be displayed as human-readable definition lists, e.g.:
- Page
- Search Organisations (?)
- Type
-
Any of
- Red Cross / Red Crescent
- Sector
-
Any of
- DRR
- Food Security
- Home Country
-
Any of
- New Zealand
The user will have three options for each search record:
- run executes the search
- edit allows the user to edit the saved search record
- delete deletes the saved search record
Saved Search Edit
A page to edit a saved search. The pe_id, notification_method and notification_frequency can be changed here.
Workflow
- User executes search
- Saves search
- Name search
- Cron sends request specifying what period this applies to, e.g., daily, monthly, etc.
- Records with a modified_on value greater than the saved search last_executed value are returned.
- last_executed field updated to when the request was made.
Attachments (4)
-
myImage.png
(68.5 KB
) - added by 13 years ago.
save_search widget
-
myImage (1).png
(74.1 KB
) - added by 13 years ago.
Saved Searches Page
- myImage (2).png (88.3 KB ) - added by 13 years ago.
- myImage (3).png (80.3 KB ) - added by 13 years ago.
Download all attachments as: .zip