Commit 15111b79 authored by Randy Reddekopp's avatar Randy Reddekopp Committed by Frédéric Buclin

Bug 641519: userAutocomplete is not compatible with Bugzilla configured to use "local" usernames

r/a=mkanat
parent 52f6e88a
...@@ -683,7 +683,7 @@ YAHOO.bugzilla.userAutocomplete = { ...@@ -683,7 +683,7 @@ YAHOO.bugzilla.userAutocomplete = {
id : YAHOO.bugzilla.userAutocomplete.counter, id : YAHOO.bugzilla.userAutocomplete.counter,
params : [ { params : [ {
match : [ decodeURIComponent(enteredText) ], match : [ decodeURIComponent(enteredText) ],
include_fields : [ "email", "real_name" ] include_fields : [ "name", "real_name" ]
} ] } ]
}; };
var stringified = YAHOO.lang.JSON.stringify(json_object); var stringified = YAHOO.lang.JSON.stringify(json_object);
...@@ -693,7 +693,7 @@ YAHOO.bugzilla.userAutocomplete = { ...@@ -693,7 +693,7 @@ YAHOO.bugzilla.userAutocomplete = {
return stringified; return stringified;
}, },
resultListFormat : function(oResultData, enteredText, sResultMatch) { resultListFormat : function(oResultData, enteredText, sResultMatch) {
return ( _escapeHTML(oResultData.real_name) + " (" + _escapeHTML(oResultData.email) + ")"); return ( _escapeHTML(oResultData.real_name) + " (" + _escapeHTML(oResultData.name) + ")");
}, },
debug_helper : function ( ){ debug_helper : function ( ){
/* used to help debug any errors that might happen */ /* used to help debug any errors that might happen */
...@@ -712,7 +712,7 @@ YAHOO.bugzilla.userAutocomplete = { ...@@ -712,7 +712,7 @@ YAHOO.bugzilla.userAutocomplete = {
resultsList : "result.users", resultsList : "result.users",
metaFields : { error: "error", jsonRpcId: "id"}, metaFields : { error: "error", jsonRpcId: "id"},
fields : [ fields : [
{ key : "email" }, { key : "name" },
{ key : "real_name"} { key : "real_name"}
] ]
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment