From 91c55eb9829e54939626a36352c25b1fa092cbfe Mon Sep 17 00:00:00 2001 From: Deepak Dixit Date: Mon, 8 Jan 2024 17:28:54 +0530 Subject: [PATCH] Only check the StatusFlowTransition if the entity belongs to the same entity group. --- .../moqui/impl/service/runner/EntityAutoServiceRunner.groovy | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/src/main/groovy/org/moqui/impl/service/runner/EntityAutoServiceRunner.groovy b/framework/src/main/groovy/org/moqui/impl/service/runner/EntityAutoServiceRunner.groovy index e84b4c405..02bd81eb8 100644 --- a/framework/src/main/groovy/org/moqui/impl/service/runner/EntityAutoServiceRunner.groovy +++ b/framework/src/main/groovy/org/moqui/impl/service/runner/EntityAutoServiceRunner.groovy @@ -447,7 +447,10 @@ class EntityAutoServiceRunner implements ServiceRunner { result.put("statusChanged", !(lookedUpValue.getNoCheckSimple("statusId") == parameters.get("statusId"))) // logger.warn("========= oldStatusId=${result.oldStatusId}, statusChanged=${result.statusChanged}, lookedUpValue.statusId=${lookedUpValue.statusId}, parameters.statusId=${parameters.statusId}, lookedUpValue=${lookedUpValue}") } - + //Only check the StatusFlowTransition if the entity belongs to the same entity group + if (ed.getEntityGroupName() != efi.getEntityDefinition("moqui.basic.StatusFlowTransition").getEntityGroupName()) { + return + } // do the StatusValidChange check String parameterStatusId = (String) parameters.get("statusId") if (parameterStatusId) {