Bug 459256 - While provisioning a system, filtering of kickstart profiles doesn't work as expected
Summary: While provisioning a system, filtering of kickstart profiles doesn't work as ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: WebUI
Version: 0.6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space02
TreeView+ depends on / blocked
 
Reported: 2008-08-15 13:03 UTC by Miroslav Suchý
Modified: 2009-09-17 07:00 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-09-17 07:00:09 UTC
Embargoed:


Attachments (Terms of Use)

Description Miroslav Suchý 2008-08-15 13:03:27 UTC
+++ This bug was initially created as a clone of Bug #426786 +++

--- Additional comment from tao 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 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 13:07:21 UTC
Commited to git as a043e005792492a25e5bf5b4a4646cbd8859b0b2

Comment 2 Brad Buckingham 2008-09-08 19:04:35 UTC
Verified in Spacewalk 0.2

Comment 3 Miroslav Suchý 2009-09-17 07:00:09 UTC
Spacewalk is released for long time.


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