Bug 459256 - While provisioning a system, filtering of kickstart profiles doesn't work as expected
While provisioning a system, filtering of kickstart profiles doesn't work as ...
Status: CLOSED CURRENTRELEASE
Product: Spacewalk
Classification: Community
Component: WebUI (Show other bugs)
0.6
All Linux
medium Severity medium
: ---
: ---
Assigned To: Miroslav Suchý
Red Hat Satellite QA List
:
Depends On:
Blocks: space02
  Show dependency treegraph
 
Reported: 2008-08-15 09:03 EDT by Miroslav Suchý
Modified: 2009-09-17 03:00 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-17 03:00:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Miroslav Suchý 2008-08-15 09:03:27 EDT
+++ This bug was initially created as a clone of Bug #426786 +++

--- Additional comment from tao@redhat.com on 2007-12-26 06:22:38 EDT ---

Description of problem:
The "Filter by Kickstart Profile" under provisioning tab of system doesn't work. on RHN Satellite 5.0.1

For more details refer Steps to Reproduce section mentioned below.

How reproducible:
Always

Steps to Reproduce:

Create a couple of kickstart profiles with names as
repro-1786760
reproduce-1765948
test-reproduce1
rhel4reproduce
rhel5testrepro

Select a system with Provisioning entitlement.

Click on Provisioning -> 

Under "Filter by Kickstart Profile: " 
Enter repro - this would display only
repro-1786760
reproduce-1765948


Actual results:
repro-1786760
reproduce-1765948

Expected results:
repro-1786760
reproduce-1765948
test-reproduce1
rhel4reproduce
rhel5testrepro


Let me know if any other details are required.

Thanks !
Paresh

--- Additional comment from tao@redhat.com on 2007-12-26 06:22:39 EDT ---

Hello Paresh,

This seems to be a bug, looking at the List filtering code it seems that
we check the start of the string with the specified prefix.

The following patch should correct the behavior:

--- frontend/taglibs/helpers/ListViewHelper.java.patch  2007-06-21
02:31:40.000000000 +0530
+++ frontend/taglibs/helpers/ListViewHelper.java        2007-12-26
16:27:36.000000000 +0530
@@ -195,7 +195,7 @@
         for (Iterator iter = this.result.iterator(); iter.hasNext();) {
             Map row = (Map) iter.next();
             String value = (String) row.get(this.filterByField);
-            if (value != null && value.startsWith(filterValue)) {
+            if (value != null && value.contentEquals(filterValue)) {
                 accum.add(row);
             }
         }
Comment 1 Miroslav Suchý 2008-08-15 09:07:21 EDT
Commited to git as a043e005792492a25e5bf5b4a4646cbd8859b0b2
Comment 2 Brad Buckingham 2008-09-08 15:04:35 EDT
Verified in Spacewalk 0.2
Comment 3 Miroslav Suchý 2009-09-17 03:00:09 EDT
Spacewalk is released for long time.

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