-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
List people by profile tag at /people/TAGNAME #2087
Conversation
Generated by 🚫 Danger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. We now at public lab uses User instead of DrupalUser for users model. DrupalUser is legacy model.
Could you please change DrupalUser to User. |
@SidharthBansal Yes I know 😃. But there is a problem using User here as we are using user.last in the list view page and it is not defined when using a User variable(using id instead of uid). Also other cases in list function are using DrupalUsers model and issue didnt include changing the model so I went ahead with this.Maybe if @jywarren suggests we could work around to use User model for all cases. |
We are trying to stop using User.where(id: ... ).collect(&:id) Make sense? |
Thank you!!!! This is exciting! |
And indeed, you should be able to swap |
I see the issue on the view, too! Good catch. We can add a method to the def last
self.drupal_user.last
end The other spot we'd need to change would be:
Here, we could just switch to: Hope that helps!!! |
@jywarren There some more things I have encountered. I think users status values are opposite in both models which I have reversed also aliased node_count method in User model. Also I Read the comment in User model: Also one last thing, people#id was earlier leading to 'legacy#profile' i.e. user profile so that would be overriden with this. |
You're right -- there's some weirdness to this part of the code we need to work around. @publiclab/reviewers -- is anyone able to help @rishabhptr work through some of these issues? I'm occupied this afternoon and I know some of you are pretty familiar with this stuff. Thank you!! |
So, take a look at this example of how to reference Lines 97 to 103 in f52a4f5
What do you think? Could you model on this to solve the issue? Thank you!!!! |
@jywarren Thanks for the info also I was actually waiting for the ongoing work to update user status from DrupalUser status because at people list page we check to show only users not banned so after that fix we could easily use User model without any work-around for the same. 😄 |
OK, that sounds good -- I'm trying to link to that issue or PR here, but can't find it. Based on #2156, can we now rely on them being synced? @ViditChitkara -- what do you think? Thanks all! |
Yes, they should now be synced. Although we have a bit of encoding issue for the same (#2209), however it won't really effect here. |
Yeah the User status seems to be synced now , thanks @ViditChitkara , @jywarren I have made the required changes, sorry for the delay 😄 |
There was a small issue that on joining user and node table , status attribute of node was selected hence I have added rusers.status in select query, I hope that's the right way to go 😄 |
Oh no! Sorry i should've tried merging this in earlier but didn't see it marked |
Hi, just checking if you've gotten stuck on this at all, or if I could help in any way? Thanks! |
Allow to view people by their profile tag at /people/tag-name. Fixes publiclab#2071
@jywarren Hey, sorry for the delay. I have resolved the conflicts 😄 |
Awesome work!!! This is going to be great!!! 👍 👍 🎉 |
Allow to view people by their profile tag at /people/tag-name. Fixes publiclab#2071
Fixes #2071
Make sure these boxes are checked before your pull request is ready to be reviewed and merged. Thanks!
rake test:all
Please be sure you've reviewed our contribution guidelines at https://publiclab.org/wiki/contributing-to-public-lab-software
We have a loose schedule of reviewing and pulling in changes every Tuesday and Friday, and publishing changes on Fridays. Please alert developers on plots-dev@googlegroups.com when your request is ready or if you need assistance.
Thanks!