Skip to content

Commit 99cd5e8

Browse files
committed
FIX: Incorrect Group index in UI for survey
1 parent 9d5d562 commit 99cd5e8

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

sormas-api/src/main/java/de/symeda/sormas/api/externalmessage/survey/PatchField.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ public PatchField setGroupIndex(@Nullable Integer groupIndex) {
6464
}
6565

6666
@JsonIgnore
67-
public Optional<Integer> getGroupNumber() {
68-
return Optional.ofNullable(groupIndex).map(index -> index + 1);
67+
public Optional<Integer> getGroupIndexAsOptional() {
68+
return Optional.ofNullable(groupIndex);
6969
}
7070

7171
@JsonValue

sormas-ui/src/main/java/de/symeda/sormas/ui/externalmessage/surveyresponse/SurveyResponseDisplayUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ private SurveyResponseDisplayUtils() {
1414
}
1515

1616
public static String resolveFieldName(PatchField patchField, DisplayablePartialRetrievalResponse displayData) {
17-
String groupNumberPrefix = patchField.getGroupNumber().map(integer -> integer + ": ").orElse("");
17+
String groupNumberPrefix = patchField.getGroupIndexAsOptional().map(integer -> integer + ": ").orElse("");
1818
String fieldPath = patchField.getField();
1919

2020
DisplayableFieldInfo info = displayData.getFieldInfoDictionary().get(fieldPath);

0 commit comments

Comments
 (0)