Skip to content

Commit

Permalink
IVYPORTAL-17522: fix performance due to hide systemtask (#1003)
Browse files Browse the repository at this point in the history
  • Loading branch information
pvthai-axonivy authored Sep 6, 2024
1 parent 247facb commit 4786b00
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import ch.ivyteam.ivy.scripting.objects.Record;
import ch.ivyteam.ivy.scripting.objects.Recordset;
import ch.ivyteam.ivy.security.IRole;
import ch.ivyteam.ivy.security.ISecurityConstants;
import ch.ivyteam.ivy.security.ISecurityContext;
import ch.ivyteam.ivy.security.IUser;
import ch.ivyteam.ivy.security.exec.Sudo;
import ch.ivyteam.ivy.workflow.ITask;
Expand Down Expand Up @@ -96,7 +96,7 @@ protected long countTasks(TaskQuery query) {
}

protected TaskQuery queryExcludeSystemTasks() {
return TaskQuery.create().where().workerUserName().isNotEqual(ISecurityConstants.SYSTEM_USER_NAME);
return TaskQuery.create().where().workerId().isNotEqual(ISecurityContext.current().users().system().getSecurityMemberId());
}

protected TaskQuery queryExcludeHiddenTasks() {
Expand Down

0 comments on commit 4786b00

Please sign in to comment.