Project

General

Profile

Actions

Bug #4091

closed

Option "<< no preference >>" for multichoice selectors in Event search translates to probably unintended query

Added by Radko Krkoš over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
Development - GUI
Target version:
Start date:
05/15/2018
Due date:
% Done:

100%

Estimated time:
To be discussed:

Description

When selecting option "<< no preference >>" in multichoice dropdowns, probably incorect filtering condition is created

How to reproduce:
  1. Set up query with Severities set to '<< no preference >>'.
  2. This translates to query: SELECT * FROM events WHERE "cesnet_eventseverity" = ANY ORDER BY "detecttime" DESC LIMIT 100
    • This matches no data as empty string is not a variant present in data.
    • Behavior confirmed for other multichoices offering "<< no preference >>" option (Source types, Categories, Classes, ...)

No preference probably means any value, then the correct approach should be to omit the filter in WHERE. This is identical to selecting no options in corresponding multichoice so '<< no preference >>' is probably redundant. Selecting other options in combination with '<< no preference >>' is meaningless so '<< no preference >>' is counterintuitive.

Option '<< no preference >>' only exists for columns containing NULL values as it is the default for get() in source:lib/hawat/blueprints/events/forms.py@devel#L131.


Related issues

Related to Mentat - Bug #4092: Invalid option 'None' in multichoice dropdowns in Event searchClosedRadko Krkoš05/15/2018

Actions
Actions

Also available in: Atom PDF