Problem/Motivation
A step can be offered to the same audience in several rows, each with its own settings: for example an Assignment 1 to the users alice with Notify this audience checked, and an Assignment 2 to the users bob with it unchecked, because only Alice should be emailed.
A canvas modeler (BPMN.io) shows the users and the roles of a step as one flat field each, assignee_users and assignee_roles. On save, Assignments::getValueFromFlatValues() drops every row of that audience and writes back a single row holding every name in the field, with the settings of the first row it replaced. So saving the diagram, even without touching the step, merges Bob into Alice's row: Bob is now notified on every assignment and reminder, which the author had turned off, and nothing on screen says the step changed.
Steps to reproduce
- In the Complete modeler, give a user task two Users assignments:
alicewith Notify this audience checked,bobwith it unchecked. Save. - Open the same workflow in BPMN.io and save it without changing anything.
- Reopen the step in the Complete modeler: there is one Users assignment,
alice, bob, notified.
Proposed resolution
Reconcile the flat field with the rows it stands for, instead of rebuilding them: each existing row keeps its place and its settings, and keeps the names of its own the field still lists; a row left with no name is dropped; a name the field adds goes to the first row of that audience still standing, or to a new row carrying the settings of the first row it replaced when none is left. A save that changes nothing changes no row.
Remaining tasks
- Merge request with tests.
User interface changes
None.
API changes
None.
Data model changes
None. Steps already merged by an earlier save stay as they are.
AI-Generated: Yes (Claude Code was used to help audit the module, draft this issue summary, and write the fix and its tests on the merge request. I reviewed them.)
Issue fork orchestra-3630243
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
mably commentedComment #5
mably commented