Public bug reported:

Suppose we have deployed Openstack with several projects.
Step to reproduce:
- open Horizon dashboard and log in as an administrator;
- go to Admin > Overview > Compute > Instances;
- type name of any project in filter bar and click "filter";
- in result table appear instances of project whose name doesn't match search 
string;

This behaviour can be clearly seen on the screenshot that I attach to
the issue.

I've been discovering the reason of this and figured out that actually by 
clicking on "filter" button (even with "Project name =" selected in dropdown) 
eventually method of `FilterAction` instance is being called instead of 
concrete one which would contain some logic in `filter()`.
Please look at: 
https://opendev.org/openstack/horizon/src/branch/stable/train/horizon/tables/actions.py#L524
this is the one I've described beyond. Method just return the whole data. It is 
overridden in subclasses but as I mentioned it creates the base class 
(`FilterAction`) instead of correct one for some filter field chosen in 
dropdown.

** Affects: horizon
     Importance: Undecided
         Status: New


** Tags: dashboard-core filter

** Attachment added: "An instance of Foobar project must not appear because I 
filtered by "Foobar2""
   
https://bugs.launchpad.net/bugs/1888490/+attachment/5394858/+files/Selection_082.png

** Description changed:

  Suppose we have deployed Openstack with several projects.
  Step to reproduce:
- - open Horizon dashboard and log in;
- - go to Overview > Compute > Instances;
+ - open Horizon dashboard and log in as an administrator;
+ - go to Admin > Overview > Compute > Instances;
  - type name of any project in filter bar and click "filter";
  - in result table appear instances of project whose name doesn't match search 
string;
  
  This behaviour can be clearly seen on the screenshot that I attach to
  the issue.
  
  I've been discovering the reason of this and figured out that actually by 
clicking on "filter" button (even with "Project name =" selected in dropdown) 
eventually method of `FilterAction` instance is being called instead of 
concrete one which would contain some logic in `filter()`.
  Please look at: 
https://opendev.org/openstack/horizon/src/branch/stable/train/horizon/tables/actions.py#L524
  this is the one I've described beyond. Method just return the whole data. It 
is overridden in subclasses but as I mentioned it creates the base class 
(`FilterAction`) instead of correct one for some filter field chosen in 
dropdown.

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1888490

Title:
  wrong FilterAction instance is being created during filtering

Status in OpenStack Dashboard (Horizon):
  New

Bug description:
  Suppose we have deployed Openstack with several projects.
  Step to reproduce:
  - open Horizon dashboard and log in as an administrator;
  - go to Admin > Overview > Compute > Instances;
  - type name of any project in filter bar and click "filter";
  - in result table appear instances of project whose name doesn't match search 
string;

  This behaviour can be clearly seen on the screenshot that I attach to
  the issue.

  I've been discovering the reason of this and figured out that actually by 
clicking on "filter" button (even with "Project name =" selected in dropdown) 
eventually method of `FilterAction` instance is being called instead of 
concrete one which would contain some logic in `filter()`.
  Please look at: 
https://opendev.org/openstack/horizon/src/branch/stable/train/horizon/tables/actions.py#L524
  this is the one I've described beyond. Method just return the whole data. It 
is overridden in subclasses but as I mentioned it creates the base class 
(`FilterAction`) instead of correct one for some filter field chosen in 
dropdown.

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1888490/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to