Change By: johnwoodlock (03/Sep/12 9:13 PM)
Description: Currently the _javascript_ reference UI lists all clients in a simple dropdown and shows the client name and branch.  This is ok for demo's and tiny MFI's but more powerful searches are needed.

In fact there may not be a 'one-size' fits all search.  Let's say the current one is good for tiny MFI's of up to 200 clients (although system users attached to a branch only see client data for the branch (or under the branch if it isn't at the bottom of the org hierarchy) but other alternatives can be added as well


For this task - lets implement a client name search

1)DB and Client Java Work: add a display_name field to m_client varchar(100) mandatory.  As in the case of staff, it should be returned in any client GETs but can't be part of any POST or PUT (it is derived- Do you think the staff display_name was formatted wrongly (i.e. lastname, firstname).  Anyhow, it's not difficult to adjust the format later so lets do exactly the same for client).

2) For now, add a client name (based on display_name) search button and search text box to the current search 'tab' (so there will be 2 different ways for the moment on the same tab - this is just convenience).  When the user searches all clients
 have  having  the text as part of the display name will be returned.  You can use a JQuery data table like we do in org maintenance menu for display of  results -  client's branch and name - on clicking the  client  name it will go to that client.



If you look at ClientsApiResource.java you will see that the list GET allows a sqlSearch parameter.  This is currently undocumented as we are behind on the api documentation at the moment.  Also, not everyone likes this approach to api's but it will do fine for client searching for now.  Basically,you can do

/clients?sqlSearch=display_name like '%ishwa%'

(you have to add&tenantIdentifer=xxx&pretty=true for standalone testing)

and it will apply that (when display_name is added of course)... try out lastname for a quick test.

Also the api handles restricting client data by the branch of the user automatically so you don't need to worry about that ... just the search.

If any of the above doesn't seem right, feel free to do what you think and/or discuss it.

What do you think is a good way to search for clients?  Certainly, we should add the ability to search on identifying id (like government Id, passport etc) once we put those fields on.

So, in conclusion :), this will be another search option but not the last word in
 the  an evolving  story.





This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mifos-issues mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-issues

Reply via email to