Fixed bug #1175: DynamicFields imported from OTRS are mandatory and stop input forms from submitting.

This commit is contained in:
Thorsten Eckel 2017-08-23 16:41:01 +02:00
parent f35645e051
commit d6bc129af4
14 changed files with 28 additions and 24 deletions

View file

@ -11,7 +11,7 @@ module Import
true => 'Yes',
false => 'No',
},
null: false,
null: true,
translate: true,
}
)

View file

@ -14,7 +14,7 @@ module Import
future: dynamic_field['Config']['YearsInFuture'] != '0',
past: dynamic_field['Config']['YearsInPast'] != '0',
diff: dynamic_field['Config']['DefaultValue'].to_i / 60 / 60 / 24,
null: false,
null: true,
}
)
end

View file

@ -14,7 +14,7 @@ module Import
future: dynamic_field['Config']['YearsInFuture'] != '0',
past: dynamic_field['Config']['YearsInPast'] != '0',
diff: dynamic_field['Config']['DefaultValue'].to_i / 60 / 60,
null: false,
null: true,
}
)
end

View file

@ -9,7 +9,8 @@ module Import
default: '',
multiple: false,
options: dynamic_field['Config']['PossibleValues'],
null: dynamic_field['Config']['PossibleNone'] == '1',
nulloption: dynamic_field['Config']['PossibleNone'] == '1',
null: true,
translate: dynamic_field['Config']['TranslatableValues'] == '1',
}
)

View file

@ -9,7 +9,8 @@ module Import
default: '',
multiple: true,
options: dynamic_field['Config']['PossibleValues'],
null: dynamic_field['Config']['PossibleNone'] == '1',
nulloption: dynamic_field['Config']['PossibleNone'] == '1',
null: true,
translate: dynamic_field['Config']['TranslatableValues'] == '1',
}
)

View file

@ -9,7 +9,7 @@ module Import
default: dynamic_field['Config']['DefaultValue'],
type: 'text',
maxlength: 255,
null: false,
null: true,
}
)
end

View file

@ -8,7 +8,7 @@ module Import
data_option: {
default: dynamic_field['Config']['DefaultValue'],
rows: dynamic_field['Config']['Rows'],
null: false,
null: true,
}
)
end

View file

@ -29,7 +29,7 @@ RSpec.describe Import::OTRS::DynamicField::Checkbox do
true => 'Yes',
false => 'No'
},
null: false,
null: true,
translate: true
}
}

View file

@ -33,7 +33,7 @@ RSpec.describe Import::OTRS::DynamicField::Date do
future: false,
past: false,
diff: 0,
null: false
null: true
}
}

View file

@ -33,7 +33,7 @@ RSpec.describe Import::OTRS::DynamicField::DateTime do
future: true,
past: true,
diff: 72,
null: false
null: true
}
}

View file

@ -32,6 +32,7 @@ RSpec.describe Import::OTRS::DynamicField::Dropdown do
'Köln' => 'Köln',
'Berlin' => 'Berlin'
},
nulloption: true,
null: true,
translate: false
}

View file

@ -32,7 +32,8 @@ RSpec.describe Import::OTRS::DynamicField::Multiselect do
'Köln' => 'Köln',
'Berlin' => 'Berlin'
},
null: false,
nulloption: false,
null: true,
translate: false
}
}

View file

@ -26,7 +26,7 @@ RSpec.describe Import::OTRS::DynamicField::TextArea do
data_option: {
default: '',
rows: '20',
null: false
null: true
}
}

View file

@ -27,7 +27,7 @@ RSpec.describe Import::OTRS::DynamicField::Text do
default: '',
type: 'text',
maxlength: 255,
null: false
null: true
}
}