Project

General

Profile

Actions

Feature #215

closed

Allow blank values for parameters

Added by Bash Shell over 14 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Host creation
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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 .


Related issues 3 (0 open3 closed)

Is duplicate of Foreman - Bug #4319: Parameter with no value is not persisted in hostgroupDuplicate02/11/2014Actions
Has duplicate Foreman - Bug #6697: UI doesn't raise any error when we add OS parameter without any valueDuplicateOri Rabin07/21/2014Actions
Has duplicate Foreman - Bug #1512: Cannot give parameter empty valueDuplicate02/28/2012Actions
Actions #1

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 %>

Actions #2

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.

Actions #3

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 :)

Actions #4

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

Actions #5

Updated by Ohad Levy over 10 years ago

  • Is duplicate of Bug #4319: Parameter with no value is not persisted in hostgroup added
Actions #6

Updated by Ohad Levy over 10 years ago

  • Status changed from New to Duplicate
Actions #7

Updated by Ohad Levy over 10 years ago

  • Description updated (diff)
  • Status changed from Duplicate to New
Actions #8

Updated by Ohad Levy over 10 years ago

  • Assignee set to Ori Rabin
Actions #9

Updated by Ori Rabin over 10 years ago

  • Status changed from New to Ready For Testing
Actions #10

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
Actions #11

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)
Actions #12

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
Actions #13

Updated by Ori Rabin over 10 years ago

  • Pull request https://github.com/theforeman/foreman/pull/1610 added
  • Pull request deleted ()
Actions #14

Updated by Dominic Cleal over 10 years ago

  • Related to deleted (Bug #1512: Cannot give parameter empty value)
Actions #15

Updated by Dominic Cleal over 10 years ago

  • Has duplicate Bug #1512: Cannot give parameter empty value added
Actions #16

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
Actions #17

Updated by Bryan Kearney over 10 years ago

  • Bugzilla link set to 1120685
Actions #18

Updated by Ori Rabin over 10 years ago

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

Also available in: Atom PDF