lib/checkoff/internal/task_selector_evaluator.rb in checkoff-0.48.0 vs lib/checkoff/internal/task_selector_evaluator.rb in checkoff-0.50.0
- old
+ new
@@ -229,10 +229,23 @@
def evaluate(task)
@tasks.task_ready?(task)
end
end
+ # :unassigned function
+ class UnassignedPFunctionEvaluator < FunctionEvaluator
+ def matches?
+ fn?(task_selector, :unassigned)
+ end
+
+ # @param task [Asana::Resources::Task]
+ # @return [Boolean]
+ def evaluate(task)
+ task.assignee.nil?
+ end
+ end
+
# :due_date_set function
class DueDateSetPFunctionEvaluator < FunctionEvaluator
FUNCTION_NAME = :due_date_set
def matches?
@@ -463,9 +476,10 @@
Checkoff::TaskSelectorClasses::CustomFieldGidValueFunctionEvaluator,
Checkoff::TaskSelectorClasses::CustomFieldGidValueContainsAnyGidFunctionEvaluator,
Checkoff::TaskSelectorClasses::CustomFieldGidValueContainsAllGidsFunctionEvaluator,
Checkoff::TaskSelectorClasses::AndFunctionEvaluator,
Checkoff::TaskSelectorClasses::DuePFunctionEvaluator,
+ Checkoff::TaskSelectorClasses::UnassignedPFunctionEvaluator,
Checkoff::TaskSelectorClasses::DueDateSetPFunctionEvaluator,
Checkoff::TaskSelectorClasses::FieldLessThanNDaysAgoFunctionEvaluator,
Checkoff::TaskSelectorClasses::CustomFieldLessThanNDaysFromNowFunctionEvaluator,
Checkoff::TaskSelectorClasses::CustomFieldGreaterThanOrEqualToNDaysFromNowFunctionEvaluator,
Checkoff::TaskSelectorClasses::StringLiteralEvaluator,