Bug 1129226

Summary: can not edit/delete hostgroup if it is created with single whitespace in quotes (" ")
Product: Red Hat Satellite Reporter: Sachin Ghai <sghai>
Component: WebUIAssignee: Ohad Levy <ohadlevy>
WebUI sub component: Foreman QA Contact: Katello QA List <katello-qa-list>
Status: CLOSED DUPLICATE Docs Contact:
Severity: unspecified    
Priority: unspecified CC: dcleal
Version: 6.0.4   
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-12 10:58:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
UI doesn't allow to delete/edit the hostgroup having singe whitespace in name none

Description Sachin Ghai 2014-08-12 10:55:16 UTC
Created attachment 926022 [details]
UI doesn't allow to delete/edit the hostgroup having singe whitespace in name

Description of problem:
I was trying to create hostgroup with single white space in quotes (" ")and it was created successfully. But when I tried to edit or delete it, UI says:

---
Host Group Not Found

Please try to update your request
---

Version-Release number of selected component (if applicable):
sat6 GA snap4

How reproducible:
always

Steps to Reproduce:
1. create hostgroup with single whitespace in name
2.
3.

Actual results:
Hostgroup created successfully but when I tried to delete/edit it, UI says:

---
Host Group Not Found

Please try to update your request
---
Expected results:
1. User shouldn't be allowed to create hostgroup with single whitespace

Additional info:
production.log:

Processing by HostgroupsController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"8YKMIr6xgzHyJpwH0LC3VbHzoQSwOk+VOG2XoH0FhiE=", "hostgroup"=>{"parent_id"=>"", "name"=>"\"\"", "environment_id"=>"", "content_source_id"=>"", "puppet_ca_proxy_id"=>"", "puppet_proxy_id"=>"", "domain_id"=>"", "realm_id"=>"", "architecture_id"=>"", "root_pass"=>"[FILTERED]", "location_ids"=>[""], "organization_ids"=>[""]}, "kt_environment_id"=>"", "kt_activation_keys"=>"", "commit"=>"Submit"}
Redirected to https://qetello02.usersys.redhat.com/hostgroups
Completed 302 Found in 35ms (ActiveRecord: 7.4ms)

Comment 1 Dominic Cleal 2014-08-12 10:58:52 UTC
" " is not blank, it's two quotes.  Bug #1121755 tracks fixing the edit/delete action for these.

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