Bug 1205149 - Search Engine - filter 'tag != something' does not match VMs which do not have any tag
Summary: Search Engine - filter 'tag != something' does not match VMs which do not hav...
Keywords:
Status: CLOSED DUPLICATE of bug 1067844
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-webadmin-portal
Version: 3.5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: 3.6.0
Assignee: Eli Mesika
QA Contact: Pavel Stehlik
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-24 10:39 UTC by Petr Spacek
Modified: 2016-02-10 19:34 UTC (History)
16 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1092609
Environment:
Last Closed: 2015-03-30 08:19:42 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screenshot with tag != filter (36.06 KB, image/png)
2015-03-24 10:42 UTC, Petr Spacek
no flags Details
screenshot with incorrect filter results (43.76 KB, image/png)
2015-03-24 10:52 UTC, Petr Spacek
no flags Details

Description Petr Spacek 2015-03-24 10:39:48 UTC
Description of problem:
Searching for objects that do have a specific tag in the search bar does not work. (eg. "Vms: tag = tag1") searching for objects that do not have a tag is not possible (e.g. "Vms: tag != tag1" returns nothing).

Version-Release number of selected component (if applicable):
3.5.0-0.32.el6ev

How reproducible:
Always

Steps to Reproduce:
1. Create two tags "tag1" and "tag2".
2. Assign "tag1" to vm1 and "tag2" to vm2.
3. Search for "Vms: tag != tag1" in the search bar.

Actual results:
Nothing is displayed.

Expected results:
At least vm2 is displayed.

Additional info:
It looks like duplicate of bug 1092609 but it really does not work even in latest released 3.5.0 version.

Comment 1 Petr Spacek 2015-03-24 10:42:25 UTC
Created attachment 1005795 [details]
screenshot with tag != filter

There is at least 67 VMs matching this filter but none of them is shown.

Comment 2 Eli Mesika 2015-03-24 10:45:04 UTC
Please clarify:

Your $subject says "that do not have a tag" while your $Description relates to VMs that do have a tag

Comment 3 Petr Spacek 2015-03-24 10:52:22 UTC
Created attachment 1005798 [details]
screenshot with incorrect filter results

I'm sorry, I messed up while cloning the previous bug.

The problem actually is that filter 'tag != something' does not match VMs which do not have any tag.

Actual result:
The filter returns single VM which has a tag different than 'ci'.

Expected result:
The filter should return more than 67 matching VMs which do not have tag 'ci', including VMs without any tag.

Comment 5 Petr Spacek 2015-03-25 08:28:13 UTC
This might not be a regression if bug 1092609 is considered to be distinct than this one.

Comment 7 Petr Spacek 2015-03-25 12:39:58 UTC
I consider current behavior really unintuitive. How can user know if a tag is assigned or not? And why should user care while using filter?

If you insist on current behavior please add 'existential' filter to enable filtering like (tag_assigned && tag != tag1) || no_tag_assigned.

Use case for this is simple report generation:
I want to generate report with VM usage per user and exclude all VMs tagged with 'CI' tag from consideration. (I do this via Python SDK.)

Thank you!

Comment 8 Eli Mesika 2015-03-25 12:45:54 UTC
(In reply to Petr Spacek from comment #7)
> I consider current behavior really unintuitive. How can user know if a tag
> is assigned or not? And why should user care while using filter?
> 
> If you insist on current behavior please add 'existential' filter to enable
> filtering like (tag_assigned && tag != tag1) || no_tag_assigned.
> 
> Use case for this is simple report generation:
> I want to generate report with VM usage per user and exclude all VMs tagged
> with 'CI' tag from consideration. (I do this via Python SDK.)
> 
> Thank you!

There is another RFE to support NULL or empty ("") values in the search engine , this will cover the cases you mentioned and those described in the bug.

Comment 12 Petr Spacek 2015-03-25 14:27:31 UTC
Sorry, I have to reopen the bug. The problem described in comment #3 is really present in version 3.5.0-0.32.el6ev.

Comment 13 Eli Mesika 2015-03-25 14:45:08 UTC
Please redo the tag attachment using REST API and test if that occurs , I has opened a separate BZ for not been able to attach a tag from UI 

https://bugzilla.redhat.com/show_bug.cgi?id=1205697

Comment 16 Petr Spacek 2015-03-26 15:32:27 UTC
I re-created tag via API and it made no different. Non-tagged VMs are still not returned by filter 'tag != ci'.

Comment 18 Petr Spacek 2015-03-27 08:05:01 UTC
Okay than. Please close this bug as suplicate of the one you mentioned in commment 6 so I can track it. Thank you!

Comment 20 Eli Mesika 2015-03-29 09:09:09 UTC
(In reply to Petr Spacek from comment #18)
> Okay than. Please close this bug as suplicate of the one you mentioned in
> commment 6 so I can track it. Thank you!

It is not duplicate , 1205697 is a new issue not related to this one , so closing as WORKFORME

Comment 21 Petr Spacek 2015-03-30 08:10:51 UTC
Eli, WORKSFORME does not sound appropridate for bugs which are reproducible. Please close it either as WONTFIX or as a duplicate of something, e.g. the general "NULL or empty ("") values" filter you mentioned earlier:

(In reply to Eli Mesika from comment #8)
> There is another RFE to support NULL or empty ("") values in the search
> engine , this will cover the cases you mentioned and those described in the
> bug.

What is the bug # anyway? I would like to track it.

Comment 22 Eli Mesika 2015-03-30 08:19:42 UTC

*** This bug has been marked as a duplicate of bug 1205697 ***

Comment 23 Petr Spacek 2015-03-30 08:35:03 UTC
Eli, could you *please* point me to the RFE you mentioned in comment #8 and mentioned again in comment #21? Thank you!

Comment 24 Eli Mesika 2015-03-30 09:40:44 UTC
Did not find it, sorry, but I remember that there was such RFE 
Oved, can you look in future features if the RFE for NULL/empty values support in search engine exists

Comment 25 Oved Ourfali 2015-04-13 12:01:39 UTC
(In reply to Eli Mesika from comment #24)
> Did not find it, sorry, but I remember that there was such RFE 
> Oved, can you look in future features if the RFE for NULL/empty values
> support in search engine exists

Perhaps "Bug 1067844 - [RFE] add support for special values NULL and EMPTY_STRING in search mechanism" ?

Comment 26 Eli Mesika 2015-04-13 13:21:49 UTC
(In reply to Oved Ourfali from comment #25)

> Perhaps "Bug 1067844 - [RFE] add support for special values NULL and
> EMPTY_STRING in search mechanism" ?

Yes, this is it

Comment 27 Petr Spacek 2015-04-14 06:46:06 UTC
Oved, thank you!

*** This bug has been marked as a duplicate of bug 1067844 ***


Note You need to log in before you can comment on or make changes to this bug.