Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensured partial searching utility for users in 'Search for users' page #54

Merged
merged 3 commits into from Apr 12, 2016

Conversation

khanstark
Copy link
Member

When clicking on Users tab, 'Search For Users' page shows some ambiguity in search criteria like--
Find users whose email addresses contain. looks like a partial search criteria, but its not. User has to enter qualified valid email in order to proceed.

So I propose to change the default to make it look that way.

@jensens
Copy link
Sponsor Member

jensens commented Apr 8, 2016

Do they? if so: should they or is this a bug?

@khanstark
Copy link
Member Author

Find users whose email addresses contain. to me,as a user, looks like if i enter 'gmail' then all users with pattern 'gmail' in the email addresses would be listed. But thats not what is being done there.Instead it points out Invalid email address error.
This was also pointed out earlier in an issue : plone/Products.CMFPlone#1499

imo this should be an easy fix.

@jensens
Copy link
Sponsor Member

jensens commented Apr 8, 2016

IIRC it should do partial search starting with a string. So a john.doe@gmail.com can be found with john or john.doe but not by searching for doe or gmail.com. This is at least valid for a vanilla Plone. Addons for users from SQL or LDAP or others may behave differently.

@khanstark
Copy link
Member Author

Yeah that would be great but more changes have to be made to achieve this. 👍
what about name criteria then? If a user enters only 'A' then all users with 'A' in their names would be listed?

@thet
Copy link
Member

thet commented Apr 8, 2016

It would be better to do a wildcard search, so that searching for gmail finds also john.doe@gmail.com.
Not sure, how easy that is.

@khanstark
Copy link
Member Author

Removing constraint=checkEmailAddress, from the schema does the job.
Now partial searching is applicable in all three fields. Searching for 'john' in email field will list all users with addresses %john% without giving errors.
There is ofcourse no need to validate email address by any regex since there is no sense of partial searching then.

@jensens
Copy link
Sponsor Member

jensens commented Apr 8, 2016

+1 for removal of that constraint. This is a regression, it used to work in Plone 4 exact like that.

@jensens jensens added this to the Plone 5.1 milestone Apr 8, 2016
@khanstark
Copy link
Member Author

@jensens what is the problem here ? with the PR i mean..

@gforcada
Copy link
Sponsor Contributor

@khanstark you can see that at the bottom of this discussion there's a "All checks have failed" and a "Plone Jenkins CI - pull-request-5.1" text with a link on the far right saying "Details". If you click on it (e.g. http://jenkins.plone.org/job/pull-request-5.1/114/ ) you will see all the tests that failed due to this pull request being tested against Plone test suite.

@khanstark
Copy link
Member Author

/cc @gforcada

@jensens jensens changed the title Remove ambiguity from Members search page Ensured partial searching utility for users in 'Search for users' page Apr 12, 2016
@jensens jensens merged commit 3b48acb into plone:master Apr 12, 2016
jensens added a commit to plone/buildout.coredev that referenced this pull request Apr 12, 2016
jensens added a commit to plone/buildout.coredev that referenced this pull request Apr 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants