Commit aa0fce86258335a21e1e042d29f256f32eae215c
1 parent
cd3de7cb
Fix for Alarm Ack/Clear/Update when Propagation flag is set and Relation Type Filter is used
Showing
1 changed file
with
1 additions
and
7 deletions
... | ... | @@ -386,13 +386,7 @@ public class BaseAlarmService extends AbstractEntityService implements AlarmServ |
386 | 386 | private void updateRelations(Alarm alarm, AlarmStatus oldStatus, AlarmStatus newStatus) { |
387 | 387 | try { |
388 | 388 | List<EntityRelation> relations = relationService.findByToAsync(alarm.getTenantId(), alarm.getId(), RelationTypeGroup.ALARM).get(); |
389 | - | |
390 | - List<String> propagateRelationTypes = alarm.getPropagateRelationTypes(); | |
391 | - Stream<EntityRelation> relationStream = relations.stream(); | |
392 | - if (!CollectionUtils.isEmpty(propagateRelationTypes)) { | |
393 | - relationStream = relationStream.filter(entityRelation -> propagateRelationTypes.contains(entityRelation.getType())); | |
394 | - } | |
395 | - Set<EntityId> parents = relationStream.map(EntityRelation::getFrom).collect(Collectors.toSet()); | |
389 | + Set<EntityId> parents = relations.stream().map(EntityRelation::getFrom).collect(Collectors.toSet()); | |
396 | 390 | for (EntityId parentId : parents) { |
397 | 391 | updateAlarmRelation(alarm.getTenantId(), parentId, alarm.getId(), oldStatus, newStatus); |
398 | 392 | } | ... | ... |