Dnn.platform: Searching users based on joined date is not working

Created on 26 Aug 2020  路  9Comments  路  Source: dnnsoftware/Dnn.Platform

Description of bug

Searching users based on joined date is not working

Steps to reproduce

List the precise steps to reproduce the bug:

  1. Hover on 'MANAGE'
  2. Click on 'Users'
  3. Fill joining date in the "Search Users" box
  4. Click on "Search" icon

Current behavior

"No users found" displayed in search result

Expected behavior

Users with the matching joining date should be listed

Screenshots

Before Search
image

After Search
image

Error information

Provide any error information (console errors, error logs, etc.) related to this bug.

Additional context

Provide any additional context that may be helpful in understanding and/or resolving the bug.

Affected version

  • [x] 10.00.00 alpha build
  • [x] 09.07.00 release candidate
  • [x] 09.06.02 latest supported release

Affected browser

  • [x] Chrome
  • [x] Firefox
  • [x] Safari
  • [x] Internet Explorer 11
  • [x] Microsoft Edge (Classic)
  • [x] Microsoft Edge Chromium
New

Most helpful comment

I guess is the idea that you should be able to search by whatever is displayed? Maybe part of the question should be _Does Join Date belong in this short list of user info in the first place?_

All 9 comments

I am not in favor of supporting date search in this place. Let me note a few objections:

  1. Dates do not lend themselves to text boxes as there are so many ways to write them, it is an accident waiting to happen. As a user I won't know if the date was actually correctly parsed or not.

  2. To do this correctly you'd need to have a date picker. And then you'll want a second one to be able to specify a range. That's a lot of screen real estate and processing.

  3. The SQL for user search is already pretty "heavy" (requiring a lot of processing). And any solution would probably mean that even if you don't use this feature you'd still pay the price for it.

  4. I remain unconvinced that this is a feature that is badly needed. Can we get some more feedback on that?

In all I find it hard to see how the use case warrants an intervention of this magnitude.

@donker I agree with this assesment, dates can't be in a text field. I am not against using some screen real estate for a FROM TO date picker or a sort, and I would prefer a solution like that. I do not think it is a big thing for performance or anything, just a UI / Localization / Maintenance thing with the current PR.

  1. Agreed
  2. Agreed (the common DatePicker does support ranges, FWIW)
  3. Agreed
  4. Agreed

I guess is the idea that you should be able to search by whatever is displayed? Maybe part of the question should be _Does Join Date belong in this short list of user info in the first place?_

I think if we're going to support join date, we want to support a lot of other fields that someone could conceivably want to search on. I'd support the addition of an Advanced Search panel with lots of options (that takes a different path in SQL than the non-advanced search, so we don't have a performance issue in the general case).

If you want to provide proper filter performance even on a large user base, you would need an index for each field being searched (comparing "equal", "<", ">" or left based text search only!), which has some penalties on insert/update/delete. If it is an edge case, we should provide it properly in UI - type suggest would be totally wrong for dates IMO. I could imagine an initial search on common text fields (first/last name, username, displayname) and an "extended search" option next to the result list, which includes additional columns.
For registration date, I am still in favour of the sort option, Daniel mentioned before.

With the risk of increasing the scope let me add this:

I personally prefer the search to be fixed on a number of predefined text fields, show the results in bold highlights and then to be able to sort on visible columns. Like FirstName, LastName, DisplayName, Email and Username (note you'd search on all of those at the same time). That would cover the 99% use case.

If you are going to search on join date, the best experience IMHO would be to offer a range slider. I.e. two dots on a line where the beginning of the line is the first known date and the end is today. This slider should be visible at all times so you could search for users with "Joe" and then added between dates X and Y.

This is how I'd do it for a client. A little more work, but 10 times more intuitive IMO.

Based on a discussion on the approvers meeting, the solution for date values is just not an appropriate process to provide a robust solution for users to meet the common expectations that users can leverage with expected results.

We would support and accept a contribution that would add an additional line of inputs for option "from" and "to" dates that support selection with date pickers. If a from date, but no to date would be a >= search. If a to date but no from date would be a <= search. Or between if both values.

This should help keep the performance & experience in-line with expectations.

Thanks @mitchelsellers @donker @sleupold @bdukes @valadas for your inputs.
Based on the inputs, I am closing the PR https://github.com/dnnsoftware/Dnn.Platform/pull/4017.

Was this page helpful?
0 / 5 - 0 ratings