Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DTSCCI-000 SNI-5921 stop creating wa task when uploading additional document #1395

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import uk.gov.hmcts.reform.civil.callback.CallbackHandler;
import uk.gov.hmcts.reform.civil.callback.CallbackParams;
import uk.gov.hmcts.reform.civil.callback.CaseEvent;
import uk.gov.hmcts.reform.civil.enums.YesOrNo;
import uk.gov.hmcts.reform.civil.helpers.CaseDetailsConverter;
import uk.gov.hmcts.reform.civil.model.BusinessProcess;
import uk.gov.hmcts.reform.civil.model.CaseData;
Expand Down Expand Up @@ -66,6 +67,7 @@ private CallbackResponse submitDocuments(CallbackParams callbackParams) {

caseDataBuilder.uploadDocument(null);
caseDataBuilder.businessProcess(BusinessProcess.ready(UPLOAD_ADDL_DOCUMENTS)).build();
caseDataBuilder.isWaTaskRequired(YesOrNo.NO);
CaseData updatedCaseData = caseDataBuilder.build();
return AboutToStartOrSubmitCallbackResponse.builder()
.data(updatedCaseData.toMap(objectMapper))
Expand All @@ -78,7 +80,7 @@ private CaseData buildBundleData(CaseData caseData, String userId) {
List<Element<UploadDocumentByType>> exBundle = caseData.getUploadDocument()
.stream().filter(x -> !x.getValue().getDocumentType().toLowerCase()
.contains(BUNDLE))
.collect(Collectors.toList());
.toList();
List<Element<CaseDocument>> bundle = caseData.getUploadDocument()
.stream().filter(x -> x.getValue().getDocumentType().toLowerCase()
.contains(BUNDLE))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ public class CaseData implements MappableObject {
private final String judgeTitle;

private final List<Element<UploadDocumentByType>> uploadDocument;

private final YesOrNo isWaTaskRequired;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we rename this to make it more specific to the WA task that we are trying to prevent being created as the name seems to be too generic

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done - as we discusssed

// GA for LIP
private final YesOrNo isGaApplicantLip;
private final YesOrNo isGaRespondentOneLip;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ class UploadAdditionalDocumentsCallbackHandlerTest extends BaseCallbackHandlerTe
@MockBean
AssignCategoryId assignCategoryId;

List<Element<CaseDocument>> documents = new ArrayList<>();

private static final String DUMMY_EMAIL = "[email protected]";

@BeforeEach
Expand Down Expand Up @@ -105,6 +103,7 @@ void shouldSetUpReadyBusinessProcessWhenJudgeUncloaked() {
.respondent2SameLegalRepresentative(YesOrNo.NO)
.applicationIsUncloakedOnce(YES)
.parentClaimantIsApplicant(YES)
.isWaTaskRequired(NO)
.generalAppApplnSolicitor(GASolicitorDetailsGAspec.builder().id(STRING_CONSTANT).forename("GAApplnSolicitor")
.email(DUMMY_EMAIL).organisationIdentifier("1").build())
.uploadDocument(uploadDocumentByApplicant)
Expand All @@ -119,6 +118,7 @@ void shouldSetUpReadyBusinessProcessWhenJudgeUncloaked() {
assertThat(responseCaseData.getBusinessProcess().getStatus()).isEqualTo(BusinessProcessStatus.READY);
assertThat(responseCaseData.getBusinessProcess().getCamundaEvent()).isEqualTo(UPLOAD_ADDL_DOCUMENTS.toString());
assertThat(responseCaseData.getIsDocumentVisible()).isEqualTo(YES);
assertThat(responseCaseData.getIsWaTaskRequired()).isEqualTo(NO);
}

@Test
Expand Down
Loading