inner join projects p on p.uuid=i.component_uuid
inner join projects root on root.uuid=i.project_uuid
where
- r.is_external = ${_false} and
+ (r.is_external is NULL or r.is_external = ${_false}) and
i.component_uuid = #{componentUuid,jdbcType=VARCHAR} and
i.status <> 'CLOSED'
</select>
inner join projects p on p.uuid = i.component_uuid
inner join projects root on root.uuid = i.project_uuid
where
- r.is_external = ${_false} and
+ (r.is_external is NULL or r.is_external = ${_false}) and
i.project_uuid = #{projectUuid, jdbcType=VARCHAR} and
p.module_uuid_path like #{likeModuleUuidPath, jdbcType=VARCHAR} escape '/' and
i.status <> 'CLOSED'
RuleDefinitionDto external = db.rules().insert(ruleDefinitionDto -> ruleDefinitionDto.setIsExternal(true));
IssueDto issueFromExteralruleOnFile = db.issues().insert(external, project, file, i -> i.setKee("ON_FILE_FROM_EXTERNAL"));
+
+ RuleDefinitionDto migrated = db.rules().insert();
+ db.executeUpdateSql("update rules set is_external = NULL where rules.id = ?", migrated.getId());
+ IssueDto issueFromMigratedRule = db.issues().insert(migrated, project, file, i -> i.setKee("MIGRATED"));
addPermissionTo(project);
try (CloseableIterator<ServerIssue> result = callStream(project.getKey(), null)) {
.containsExactlyInAnyOrder(
tuple(issueOnFile.getKey(), module.getKey()),
tuple(issueOnModule.getKey(), module.getKey()),
- tuple(issueOnProject.getKey(), project.getKey()));
+ tuple(issueOnProject.getKey(), project.getKey()),
+ tuple(issueFromMigratedRule.getKey(), module.getKey()));
}
}