Project

General

Custom queries

Profile

Actions

Bug #18003

closed

filter group validation incorrectly rejects 'contains' and 'exists'

Added by Peter Amstutz over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
API
Target version:
Start date:
09/28/2021
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
-
Release relationship:
Auto

Description

api/app/models/groups.rb

        if ! ["=","<","<=",">",">=","!=","like","ilike","in","not in","is_a"].include?(filter[1].downcase)
          errors.add :properties, "filter operator is not valid (must be =,<,<=,>,>=,!=,like,ilike,in,not in,is_a)" 
          return
        end

This is missing the 'contains' and 'exists' operators.


Subtasks 1 (0 open1 closed)

Task #18037: Review 18003-support-exists-contains-in-filter-groupsResolvedPeter Amstutz09/28/2021

Actions
Actions #3

Updated by Ward Vandewege over 3 years ago

This may be more complicated than just adding the operators; we've tried adding them and it produced confusing results.

Actions #11

Updated by Ward Vandewege over 3 years ago

Ready for review in 80889a19da3aacccc3ebcdfba73d037a54794b98 on branch 18003-support-exists-contains-in-filter-groups

Tests are running at developer-run-tests: #2714

Actions #13

Updated by Peter Amstutz over 3 years ago

Ward Vandewege wrote:

Ready for review in 80889a19da3aacccc3ebcdfba73d037a54794b98 on branch 18003-support-exists-contains-in-filter-groups

Tests are running at developer-run-tests: #2714

LGTM

Actions #14

Updated by Ward Vandewege over 3 years ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF