Mentorship-backend: Search users function with pagination does not work as expected

Created on 14 Jun 2020  路  18Comments  路  Source: anitab-org/mentorship-backend

Describe the bug

Currently when we try and search a user and if he/she is not on the first page, we get an empty list. A proper search function should search the whole db and give the result without being dependent on the page number

To Reproduce
Search the following in the search field
urs or tech (ursula and technouser exist so they should be listed)
image

isa
image

Coding Bug

Most helpful comment

For more clarity adding a few more screenshots:

technodisaster4 user exists but seeing the following
Screenshot from 2020-06-16 14-42-11

And if we try with page number
Screenshot from 2020-06-16 14-42-31
Screenshot from 2020-06-16 14-42-36

@Techno-Disaster would you mind editing the title of this issue to "Search users function with pagination does not work as expected"

All 18 comments

For more clarity adding a few more screenshots:

technodisaster4 user exists but seeing the following
Screenshot from 2020-06-16 14-42-11

And if we try with page number
Screenshot from 2020-06-16 14-42-31
Screenshot from 2020-06-16 14-42-36

@Techno-Disaster would you mind editing the title of this issue to "Search users function with pagination does not work as expected"

Hey @anitab-org/coding-team , anyone up for this?

@rpattath thank you for testing this and helping making the issue more clear

@isabelcosta @adi-001 @Techno-Disaster I would like to work on this issue.

@isabelcosta @Techno-Disaster @rpattath
The search feature is working as expected. Internally, the search function queries for the Name but, not for the username. So, to find a user you must search by Name but not by username.

Explanation for the above given example in the comment:-

The user with username technodisaster4 exists. But, when you searched for techno the user isn't showing up because, the function searches for the user with Name as techno. But, here arises the problem; the Name of the user with username technodisaster4 is Jayesh Nirve. Hence, he would show up only if you search for jayesh but not for techno.

So, @isabelcosta we can close this issue.

@PrashanthPuneriya @isabelcosta shouldn't the feature search depend on the username and not the name? because names can be same usernames are unique?

@Techno-Disaster Yes! I too thought of that. Anyway if we want to search by username then we should raise a feature request.

Anyways a PR for this is up here on the flutter repo and even if you change it from names to usernames it will still work without requiring any additional changes. cc: @isabelcosta

@PrashanthPuneriya hows the PR going?

I think we can close this issue now @vj-codes. What do you think @Techno-Disaster? Are we on the same page or am I missing something.?

I think we can close this issue now @vj-codes. What do you think @Techno-Disaster? Are we on the same page or am I missing something.?

@PrashanthPuneriya the search function still doesn't work on android apk, any idea why?

I mentioned in this comment @vj-codes that it queries by name not username :)

Tried both ways no result, if you can successfully search , could you please upload a gif then we can close this as well as the issue in android repo. @PrashanthPuneriya

@vj-codes I will upload a gif soon. Meanwhile can you please describe the issue? Even this PR was approved as working and merged right?

@PrashanthPuneriya I just downloaded the recent apk again but still no results , the issue here is you try by anyway the search simply doesnt work:(

I think we can close this issue now @vj-codes. What do you think @Techno-Disaster? Are we on the same page or am I missing something.?

yep I agree, I did see a issue for searching both using names and usernames #745 . So this issue is deprecated now :)

Can we close this then?

Closing as discussed in comments.

Was this page helpful?
0 / 5 - 0 ratings