We need to ensure that the API profile search query returns exact match on username as well. Right now, if a common name is entered in the search query it will return other names and not the exact query we're calling. This issue came about while working on another issue in mapknitter.
https://github.com/publiclab/mapknitter/issues/626
Hi @rarrunategu1, thanks for reporting. Would you like to improve the search API? Thanks!
Yes. thank you.
Great!
@gauravano I'd like to test some code but I need to test a username amongst usernames. I only have the admin signed in with no users to search. I would like to create a situation with usernames on the system and searching a particular name. I tried creating some users on rails console but then realized that it wouldn't give me a user "lot" search. Any suggestions you could help me with?
Hi Rose, can you clarify what you mean by a user "lot" search? Thanks!
On Tue, May 28, 2019 at 3:28 PM rarrunategu1 notifications@github.com
wrote:
@gauravano https://github.com/gauravano I'd like to test some code but
I need to test a username amongst usernames. I only have the admin signed
in with no users to search. I would like to create a situation with
usernames on the system and searching a particular name. I tried creating
some users on rails console but then realized that it wouldn't give me a
user "lot" search. Any suggestions you could help me with?—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/5775?email_source=notifications&email_token=AAAF6J7LRJ6Z2WH4DCUYB2DPXWBSTA5CNFSM4HPGRFFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWNFVXQ#issuecomment-496655070,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAF6J4D7RELNVF6YA3COYLPXWBSTANCNFSM4HPGRFFA
.
Hi @jywarren , I meant like a bunch of users. A search in a "lot" of users....probably not the best word to use.
Hm, so if you wanted to you could make a variety of users following the seeds.rb example:
https://github.com/publiclab/plots2/blob/05ec8a29b19e33090604cc070319ff5686abd6ce/db/seeds.rb#L12-L20
This segment of code generates a bunch of tags:
https://github.com/publiclab/plots2/blob/05ec8a29b19e33090604cc070319ff5686abd6ce/db/seeds.rb#L83-L85
So maybe something like:
20.times do
uniqueNum = (Time.now.to_i + rand(100)).to_s
user = User.create! "username" => "user#{uniqueNum}",
"email" => "user#{uniqueNum}@example.com",
"status" => 1,
"openid_identifier" => nil,
"password" => "password",
"password_confirmation" => "password"
user.role = "basic"
user.save()
end
Then you should be able to search for user and get like 20+ results!
Or, you can test on unstable? You can do changes, push them on unstable and your code will be live at https://unstable.publiclab.org after building. As unstable has lot of data, it would be like testing in the production.
And, @jywarren's approach is there too. Also, we can use https://github.com/stympy/faker for generating fake data in seeds.rb too. Hmm, it's something which we can do for all :thinking:
Hello, I'm having a little trouble testing on unstable. I pushed to unstable and checked the website listed but I don't notice anything changing at all. All I have to do is push it and then check the website right? My apologies this is all new to me.
Hey @rarrunategu1 :wave: , I checked the latest commits on unstable https://github.com/publiclab/plots2/tree/unstable and your changes do not seem to be there...maybe you pushed to your fork...
You can run this command to force push to plots2/unstable git push -f https://github.com/publiclab/plots2 HEAD:unstable after about 20 mins your changes should be visible on https://unstable.publiclab.org. Feel free to ping me if you have any further questions or problems.
Do I need to have permission to push? I changed my remote to publiclab/plots2 and attempted pushing the information but I'm getting this error.
remote: Permission to publiclab/plots2.git denied to rarrunategu1.
Hi @rarrunategu1, yes, you need permission for pushing to unstable. tagging @jywarren if he can provide permission right now.
Also, if you want to test your work right now, feel free to pass the link to your PR and I can push that to unstable for you.
I did a pull request to go into the unstable branch. @gauravano would you please let me know when I can check it? I really appreciate all your help with this.
I have pushed it as you can see your PR merged. You can see your PR building https://jenkins.laboratoriopublico.org/job/Plots-Unstable/lastBuild/console and it'll take 10-15 mins to build. After that, head over to http://unstable.publiclab.org for testing your work.
Thanks!
@rarrunategu1 your work is live at unstable.publiclab.org and just to confirm, the last commit in this - https://jenkins.laboratoriopublico.org/job/Plots-Unstable/lastBuild/changes list of commits is your's, right?
my apologies on permissions, adding them now.
On Wed, Jun 5, 2019 at 6:25 PM Gaurav Sachdeva notifications@github.com
wrote:
@rarrunategu1 https://github.com/rarrunategu1 your work is live at
unstable.publiclab.org and just to confirm, the last commit in this -
https://jenkins.laboratoriopublico.org/job/Plots-Unstable/lastBuild/changes
list of commits is your's, right?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/5775?email_source=notifications&email_token=AAAF6J22HM66XYVHS7UBKHLPZA4L7A5CNFSM4HPGRFFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXBGEWQ#issuecomment-499278426,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAF6J5GCRYNJWDMPYS7EO3PZA4L7ANCNFSM4HPGRFFA
.
Hello, unfortunately I still don't have permission.

Hmm, Gaurav is this how you do it?
On Wed, Jun 5, 2019, 9:07 PM rarrunategu1 notifications@github.com wrote:
Hello, unfortunately I still don't have permission.
[image: image]
https://user-images.githubusercontent.com/29240939/58999836-cbe3d280-87d5-11e9-9a09-4eb41c6c19a6.png—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/5775?email_source=notifications&email_token=AAAF6JZSG35KDKPHQTRKDKTPZBPLNA5CNFSM4HPGRFFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXBOBJY#issuecomment-499310759,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAF6J44ULNOPKV75WJIOA3PZBPLNANCNFSM4HPGRFFA
.
Yes! Adding a guide in our docs too - https://github.com/publiclab/plots2/pull/5847
Thank you @gauravano. I've added my review. @jywarren I still don't have permission to push. I'm stuck right now because my next step also has to do with the questions Iisted on my review on #5847
You want to push more commits?
yes, unfortunately the commit I pushed did not achieve what I wanted it to.
Hi, I'm going to close this as we just completed an overhaul of our search system. Thank you so much for your help!