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

Bug: Research in the device list #893

Closed
adcoly opened this issue Jul 1, 2022 · 1 comment · Fixed by #894
Closed

Bug: Research in the device list #893

adcoly opened this issue Jul 1, 2022 · 1 comment · Fixed by #894
Assignees
Labels
bug Something isn't working
Milestone

Comments

@adcoly
Copy link

adcoly commented Jul 1, 2022

Expected Behavior

I should find my device by typing the ID of the device.

Current Behavior

It does not work when there is uppercase letter in the id.

@adcoly adcoly added the bug Something isn't working label Jul 1, 2022
@hocinehacherouf
Copy link
Contributor

hocinehacherouf commented Jul 1, 2022

This bug occurs on searching devices and edge devices, when the device ID contains alpha characters : The backend sets the the device ID to lowercase when executing the search query.

Affected lines :

filter += $" AND (STARTSWITH(deviceId, '{searchText.ToLowerInvariant()}') OR (is_defined(tags.deviceName) AND STARTSWITH(tags.deviceName, '{searchText}')))";

filter += $" AND (STARTSWITH(deviceId, '{searchText.ToLowerInvariant()}') OR (is_defined(tags.deviceName) AND STARTSWITH(tags.deviceName, '{searchText}')))";

Solution:

Replace deviceId, '{searchText.ToLowerInvariant()}' by deviceId, '{searchText}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🚀 Ready
Development

Successfully merging a pull request may close this issue.

3 participants