Project

General

Profile

Actions

action #53402

open

[beginner] Not possible to search for test suites (again?) using regex, e.g. `^gnome$`

Added by okurz almost 5 years ago. Updated about 2 years ago.

Status:
Workable
Priority:
Low
Assignee:
-
Category:
Regressions/Crashes
Target version:
Start date:
2019-06-21
Due date:
% Done:

0%

Estimated time:

Description

Steps to reproduce

Problem

Is this a regression from https://github.com/os-autoinst/openQA/pull/2089 or https://github.com/os-autoinst/openQA/pull/2084 ?

Further details

entrance level issue


Related issues 2 (0 open2 closed)

Related to openQA Project - action #51719: "New Test Suite " button in admin/test_suites can not be used with filter Resolvedmkittler2019-05-21

Actions
Related to openQA Project - action #52232: UI: search for testsuite settings only on current page vs. only 100 jobs per page possibleResolvedmkittler2019-05-28

Actions
Actions #1

Updated by okurz almost 5 years ago

  • Related to action #51719: "New Test Suite " button in admin/test_suites can not be used with filter added
Actions #2

Updated by okurz almost 5 years ago

  • Related to action #52232: UI: search for testsuite settings only on current page vs. only 100 jobs per page possible added
Actions #3

Updated by mkittler over 4 years ago

Regex works but for some reason but for some reason a whitespace is appended to the end. So e.g. ^gnome $ would do what you've expected.

Actions #4

Updated by mkittler over 4 years ago

  • Priority changed from Normal to Low

Likely a data tables bug, e.g. one can reproduce it as well in their examples: https://datatables.net/examples/api/regex.html

But it is only reproducible using the global search. They somehow implemented that "column boundaries" can be "crossed" using one ore more white spaces, e.g. ^value1 value2 $ would match if one column contains value1 and a subsequent (but not necessarily adjacent) column contains value2. Likely this extra handling adds the requirement to put a space before $. Not sure whether this can be easily fixed from our side and whether it is worth the effort.

Since regex works in general I'm lowering the priority.

Actions #5

Updated by mkittler over 4 years ago

  • Assignee deleted (mkittler)
Actions #6

Updated by okurz over 4 years ago

  • Status changed from New to Workable
Actions #7

Updated by ilausuch almost 4 years ago

Checking on the datatables JS
https://cdn.datatables.net/v/dt/dt-1.10.21/datatables.js
I found that in the function https://cdn.datatables.net/v/dt/dt-1.10.21/datatables.js that I think is the used for this purpose.
If the smart flag is on (I checked to search in more than one column is necessary to simplify the search) then the search add the ^ and $ symbols. And the strings we put on the search field are joined using this structure:

search = '?=.*?'+a.join( '(?=.?' )+').$';

But I if I am not wrong in the code we have only regex flag
https://github.com/os-autoinst/openQA/blob/26396b3e9397dad3644c4868b4a112ebe9dc053c/assets/javascripts/admintable.js#L441
search: {
regex: true,
},

But testing the search input it is working as if smart flag is active. For instance searching for: gnome clone

Actions #8

Updated by okurz over 3 years ago

  • Target version set to future
Actions #9

Updated by okurz about 2 years ago

  • Tags set to ui, ux, beginner, entrace level
  • Subject changed from Not possible to search for test suites (again?) using regex, e.g. `^gnome$` to [beginner] Not possible to search for test suites (again?) using regex, e.g. `^gnome$`
  • Description updated (diff)
Actions

Also available in: Atom PDF