mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V2.2 to HEAD
7531: Merged V2.1 to V2.2 7397: Fix and improvments to all web-client People pickers - all now search on Username and build Lucene queries rather than XPath. Fixes AWC-853, AWC-935, AWC-1180, AWC-1660 Merge conflicts resolved around query strings and client session cluster changes 7532: Added action to go back to last deployment report in history panel 7533: Moved deploy actions to resources panel header in review task dialog git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8400 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -43,6 +43,7 @@ import org.alfresco.service.cmr.repository.InvalidNodeRefException;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.search.SearchParameters;
|
||||
import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.context.IContextListener;
|
||||
@@ -320,20 +321,18 @@ public class UsersDialog extends BaseDialogBean implements IContextListener, Cha
|
||||
|
||||
// define the query to find people by their first or last name
|
||||
String search = properties.getSearchCriteria().trim();
|
||||
StringBuilder query = new StringBuilder(256);
|
||||
query.append("TYPE:\"{http://www.alfresco.org/model/content/1.0}person\" AND (");
|
||||
StringBuilder query = new StringBuilder(128);
|
||||
for (StringTokenizer t = new StringTokenizer(search, " "); t.hasMoreTokens(); /**/)
|
||||
{
|
||||
String term = QueryParser.escape(t.nextToken());
|
||||
query.append("((@\\{http\\://www.alfresco.org/model/content/1.0\\}firstName:*");
|
||||
query.append("@").append(NamespaceService.CONTENT_MODEL_PREFIX).append("\\:firstName:*");
|
||||
query.append(term);
|
||||
query.append("*) OR (@\\{http\\://www.alfresco.org/model/content/1.0\\}lastName:*");
|
||||
query.append("* @").append(NamespaceService.CONTENT_MODEL_PREFIX).append("\\:lastName:*");
|
||||
query.append(term);
|
||||
query.append("*) OR (@\\{http\\://www.alfresco.org/model/content/1.0\\}userName:");
|
||||
query.append("* @").append(NamespaceService.CONTENT_MODEL_PREFIX).append("\\:userName:");
|
||||
query.append(term);
|
||||
query.append("*)) "); // final space here is important as default OR separator
|
||||
query.append("*");
|
||||
}
|
||||
query.append(")");
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Query: " + query.toString());
|
||||
|
Reference in New Issue
Block a user