Feature #215
closed
Allow blank values for parameters
Added by Bash Shell over 14 years ago.
Updated over 6 years ago.
Description
If blank values for parameters are allowed, then one can do thing in templates like
<% !param_name.empty? -%>
<% do_some_thing -%>
This should be a pretty small change in parameter.rb .
- Status changed from New to Feedback
- Assignee set to Bash Shell
Bash Shell wrote:
If blank values for parameters are allowed, then one can do thing in templates like
[...]
This should be a pretty small change in parameter.rb .
that's actually not true, as when saving the host model with the parameters (which is another model), the way to detect if there are new parameters is based on if the value is empty or not.
I'm not sure if that's such a useful feature, as you can also use:
<% if has_variable?("myvar") then %>
Like we discussed on IRC, it would be great if users have the option of having blank values.
We use it in a couple of ways in our templates. (hard to describe, I know)
This is also valid YAML, so it would be great to have that option.
the problem is that the current implementation detect the presence of parameters based on the parameter value... (e.g. it gets deleted if the value is blank).
Patches are welcomed :)
- Status changed from Feedback to New
- Assignee deleted (
Bash Shell)
I remove the tag "feedback". Patches are always welcome :D
- Is duplicate of Bug #4319: Parameter with no value is not persisted in hostgroup added
- Status changed from New to Duplicate
- Description updated (diff)
- Status changed from Duplicate to New
- Assignee set to Ori Rabin
- Status changed from New to Ready For Testing
- Related to Bug #6697: UI doesn't raise any error when we add OS parameter without any value added
- Related to deleted (Bug #6697: UI doesn't raise any error when we add OS parameter without any value)
- Has duplicate Bug #6697: UI doesn't raise any error when we add OS parameter without any value added
- Pull request https://github.com/theforeman/foreman/pull/1610 added
- Pull request deleted (
)
- Related to deleted (Bug #1512: Cannot give parameter empty value)
- Has duplicate Bug #1512: Cannot give parameter empty value added
- Category set to Host creation
- Target version set to 1.7.5
- Translation missing: en.field_release set to 10
- Bugzilla link set to 1120685
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Also available in: Atom
PDF