L3 - Default
Environment (Required on creation): camunda-bpm-run-7.16.0
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):
Steps to reproduce (Required on creation):
1. select a task in the tasklist (with an embedded form, see attached)
2. select some value on a select control of the embedded form
3. refresh the browser page
4. select another value on the same select control of the embedded form
Observed Behavior (Required on creation):
Change on a select control is not detected, the Save button is not enabled. Please see attached reproduction GIF.
Expected behavior (Required on creation):
The change on a select control is detected. It should be possible to continue saving changes after refreshing the browser or logout/login Camunda.
Root Cause (Required on prioritization):
When a form field of type select is used, the logic of the directive camVariableType is first executed initially and executed again when the form field's value is set (cf. choices-field-handler.js ) via a saved value or from a variable. In the first run, $pristine is false, but in the second run, it is true (due to setting the respective option from the saved state or fetched from a form variable). When $pristine is true, the camVariableType directive changes $pristine to false and $dirty to true (cf. angularjs/forms/index.js ). This makes the select dirty even though the user didn't touch it. This, in turn, leads to the described bug. Since $dirty was set programmatically, changing the select does not change the dirty state for the entire form, so the Save button remains disabled.
Solution Ideas (Optional):
Remove logic to programmatically make input fields dirty.
Changes to other controls are detected after the refresh.