Deleted inputs can't be removed from multiple-value fields
When you delete an input specified in a parameter for a multi-valued field, it remains part of the mapping, and that form processor will always throw an error. The only solution is to manually edit the JSON in the database.
Steps to Replicate
- Create a new form processor with two integer inputs named "contact 1", "contact 2".
- Add an action with a multi-value parameter (e.g. "Create Activity").
- Add contact 1 and 2 as inputs to the "Target Contact" parameter.
- Delete contact 1.
- Open the action. Note that only contact 2 is now visible.
- Save the action.
Expected Result
Since only contact 2 is visible in the field, only contact 2 should be saved.
Actual Result
Contact 1 is still present. Adding or removing additional inputs will not change this.
I tried looking for where this validation would take place but couldn't find it. AbstractAction::validateParameters()
validates the values, not the specification. Even SpecificationBag::validate()
validates the values.