Feature #215
closedAllow blank values for parameters
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 .
Updated by Ohad Levy over 14 years ago
- 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 %>
Updated by Bash Shell over 14 years ago
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.
Updated by Ohad Levy about 14 years ago
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 :)
Updated by Benjamin Papillon almost 12 years ago
- Status changed from Feedback to New
- Assignee deleted (
Bash Shell)
I remove the tag "feedback". Patches are always welcome :D
Updated by Ohad Levy over 10 years ago
- Is duplicate of Bug #4319: Parameter with no value is not persisted in hostgroup added
Updated by Ohad Levy over 10 years ago
- Description updated (diff)
- Status changed from Duplicate to New
Updated by Ori Rabin over 10 years ago
- Status changed from New to Ready For Testing
Updated by Ori Rabin over 10 years ago
- Related to Bug #6697: UI doesn't raise any error when we add OS parameter without any value added
Updated by Ohad Levy over 10 years ago
- Related to deleted (Bug #6697: UI doesn't raise any error when we add OS parameter without any value)
Updated by Ohad Levy over 10 years ago
- Has duplicate Bug #6697: UI doesn't raise any error when we add OS parameter without any value added
Updated by Ori Rabin over 10 years ago
- Pull request https://github.com/theforeman/foreman/pull/1610 added
- Pull request deleted (
)
Updated by Dominic Cleal over 10 years ago
- Related to deleted (Bug #1512: Cannot give parameter empty value)
Updated by Dominic Cleal over 10 years ago
- Has duplicate Bug #1512: Cannot give parameter empty value added
Updated by Dominic Cleal over 10 years ago
- Category set to Host creation
- Target version set to 1.7.5
- Translation missing: en.field_release set to 10
Updated by Ori Rabin over 10 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 32ced385505260adc3bfc3a3ef2e4f75b2741410.