AI Automators Queue/Cron: prevent duplicate queue items when entity is saved multiple times
## Summary When using the **Queue/Cron** worker type in AI Automators, saving an entity multiple times before cron runs causes duplicate queue items to accumulate for the same entity/field combination. ## Problem Site builders who configure AI Automator fields with the Queue/Cron worker type may encounter redundant AI processing when an entity is saved more than once before the queue is processed. Each save unconditionally adds a new queue item, even if one for that field is already pending. This results in: - Unnecessary AI API calls for the same content - Increased processing time and potential cost - Unpredictable field values if the queue processes items out of expected order ## Proposed solution Add a per-field checkbox option in the AI Automator field configuration UI, visible only when the Queue/Cron worker type is selected. **Default behaviour (checkbox unchecked):** A new queue item is not added if one for that field is already waiting to be processed. **Override (checkbox checked):** A new queue item is added on every save, even when processing is still pending — for cases where the latest content should always be re-processed. Suggested label: *Re-queue on each save* Suggested description: *By default, a new queue item is not added if this field is already waiting to be processed. Enable this to add a new queue item on every save, even when processing is still pending.* ## Workaround None. Duplicate items can only be removed by manually clearing the queue between saves. ## Affected modules / components `ai_automators` — Queue/Cron worker type <!-- Issue description drafted with AI assistance. See https://www.drupal.org/docs/develop/issues/issue-procedures-and-etiquette/policy-on-the-use-of-ai-when-contributing-to-drupal -->
issue