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

  1. In the Complete modeler, give a user task two Users assignments: alice with Notify this audience checked, bob with it unchecked. Save.
  2. Open the same workflow in BPMN.io and save it without changing anything.
  3. 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

Command icon 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

mably created an issue. See original summary.

mably’s picture

Status: Active » Needs review

  • mably committed baf78084 on 1.x
    fix: #3630243 Keep a step's assignment rows and their notify settings...
mably’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.