Skip to content

Commit

Permalink
CIV-16614 - Take case offline GA WA task created when there are no GA…
Browse files Browse the repository at this point in the history
…s on the claim (#6136)

* added a condition to prevent setting the flag if the main case has no GA application.

* rafactored.

* rafactored.

---------

Co-authored-by: sankhajuria <sankhajuria@gmail.com>
  • Loading branch information
neeta-hmcts and sankhajuria authored Feb 18, 2025
1 parent 83c457c commit 85d1305
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import java.util.List;
import java.util.Map;
import java.util.Objects;

import static uk.gov.hmcts.reform.civil.callback.CallbackParams.Params.BEARER_TOKEN;
import static uk.gov.hmcts.reform.civil.callback.CallbackType.ABOUT_TO_SUBMIT;
Expand Down Expand Up @@ -55,9 +56,10 @@ private CallbackResponse triggerGaEvent(CallbackParams callbackParams) {

String authToken = callbackParams.getParams().get(BEARER_TOKEN).toString();
try {
if (!(featureToggleService.isGaForLipsEnabledAndLocationWhiteListed(caseData
.getCaseManagementLocation().getBaseLocation()))
&& caseData.isLipCase()) {
if (!(featureToggleService.isGaForLipsEnabledAndLocationWhiteListed(
caseData.getCaseManagementLocation().getBaseLocation()))
&& caseData.isLipCase()
&& (Objects.nonNull(caseData.getGeneralApplications()) && !caseData.getGeneralApplications().isEmpty())) {
caseDataBuilder.gaEaCourtLocation(YesOrNo.YES);
}
if (caseData.getGeneralApplications() != null && !caseData.getGeneralApplications().isEmpty()) {
Expand Down

0 comments on commit 85d1305

Please sign in to comment.