A task row is headed by a stored copy of the step name, so it stays in the source language and repeats the step below it

Fixes #3624998.

On a French site a task row read Validate submission as its heading while the line under it read En attente de : Valider la soumission. The same step, twice, in two languages.

Both name one node. They disagreed because they come from different places:

  • the heading was the work item's stored label column, rendered by a plain field handler — a string written when the task was created, so it carries whatever language was current then and never follows a translation made later;
  • the line below is the current-step field, which resolves the node through the workflow configuration and reads the French override.

The engine already gets this right: WorkItemManager::getLabel() reads the live node label and falls back to the stored column only when the workflow or node is gone. That column is a sound fallback — it was wrong as the thing a row is headed by.

What this does

The card is headed by the workflow instead, and the step keeps its own line, so the row says what the run is and what it is waiting for, each once:

  • workflow_label uses the orchestra_workflow_label handler this project already ships and three other views already use, through the instance relationship the view already declares — no new join, and it resolves the workflow config entity so it follows the same translation as the rest of the row;
  • the stored label field leaves the view rather than moving to a labeled column, which is where it would have gone, since the card renders every field no role claims;
  • the preprocess points #title at it;
  • both displays take the change: two displays of one view sharing one row template.

The stored column stays on the entity for getLabel(), and stays the exposed sort it already was.

Verified on a site

Rendered in French, with theme debug stripped:

CARD HEADING:  Validation de soumission (modifier comme une tâche)
EN ATTENTE DE: <the step, on its own line>

MyTasksViewTest is widened with a case asserting the heading names the workflow (Change of address) and not the stored step name (Review request), and that the stored column is no longer a view field at all.

Merge request reports

Loading
Loading