Skip to content

Invalid parameters are valid if required parameters are missing #1830

@JosephVolosin

Description

@JosephVolosin

Checked for duplicates

No - I haven't checked

Is this a regression?

No - This is a new bug

Version

4.2.1

Describe the bug

If an activity directive is created and has an invalid value for a parameter with validation and is also missing a value for a required parameter, the result from validateActivityArguments marks the parameter with an invalid value as valid.

Image

Reproduction

  1. Upload a mission model containing an activity type with at least 1 parameter that contains value validation and at least 1 other parameter that is marked as required.
  2. Create a plan
  3. Create a directive from the activity type
  4. Enter an invalid value for the parameter with validation and leave the required parameter(s) empty
  5. No errors will be shown on the parameter with an invalid value

Logs

Re-created using BakeBananaBread from the Banananation model. Response when tbSugar and glutenFree are empty but temperature is negative (invalid):

Invalid arguments for input type \"BakeBananaBread\": extraneous arguments: [], unconstructable arguments: [], missing arguments: [MissingArgument[parameterName=tbSugar, schema=MetaSchema[metadata={description=MapValue[map={value=StringValue[value=Tablespoons of sugar to add]}], unit=MapValue[map={value=StringValue[value=tbl]}]}, target=IntSchema[]]], MissingArgument[parameterName=glutenFree, schema=BooleanSchema[]]], valid arguments: [ValidArgument[parameterName=temperature, serializedValue=NumericValue[value=350.0]]]

System Info

Chrome

Severity

Minor

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions