Commit ac6a867f authored by Marco Descher's avatar Marco Descher
Browse files

[23238] TaskService do not incur manual tasks

parent 015b4ff2
Pipeline #22645 passed with stages
in 4 minutes and 13 seconds
...@@ -9,12 +9,13 @@ import ch.elexis.core.services.IQuery; ...@@ -9,12 +9,13 @@ import ch.elexis.core.services.IQuery;
import ch.elexis.core.services.IQuery.COMPARATOR; import ch.elexis.core.services.IQuery.COMPARATOR;
import ch.elexis.core.tasks.model.ITaskDescriptor; import ch.elexis.core.tasks.model.ITaskDescriptor;
import ch.elexis.core.tasks.model.ModelPackage; import ch.elexis.core.tasks.model.ModelPackage;
import ch.elexis.core.tasks.model.TaskTriggerType;
public class TaskServiceUtil { public class TaskServiceUtil {
/** /**
* Load the (active) task descriptors for a given runnable we are responsible for (that is, assigned as * Load the (active) task descriptors for a given runnable we are responsible for (that is, assigned as
* runner) * runner). Task descriptors with {@link TaskTriggerType#MANUAL} are not considered.
* *
* @param identifiedRunnable * @param identifiedRunnable
* @param taskModelService * @param taskModelService
...@@ -27,6 +28,8 @@ public class TaskServiceUtil { ...@@ -27,6 +28,8 @@ public class TaskServiceUtil {
query.and(ModelPackage.Literals.ITASK_DESCRIPTOR__ACTIVE, COMPARATOR.EQUALS, true); query.and(ModelPackage.Literals.ITASK_DESCRIPTOR__ACTIVE, COMPARATOR.EQUALS, true);
query.and(ModelPackage.Literals.ITASK_DESCRIPTOR__IDENTIFIED_RUNNABLE_ID, COMPARATOR.EQUALS, query.and(ModelPackage.Literals.ITASK_DESCRIPTOR__IDENTIFIED_RUNNABLE_ID, COMPARATOR.EQUALS,
identifiedRunnable.getId()); identifiedRunnable.getId());
query.and(ModelPackage.Literals.ITASK_DESCRIPTOR__TRIGGER_TYPE, COMPARATOR.NOT_EQUALS,
TaskTriggerType.MANUAL.ordinal());
query.startGroup(); query.startGroup();
query.and(ModelPackage.Literals.ITASK_DESCRIPTOR__RUNNER, COMPARATOR.EQUALS, query.and(ModelPackage.Literals.ITASK_DESCRIPTOR__RUNNER, COMPARATOR.EQUALS,
contextService.getStationIdentifier()); contextService.getStationIdentifier());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment