openhatch

Issue450

Title Searching at /people/ for someone's username should let you find them
Milestone later Priority bug
Waiting On Status resolved
Superseder Nosy List jacquiesue, palhmbs, paulproteus
Assigned To jacquiesue Keywords bitesize

Created on 2011-06-15.18:26:17 by paulproteus, last changed 2012-01-23.20:58:53 by paulproteus.

Files
File name Uploaded Type Edit Remove
0001-Updated-the-default-case-for-people-search-AllTagsQu.patch jacquiesue, 2012-01-23.03:49:43 application/octet-stream
0002-remove-invalid-comment-in-file.patch jacquiesue, 2012-01-23.03:59:29 application/octet-stream
Messages
msg2907 (view) Author: paulproteus Date: 2012-01-23.20:58:49
Some feedback on these patches:

It's good to separate style fixes into separate commits. I'm glad you fixed my
mis-spelling of the word "quotation", but it's easier to review if that is its
own separate patch.

In general, it's usually pretty easy for me to review a series of patches; try
to ensure that each one is somehow a coherent change.

git on my computer complains about some lines of yours that have a " " character
(space) as the last character on the line.

I didn't realize that one could use the | character to combine QuerySet objects
like that. That's awesome.

Your test is also of good quality! I'm glad you test the case-insensitivity. I
generally prefer to make assertions about the contents of a list, but since you
have a QuerySet, it's a little harder. For that reason, you could convert it to
a list like:

self.assertEqual([User.objects.get(username='spinoza')], list(atq_filter_spinoza))

The way you have it is fine, so I'm not going to change it.

Also, you have what seems to be a debugging print left commented-out at the top
of the
PeopleFinderTagQueryTests.test_all_tags_insensitive_case_search_multiple_names
method. I'll remove that, although it's a great thing to have while testing. I
also like to do "import pdb; pdb.set_trace()" to break into a debugger when
running my own tests.

I've pushed this, and will deploy it once it passes the Hudson automated testing
at http://linode2.openhatch.org:8080/ . Yay -- marking as 'resolved'!
msg2905 (view) Author: jacquiesue Date: 2012-01-23.03:59:29
forgot to delete a line, adding patch for that
msg2904 (view) Author: jacquiesue Date: 2012-01-23.03:49:43
Updated the people search. 

One word in the search text will search: username, tags, first name, and last
name, then return all matches.

More than one word in the search text will search: tags (as one string, e.g.
"regular expressions"), first name (for each word), and last name (for each
word) then return all the matches.

The searches are case insensitive.

Updated and ran test: python manage.py test profile.PeopleFinderTagQueryTests,
also ran python manage.py test profile.
msg2154 (view) Author: paulproteus Date: 2011-07-03.03:29:17
Realistically, this depends on issue89 and 
http://lists.openhatch.org/pipermail/devel/2011-July/002150.html

Un-marking as bitesize.
msg2112 (view) Author: palhmbs Date: 2011-06-23.21:14:48
Mkman is taking a look at this. 

He asked for some help on IRC, so I pointed him at 
mysite/profile/templates/profile/people.html
mysite/profile/templates/profile/search_people.html

I also think that mysite/profile/controllers.py is relevant.

Hope this helps track down the bogey.
msg2077 (view) Author: paulproteus Date: 2011-06-15.18:26:15
Right now, when you search on /people/ for a username, you actually can't find a
person. We only let you search by metadata like project and people's tags.

That's kind of silly, and ProfSheinRIT on IRC ran into this problem. So here's a
bug for it, targeted for closure during June (0.11.06).
History
Date User Action Args
2012-01-23 20:58:53paulproteussetstatus: need-review -> resolved
messages: + msg2907
2012-01-23 03:59:30jacquiesuesetfiles: + 0002-remove-invalid-comment-in-file.patch
messages: + msg2905
2012-01-23 03:49:46jacquiesuesetstatus: chatting -> need-review
assignedto: jacquiesue
messages: + msg2904
files: + 0001-Updated-the-default-case-for-people-search-AllTagsQu.patch
nosy: + jacquiesue
2011-11-24 19:43:29paulproteussetblockers: - Ditch haystack and rewrite people search code to use MySQL queries
2011-07-03 03:29:17paulproteussetblockers: + Ditch haystack and rewrite people search code to use MySQL queries
messages: + msg2154
2011-07-02 20:14:16palhmbssetstatus: in-progress -> chatting
milestone: 0.11.06 -> later
2011-07-01 15:52:15Mkmansetassignedto: Mkman -> (no value)
nosy: - Mkman
2011-06-23 21:15:00palhmbssetstatus: chatting -> in-progress
2011-06-23 21:14:49palhmbssetstatus: unread -> chatting
assignedto: Mkman
messages: + msg2112
nosy: + palhmbs, Mkman
2011-06-15 18:26:17paulproteuscreate