Bug #20840

Updating Subnet Parameter with invalid name doesn't shows any error

Added by Ori Rabin 22 days ago. Updated 19 days ago.

Status:Closed
Priority:Normal
Assigned To:Kavita Gaikwad
Category:Web Interface
Target version:Team Anurag Iteration 20
Difficulty: Bugzilla link:1482137
Found in release: Pull request:https://github.com/theforeman/foreman/pull/4813
Story points-
Velocity based estimate-
Release1.17.0Release relationshipAuto

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1482137

Description of problem:
While updating the subnet parameter with some invalid name(name containing spaces) doesn't show an error 'Name can't contain spaces' or equivalent error

Version-Release number of selected component (if applicable):
Satellite 6.3.0 Snap 11

How reproducible:
Always

Steps to Reproduce:
1. Create Subnet
2. Add parameter with valid name and valid value
3. From Web UI, Open above subnet and attempt to update the parameter with an invalid name(I tried with a name containing space).

Actual results:
Satellite web doesn't throw error for an invalid name(in my case 'Name can't contain spaces')

Expected results:
Satellite web should throw an error for updating subnet parameter with an invalid name.

Additional info:
Production logs throwing a correct error as below but not UI:
[I] Current user: admin (administrator)
2017-08-16 10:10:03 0bea6436 [app] [I] Failed to save: Name can't contain spaces.
2017-08-16 10:10:03 0bea6436 [app] [I] Rendered subnets/_fields.html.erb (8.7ms)
2017-08-16 10:10:03 0bea6436 [app] [I] Rendered common_parameters/_parameter.html.erb (1.9ms)
2017-08-16 10:10:03 0bea6436 [app] [I] Rendered common_parameters/_parameter.html.erb (1.7ms)
2017-08-16 10:10:03 0bea6436 [app] [I] Rendered common_parameters/_parameter.html.erb (1.7ms)
2017-08-16 10:10:03 0bea6436 [app] [I] Rendered common_parameters/_parameter.html.erb (1.7ms)
2017-08-16 10:10:03 0bea6436 [app] [I] Rendered common_parameters/_parameter.html.erb (1.7ms)
2017-08-16 10:10:03 0bea6436 [app] [I] Rendered common_parameters/_parameter.html.erb (1.7ms)
2017-08-16 10:10:03 0bea6436 [app] [I] Rendered common_parameters/_parameters.html.erb (20.8ms)
2017-08-16 10:10:03 0bea6436 [app] [I] Rendered taxonomies/_loc_org_tabs.html.erb (23.7ms)
2017-08-16 10:10:03 0bea6436 [app] [I] Rendered subnets/_form.html.erb (91.5ms)
2017-08-16 10:10:03 0bea6436 [app] [I] Rendered subnets/edit.html.erb (92.0ms)
2017-08-16 10:10:03 0bea6436 [app] [I] Completed 200 OK in 148ms (Views: 84.9ms | ActiveRecord: 15.6ms)

Associated revisions

Revision 16bd5715
Added by Kavita Gaikwad 19 days ago

Fixes #20840 - show error on invalid name for any parameter

Updating any type of Parameter such as
subnet_parameter/host_parameter with invalid name
doesn't show any error.
With this commit, it is now showing error on parameters with
invalid name.

History

#1 Updated by Ori Rabin 22 days ago

  • Category set to Web Interface
  • Assigned To deleted (Ivan Necas)
  • Target version set to Team Ivan backlog

#2 Updated by Kavita Gaikwad 20 days ago

  • Assigned To set to Kavita Gaikwad

#3 Updated by Kavita Gaikwad 20 days ago

  • Target version changed from Team Ivan backlog to Team Anurag Iteration 20

#4 Updated by Kavita Gaikwad 20 days ago

This issue happens not only for subnet_parameters but everywhere there is parameters tab i.e for other types like host_parameters.

#5 Updated by The Foreman Bot 20 days ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4813 added

#6 Updated by Daniel Lobato Garcia 19 days ago

  • Release set to 1.17.0

#7 Updated by Kavita Gaikwad 19 days ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF