GateNLP / gate-teamware

A web application for collaborative document annotation.
https://gatenlp.github.io/gate-teamware/
GNU Affero General Public License v3.0
4 stars 0 forks source link

Project search is case sensitive #405

Open freddyheppell opened 7 months ago

freddyheppell commented 7 months ago

Describe the bug

Searching the list of projects is case-sensitive. This makes searching difficult if you're not sure of the exact name of the project, e.g. searching "narrative" will work if the project is called "Tweet narrative" but not "Tweet Narrative" or "Narrative of Politician Tweets" etc...

To Reproduce

Steps to reproduce the behavior:

  1. Create a project called "My Project"
  2. Search "My project"

Expected behavior

Results will be returned regardless of case

Additional context

The RPC backend uses .filter(name__contains=filters.strip()) to handle searching. Per the Django docs this can be changed to .filter(name__icontains=filters.strip()).

ianroberts commented 7 months ago

Sounds like a sensible change, feel free to submit a PR.

ianroberts commented 7 months ago

Thanks for the PR, this issue should close automatically when we merge dev to master to make the next release.