flavour/eden — pull request #640 by ws6ramair (2013-11-18 00:57:50+00:00)
Title: Ticket 1412 org auto complete

Summary of Issue:
Org auto complete was misleading to users in that the auto complete hits were returned as (org_name (acronym)), and if the user typed all of the org_name and attempt to type in the "(acronym)", the hit would disappear.

Root Cause of Issue:
The root cause of this issue was in part due to the way the auto complete results were formatted to the user. Since the user sees all of the "org_name (acronym)" format, he can mistakenly infer that typing that whole entry (including the (acronym) would produce a singular hit, but in actually, it is causing a miss in the search since we only search on org.name and org.acronym (not in the concatenated way that is presented to the user)

Proposed Solution:
The solution takes 3 main changes to address the root cause of the issue:
1) A new "bold as you" explicitly shows the user exactly what can be typed in as a hit.
--This way the user has clear indication on what is an actual hit and what is additional context data (normally the acronym)

2) Separation of hit data from context data.
--In the past, the hit result was appended with some additional context data and displayed to the user.
For example:
Search of: "international" would produce the following:
"International Federation of Red Cross and Red Crescent Societies (IFRC)"

Note that the user is falsely led to believe that the hit name actually includes the (acronym name), when in actuality it does not.

To mitigate this issue, a new context field (if applicable) is displayed in addition to the hit result.
The same search of: "international" would now yield:
"International **Federation of Red Cross and Red Crescent Societies** - (IFRC)"

Note that the hit result and context result are separated by a "-". Further more, "Federation of Red Cross and Red Crescent Societies" of the hit result would be in BOLD to indicate that continue typing would satisfy that hit result. The "-" and the context hit are NOT bolded.

Finally, when the user finally gets to typing the whole org_name: "International Federation of Red Cross and Red Crescent Societies", the widget now knows to no longer display context data for this particular result and the auto complete result omits the context data and looks like this:
"International Federation of Red Cross and Red Crescent Societies"
Note that the context data is no longer there since it is no longer needed.

On selection of this result, the input field is populated with the full name again to confirm to the user the full org_name and acronym name. This is what would be displayed in the input field upon selecting the result:
"International Federation of Red Cross and Red Crescent Societies - (IFRC)"

3) Enhanced acronym search
Thanks in part to 2), we also get a nifty new user feature that improves acronym search.

In the past, searching for "IF" would return this result:
"International Federation of Red Cross and Red Crescent Societies (IFRC)"

The above data result provides no feedback to the user as to what potential chars could come next!

So because of 1) and 2), searching for "PM" now returns this:
"PMI - Indonesian Red Cross Society (Pelang Merah Indonesia)"
Note that the "I" in PMI is **bolded** since it is the last character needed to return a viable hit. Additionally the context data is the actual full org name. (I could not bold single chars in github markup...but it is bolded in real results)

Note how the context data changes dynamically changes upon acronym hit and org hit.

This way we actually get a real "auto-Complete" for both org names and org acronyms along with some nifty context data.

Testing:
I have tested these change in the creation of new staff and all appears to be well. I have read through the developer documentation, but may have missed the part about check in procedures. Do I need to run a smoke test first and provide the results?