Skip to content

Commit 3a40eec

Browse files
authored
EPMRPP-98884 || Label shown when launch have no attributes
2 parents 1a15f01 + 5b84644 commit 3a40eec

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/java/com/epam/reportportal/extension/slack/collector/laucnh/AttributesCollector.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
import com.epam.reportportal.extension.slack.collector.PropertyCollector;
77
import com.epam.reportportal.extension.slack.model.enums.template.DefaultTemplateProperty;
88
import com.epam.ta.reportportal.entity.ItemAttribute;
9-
import com.epam.ta.reportportal.entity.integration.Integration;
109
import com.epam.ta.reportportal.entity.launch.Launch;
11-
import java.util.Collections;
1210
import java.util.Map;
1311
import java.util.Set;
1412
import java.util.stream.Collectors;
@@ -17,11 +15,13 @@
1715

1816
public class AttributesCollector implements PropertyCollector<Launch, DefaultTemplateProperty> {
1917

18+
private final static String EMPTY_ATTRIBUTES = "-";
19+
2020
@Override
2121
public Map<DefaultTemplateProperty, String> collect(Launch launch) {
2222
return ofNullable(launch.getAttributes()).filter(CollectionUtils::isNotEmpty)
2323
.map(this::convertToProperties)
24-
.orElseGet(Collections::emptyMap);
24+
.orElseGet(() -> Map.of(LAUNCH_ATTRIBUTES, EMPTY_ATTRIBUTES));
2525
}
2626

2727
private Map<DefaultTemplateProperty, String> convertToProperties(Set<ItemAttribute> attributes) {

src/main/resources/message-template/finish-launch.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
},
180180
{
181181
"type": "text",
182-
"text": " SISTEM ISSUE GROUP: \t\t${statistics$defects$system_issue$total}\n"
182+
"text": " SYSTEM ISSUE GROUP: \t\t${statistics$defects$system_issue$total}\n"
183183
},
184184
{
185185
"type": "emoji",

0 commit comments

Comments
 (0)