Disable agent selection in work items when out of credits

What does this MR do and why?

This merge request adds functionality to prevent certain users from being assigned to work items. The changes introduce a way to mark users as "disabled" or non-assignable, with visual indicators showing why they can't be selected (like displaying "Cannot be assigned" instead of their username). The system now filters out disabled users when making assignments and shows them with a disabled appearance in dropdown menus. If the agent is already assigned to the item they can be removed but not re-added after.

References

Screenshots or screen recordings

Screen_Recording_2025-12-10_at_10.28.26

How to set up and validate locally

  1. Make sure to have AI features set up
  2. Setup an Agent
  3. Setup triggers for this agent that include assignment

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Frédéric Caplette

Merge request reports

Loading