CRM-21507 Fix error when creating case activities #11360
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR fixes a recent regression from #11264 as described by @jitendrapurohit where the user is unable to create new case activities.
Before
When adding a new activity to a case, an error message "Activity Separation is a required field" appears and prevents the user from submitting the form. There is no way to get around this error.
After
The user can create case activities without hitting this error message. Also the error still displays as expected when creating non-case activities that have multiple target contacts.
Technical details
I wasn't entirely sure of the best way to implement this fix. I considered several different ways and weighed downsides of each. I'm open to other suggestions and further discussion here.
Comments
Sorry for the delay in getting this fix made! I think it'd be good if we could get this change reviewed/merged before cutting the RC. Otherwise we'll need to change this PR to the RC branch to avoid releasing a regression.