mirror of
https://github.com/opf/openproject.git
synced 2026-06-13 19:20:00 +00:00
Merge remote-tracking branch 'origin/release/17.3' into dev
This commit is contained in:
@@ -46,7 +46,7 @@ class CustomActions::Actions::Base
|
||||
end
|
||||
|
||||
def value_objects
|
||||
values.map do |value|
|
||||
values.filter_map do |value|
|
||||
allowed_values.find { |v| v[:value] == value }
|
||||
end
|
||||
end
|
||||
|
||||
@@ -324,6 +324,7 @@ export abstract class EditForm<T extends HalResource = HalResource> {
|
||||
// silently close the field as it will no longer be writable
|
||||
if (!fieldSchema) {
|
||||
this.closeEditFields([fieldName]);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!fieldSchema.writable && !noWarnings) {
|
||||
|
||||
@@ -140,6 +140,15 @@ RSpec.shared_examples_for "associated custom action" do
|
||||
end
|
||||
end
|
||||
|
||||
describe "#value_objects" do
|
||||
it "does not include nil for values not present in allowed_values" do
|
||||
instance.values = [""]
|
||||
|
||||
expect(instance.value_objects)
|
||||
.not_to include(nil)
|
||||
end
|
||||
end
|
||||
|
||||
it_behaves_like "associated custom action validations"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user