Skip to content
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

Case insensitive run name search #794

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Case insensitive run name search
  • Loading branch information
csordasmarton committed Aug 11, 2017
commit 96ff9c20b25ef37c7bc4aeb4c42734295b3f37b6
2 changes: 1 addition & 1 deletion libcodechecker/server/client_db_access_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def getRunData(self, run_name_filter):
q = session.query(Run, stmt.c.report_count)

if run_name_filter is not None:
q = q.filter(Run.name.like('%' + run_name_filter + '%'))
q = q.filter(Run.name.ilike('%' + run_name_filter + '%'))

q = q.outerjoin(stmt, Run.id == stmt.c.run_id) \
.order_by(Run.date)
Expand Down
5 changes: 5 additions & 0 deletions tests/functional/report_viewer_api/test_run_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ def test_filter_run_names(self):
self.assertEqual(len(test_runs), 1,
"There should be only one run for this test.")

# Run name filter is case insensitive.
test_runs = self.__get_runs('Test_Files_')
self.assertEqual(len(test_runs), 1,
"There should be only one run for this test.")

# Filter runs which name contains `files`.
test_runs = self.__get_runs('files_')
self.assertEqual(len(test_runs), 1,
Expand Down