Project

General

Profile

Bug #21442

Loading puppet class parameters is stuck when creating new host

Added by Shira Maximov almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

reproduce steps:
1. create new host
2. in the host subtab: choose Environment and Puppet Master
3. in puppet class subtab: add available class
4. in parameters subtab: Puppet Class Parameters should appear. instead, it's stuck

Associated revisions

Revision 30216c36 (diff)
Added by Tomer Brisker almost 3 years ago

Fixes #21442 - Load puppetclass params on new host form

This was caused by a Rails 5 change in ActionView that skips blank
data attributes [1] causing the JS code used to serialize the form2
to send `undefined` instead of `null` which was expected previously.

[1] https://github.com/rails/rails/commit/aeee438bf120f44a4402250fa50ef530f3c830a8
[2] https://github.com/theforeman/foreman/blob/develop/app/assets/javascripts/host_edit.js#L204

History

#1 Updated by Tomer Brisker almost 3 years ago

This is caused by a Rails 5 change in ActionView that skips blank data attributes [1] causing the JS code used to serialize the form [2] to send `undefined` instead of `null`.

[1] https://github.com/rails/rails/commit/aeee438bf120f44a4402250fa50ef530f3c830a8#diff-3d863df5229eeafadb6df53160605a5b
[2] https://github.com/theforeman/foreman/blob/develop/app/assets/javascripts/host_edit.js#L204

#2 Updated by The Foreman Bot almost 3 years ago

  • Assignee set to Tomer Brisker
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4939 added

#3 Updated by Marek Hulán almost 3 years ago

  • Legacy Backlogs Release (now unused) set to 296

#4 Updated by Anonymous almost 3 years ago

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

Also available in: Atom PDF