diff --git a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityRuleCheckService.kt b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityRuleCheckService.kt index 0b30dcfd74f..3196349db02 100644 --- a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityRuleCheckService.kt +++ b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityRuleCheckService.kt @@ -469,10 +469,10 @@ class QualityRuleCheckService @Autowired constructor( if (indicator.isScriptElementIndicator()) { listOf(metadataList .filter { it.elementType in QualityIndicator.SCRIPT_ELEMENT } - .find { indicator.enName == it.enName && indicator.taskName == it.taskName }) + .find { indicator.enName == it.enName && it.taskName.startsWith(indicator.taskName ?: "") }) } else { metadataList.filter { - it.taskName == indicator.taskName && + it.taskName.startsWith(indicator.taskName ?: "") && indicator.metadataList.map { metadata -> metadata.enName }.contains(it.enName) } }