Whitespace not omitted in Horizon search query

Bug #1527649 reported by Rene Soto
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Released
Low
Paul Karikh
8.0.x
Won't Fix
Low
MOS Horizon

Bug Description

When searching for Instances on Horizon, the query yields zero results if there is a space at the beginning or the end.

Steps to reproduce:
1. Create instance named "test"
2. Go to Project->Compute->Instances or Admin->System Panel->Instances
3. Search for "test"
4. Search for "test " (with space at the end)
5. Search for " test" (with space at the beginning)

Actual Results:
-Searching for "test" will successfully display the desired instance.
-Searching for "test " yields zero results.
-Searching for " test" yields zero results.

Expected Results:
It would be expected for Horizon to filter out whitespace before and after a search query, especially since whitespace is filtered before and after the name field upon instance creation.

Screenshot is attached. Customer reported this issue in MOS 7.0 and I was able to reproduce it.

Revision history for this message
Rene Soto (rsoto) wrote :
Changed in mos:
milestone: none → 8.0
assignee: nobody → MOS Horizon (mos-horizon)
importance: Undecided → Medium
status: New → Confirmed
importance: Medium → Low
Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

SCF is reached, moving to 9.0

Changed in mos:
milestone: 8.0 → 9.0
no longer affects: mos/9.0.x
tags: added: wontfix-low
tags: added: area-horizon
Revision history for this message
Bug Checker Bot (bug-checker) wrote : Autochecker

(This check performed automatically)
Please, make sure that bug description contains the following sections filled in with the appropriate data related to the bug you are describing:

version

For more detailed information on the contents of each of the listed sections see https://wiki.openstack.org/wiki/Fuel/How_to_contribute#Here_is_how_you_file_a_bug

tags: added: need-info
Revision history for this message
Paul Karikh (pkarikh) wrote :
Paul Karikh (pkarikh)
Changed in mos:
assignee: MOS Horizon (mos-horizon) → Paul Karikh (pkarikh)
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/horizon (9.0/mitaka)

Fix proposed to branch: 9.0/mitaka
Change author: Paul Karikh <email address hidden>
Review: https://review.fuel-infra.org/19145

Paul Karikh (pkarikh)
Changed in mos:
status: Confirmed → In Progress
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/horizon (9.0/mitaka)

Reviewed: https://review.fuel-infra.org/19145
Submitter: Pkgs Jenkins <email address hidden>
Branch: 9.0/mitaka

Commit: 2d560313c0b4a3c63f1e748b8d6e46879f17c465
Author: Paul Karikh <email address hidden>
Date: Mon Apr 4 16:01:17 2016

Add strip() to filter string in instances

admin/instances and project/instaces
have server filter field.
This field do not strip search string,
so attempt to search "test " will return
nothing. This patch fixes it.

Change-Id: I6a56a95e8b9b46384c0ee9da4968abcbb0ecff70
Closes-Bug: #1527649

Timur Sufiev (tsufiev-x)
Changed in mos:
status: In Progress → Fix Committed
Revision history for this message
Sergei Chipiga (schipiga) wrote :

Checked with mos9.0#188

Steps:
1. Create instance named "test"
2. Go to Project->Compute->Instances or Admin->System Panel->Instances
3. Search for "test"
4. Search for "test " (with space at the end)
5. Search for " test" (with space at the beginning)

Result:
- Instance "test" is found for all variants

Fixed

Changed in mos:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.