Skip to content

Fix email follow up by actor - #81

Open
Lainow wants to merge 9 commits into
mainfrom
fix-email-folow-up-by-actor
Open

Lainow wants to merge 9 commits into
mainfrom
fix-email-folow-up-by-actor

Conversation

@Lainow

@Lainow Lainow commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Checklist before requesting a review

Please delete options that are not relevant.

  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.
  • This change requires a documentation update.

Description

  • It fixes !46820
  • Here is a brief description of what this PR does

Brings back the Formcreator "email followup" per actor, lost by the forms migration.

  • New "Email followup" destination field: one toggle per actor source (requesters, observers, assignees). A person found only by disabled sources gets no followup.
  • New plugins:advancedforms:import-formcreator-actors-notification command to import the Formcreator settings (--dry-run, --force). Imported destinations are skipped by the next runs, so manual changes are kept.

Screenshots (if appropriate):

@Lainow Lainow self-assigned this Oct 29, 2026
@Lainow
Lainow requested a review from MyvTsv October 29, 2026 13:00
MySQL reorders the keys of the JSON destination config: compare the
saved configs with their keys sorted.
@Lainow
Lainow force-pushed the fix-email-folow-up-by-actor branch from 3c42fb9 to 9e8c39d Compare October 29, 2026 14:23
@Lainow Lainow changed the title Fix email folow up by actor Fix email follow up by actor Oct 30, 2026
@Lainow
Lainow requested review from a team, Herafia and RomainLvr and removed request for a team November 2, 2026 08:14
Comment thread CHANGELOG.md Resolved
@Lainow
Lainow requested a review from Herafia November 3, 2026 10:37
Herafia
Herafia previously approved these changes Nov 4, 2026
@Lainow
Lainow requested a review from Herafia November 9, 2026 08:23

@RomainLvr RomainLvr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks solid overall: the migrated form lookup (uuid5), name-based destination matching, HasFieldWithQuestionId on roles, _from_import, and the delegation handling all check out against core. A few remarks:

  1. muteActorsInInput relies on a core internal. Core ITILActorField::addActorToInput() appends _notif entries without the template lines, while CommonITILObject pairs actors and _notif by the same key. With a template, core is already misaligned. The plugin re-indexes on $line, which fixes this, but only when it mutes someone ($has_changes). So the behavior depends on whether an actor is muted. The real fix belongs in core (index _notif like the actors); worth a separate core PR.
  2. Duplicated logic. getSources() and getPersons() repeat the same SPECIFIC_VALUES / SPECIFIC_ANSWERS / strategy-level branching. Resolving persons from the sources already computed would remove about 80 lines from a 735-line file.
  3. DOM hack in the Twig template. Moving the ? helper into the core label via :scope > div > label.form-label will break silently if the core markup changes. Acceptable without an extension point, but an E2E assertion on the helper would catch it.
  4. Command storage in glpi_configs. It adds one destination_<id> row per imported destination. Fine for a one-shot command, and uninstall cleans the context, but keep it in mind for instances with thousands of destinations.
  5. Minor: getPersons() calls strategy->getITILActors() again after the core actor field already did, so it runs twice per submission. Negligible today.

None of these are blocking; 1 and 2 are the ones I'd address.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants