The manager's tenant task list names each task by the copy stored when it was created, so it stays in that language
Closes https://www.drupal.org/project/orchestra/issues/3625115
The manager's tenant task list (views.view.orchestra_inbox, /admin/orchestra/dashboard/inbox) rendered its Task column from the work item's stored label, a copy of the step name taken when the task was created. It now shows the name in the reader's language.
- New
orchestra_work_item_labelviews field (WorkItemLabel): rendersWorkItemManager::getLabel(), the accessor the task notifications already use (live node label, stored copy as fallback).preRender()warms the page's tokens, instances and workflows in one load each. OrchestraViewsHooksmakes it the handler of the work item'slabelfield in the views data, the waystategetsorchestra_work_item_state, so a site-built view on that field gets it too.- The shipped view points its Task column at it. The column is no longer click-sortable: the name is resolved per row, so a sort would order by the stored copy rather than by what the column shows (the same call
WorkItemOutcomemakes). The stored field stays available as a sort handler. - French for the new views-data help text.
Found in the audit of this MR and fixed here:
- Cached lists kept the old wording after a translation. A translation is saved as a language override, which invalidates only the translated entity's own tag and never its type's list tag, while every Orchestra list naming workflows, steps or statuses (the Task column, the My tasks heading, Waiting on, the trace's step names, the status tags) is cached on the list tag. The new
ConfigTranslationListCacheSubscriberinvalidates the list cache tags of an Orchestra config entity type when one of its entities is translated or its translation deleted, which fixes all of them at once and costs nothing per request. Limited to the entity types this project provides. - Three columns rendered empty for every reader. The tenant task list's Process, the tokens view's Process and the trace's From token used core's entity reference label formatter, which asks the referenced entity whether it may be seen.
orchestra_instanceandorchestra_tokenhave no access handler, so they answer no to everyone, the site administrator included. A neworchestra_instance_labelviews field (InstanceLabel, on the existingInstanceLinkFieldBase) prints the instance's name, linked to its read-only page only where that page's own access check admits the viewer. The Reference column now shares the same rendering method. The trace's From token shows the parent token's id through a relationship. The relationships are not required, so a row whose instance or parent is gone stays listed. - Renames in
InstanceLinkFieldBase, in a commit of their own:runUrl()→getInstanceViewUrl(),traceUrl()→getTraceUrl(),RUN_ROUTE→INSTANCE_VIEW_ROUTE,INSTANCE_PAGE_ROUTE→INSTANCE_ADMIN_ROUTE, and the Reference field'slink_to_runoption →link_to_instance(shipped views and schema updated). - Gin drew a pill inside the status tag. Gin's
views-view-field--status.html.twigwraps every views field keyedstatus, in any view, in its published/unpublished marker, and the shipped Processes, Completed and personal lists key the workflow status columnstatus. The state-shaped columns (StateLabelFieldBase) now offer a template of their own,views_view_field__orchestra_state_label, just ahead of the per-field-id one, printing the output as core's default does; a theme's templates for a given view, display or field in a view still win. - "Status" and "State" both read "État" in French. Core translates a bare "Status" as "État", which is also this project's "State", so both columns of a shipped list were headed the same. Every workflow-authored "Status" now carries the
Workflowtranslation context (views labels and the exposed filter through this module's own schema, plus the PHP labels), and the five task states carryTask, replacingWork item status. The task states also get new French: À traiter, Prise en charge, En cours, Traitée, Annulée. The inbox's column showing a task's state is headed State, as the views head it. - The Task column was cached on every token on the site. It carried
orchestra_token_list, which every step of every run invalidates, so the manager's list was thrown away whenever anything ran. It now puts the tokens its own rows stand on on the render instead.
Test: TenantTasksViewTest::testTheTaskColumnFollowsTheReadersLanguage creates the task in English, adds a French override of the node label, renders the shipped view's Task column in French and expects the French name. Without the change it renders Review request. TenantTasksViewTest::testTheTaskColumnIsCachedOnItsRowsTokens and ConfigTranslationListCacheTest (workflow and status, save and delete) each fail without their fix, as do StateStatusViewsTest::testThePerFieldIdThemeTemplateDoesNotWrapTheStatusTag, StateStatusViewsTest::testTheStatusColumnIsTranslatedApartFromCoresStatus, WorkItemPresentationTest::testTheStateLabelIsTranslatedAsSaidOfTheTask, TenantTasksViewTest::testTheProcessColumnNamesTheInstance, ViewsDashboardTest::testTheTokensProcessColumnNamesTheInstance and ViewsDashboardTest::testTheTraceFromTokenColumnGivesTheParentTokenId.
AI-Generated: Yes (Claude Code found this in a pre-release audit and wrote the change and its test.)