From d052b6aa87628879680a5c22a9e845f33363aea0 Mon Sep 17 00:00:00 2001 From: Joy A Date: Fri, 1 Nov 2024 15:33:26 +0530 Subject: [PATCH] avniproject/avni-webapp#1116 | Include QG name in concept usage response if form element is part of QG --- .../server/web/request/application/FormUsageContract.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/avni-server-api/src/main/java/org/avni/server/web/request/application/FormUsageContract.java b/avni-server-api/src/main/java/org/avni/server/web/request/application/FormUsageContract.java index 33d0b69b5..4eb8efd6b 100644 --- a/avni-server-api/src/main/java/org/avni/server/web/request/application/FormUsageContract.java +++ b/avni-server-api/src/main/java/org/avni/server/web/request/application/FormUsageContract.java @@ -11,6 +11,7 @@ public class FormUsageContract { private String formElementGroupUUID; private String formElementUUID; private String formElementGroupName; + private String formElementQGGroupName; private String formElementName; static public FormUsageContract fromEntity(FormElement formElement) { @@ -23,6 +24,7 @@ static public FormUsageContract fromEntity(FormElement formElement) { formUsageContract.setFormName(form.getName()); formUsageContract.setFormUUID(form.getUuid()); formUsageContract.setFormElementGroupName(formElementGroup.getName()); + formUsageContract.setFormElementQGGroupName(formElement.isPartOfQuestionGroup() ? formElement.getGroup().getName() : null); formUsageContract.setformElementName(formElement.getName()); return formUsageContract; } @@ -82,5 +84,11 @@ public String getformElementName(){ return formElementName; } + public String getFormElementQGGroupName() { + return formElementQGGroupName; + } + public void setFormElementQGGroupName(String formElementQGGroupName) { + this.formElementQGGroupName = formElementQGGroupName; + } }