app/repositories/task_action_repository.rb
# Exclude users who aren't active or to whom the task is already assigned.
Exclude users who aren't active or to whom the task is already assigned.
Exclude users who aren ' t active or to whom the task is already assigned .
def potential_task_assignees(task)
      if task.assigned_to.is_a?(Organization)
        task.assigned_to.users.active
      elsif task.parent&.assigned_to.is_a?(Organization)
        task.parent.assigned_to.users.active.reject { |check_user| check_user == task.assigned_to }
      else
        []
      end
    end
def potential_task_assignees ( task ) if task . assigned_to . is_a? ( Organization ) task . assigned_to . users . active elsif task . parent &. assigned_to . is_a? ( Organization ) task . parent . assigned_to . users . active . reject { | check_user | check_user == task . assigned_to } else [ ] end end
Exclude users who aren't active or to whom the task is already assigned.
Exclude users who aren ' t active or to whom the task is already assigned .
task