Skip to content

Commit

Permalink
Mnt 22905/case sensitive query fix (#1107)
Browse files Browse the repository at this point in the history
* useCQ = true

* useCQ back to original

* useCQ = true

* Copyright Update

* useCQ restored, Javascrpit changed

* Javascript changes to filter

* PR comments requested change

* Revert "PR comments requested change"

This reverts commit 0673b6c.

* Revert "useCQ restored, Javascrpit changed"

This reverts commit 00b79b5.

* Revert "Copyright Update"

This reverts commit 76d1f1c.

* Revert "useCQ = true"

This reverts commit 215ad95.

* Revert "useCQ back to original"

This reverts commit deb5e82.

* Revert "useCQ = true"

This reverts commit 115910f.

* test change

* Initial changes

* Further changes

* Space deleted

* jobtitle search

* Restore check sorting and mock

* Avoid null [hint:useCQ]

* Wrong sign

* Fix

* Clean up

* Initial changes

* Rename Method
  • Loading branch information
mikolajbrzezinski committed May 17, 2022
1 parent 26c412b commit 1ccb8a2
Show file tree
Hide file tree
Showing 3 changed files with 969 additions and 922 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ function main()

// Get the args
var filter = args["filter"];
if (filter!==null && !filter.includes(":")) {filter += " [hint:useCQ]";}
var maxResults = args["maxResults"];
var skipCountStr = args["skipCount"];
var skipCount = skipCountStr != null ? parseInt(skipCountStr) : -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ function main()
// Get the args
var siteShortName = url.templateArgs.shortname,
site = siteService.getSite(siteShortName),
filter = (args.filter != null) ? args.filter : (args.shortNameFilter != null) ? args.shortNameFilter : "",
filter = ((args.filter != null) ? args.filter : (args.shortNameFilter != null) ? args.shortNameFilter : "" )+ " [hint:useCQ]",
maxResults = (args.maxResults == null) ? 10 : parseInt(args.maxResults, 10),
authorityType = args.authorityType,
zone = args.zone,
Expand Down
Loading

1 comment on commit 1ccb8a2

@luiscolorado
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit breaks the functionality to find groups to add them to a site.

We discovered during testing of Enterprise Alfresco Content Services 7.2.1 that we are unable to add a group to a site. The issue can be reproduce out-of-the-box on version 7.2.1, but not on 7.2.0.

Reproduction steps:

  1. Create a new group in Share named "test-group": in Share, go to Admin Tools -> Groups -> Browse and add the new group.
  2. Open the site "Sample: Web Site Design Project”
  3. Click on the "Add users" icon.
  4. Click on "Groups", and then on the "Add Groups" button
  5. On "Find Groups to add to this site", search for the test group "test" or "test-group"

Expected behavior
The test-group will show up

Actual behavior
It's coming back with “No groups found”.

We reported this to Alfresco Support, case #00755450

The bug was introduced by adding " [hint:useCQ]" to pass to queries that search users.
As you can see in this commit, it was added to people.get.js (which makes sense) and potentialmembers.get.js, which only half makes sense. The latter is the webscript that returns potential members for a site and can search for users, groups or both. When searching for users, that suffix works fine. But when searching for groups, it breaks the search so no groups can ever be returned.

Please sign in to comment.