hotosm / tasking-manager

Tasking Manager - The tool to team up for mapping in OpenStreetMap
https://wiki.openstreetmap.org/wiki/Tasking_Manager
BSD 2-Clause "Simplified" License
509 stars 275 forks source link

Search notifications by sender #1656

Open wireguy opened 5 years ago

wireguy commented 5 years ago

The filter for the 'From' field is matches with the beginning of the text. This is different from the 'Project' field which allows for partial matches.

example: I want to filter all the messages from 'guy', but I can't remember if the name was Wiseguy Niceguy Someguy... allow me to use 'guy'.

wireguy commented 5 years ago

Taking a guess.

https://github.com/hotosm/tasking-manager/blob/ae4ea0fb80ebf5b9deae9eb2d8d05378f8c598c3/server/services/messaging/message_service.py#L218

should it be? query = query.join(Message.from_user).filter(User.username.ilike( '%' + from_username + '%'))

wireguy commented 5 years ago

hmm... HACK if I type %guy in the field, then I get the desired result

pantierra commented 5 years ago

This is related to our new notifications page #1644