Skip to content

Commit

Permalink
CIV-0000 Sprint pi32 s5 t4 to master (#3852)
Browse files Browse the repository at this point in the history
* CIV-11603 Fast Track Claimant Intent (#3720)

* CIV-11571 Fix court location if no specific court (#3569)

* CIV-11571: Add null checking

* CIV-11571: Add unit test

---------

Co-authored-by: jarekPierchala <[email protected]>

* CIV-8241 Manual Determination - Lip Notifications (#3529)

* added changes for claimant response cui event.

* CIV-8291 : Functional code - Need to refactor

* CIV-8291 : Refactor duplicated methods to a common service

* CIV-8291 : Handler Test

* CIV-8291 : Fix checkStyle

* CIV-8291 : Fix checkStyle

* CIV-8291 : Adding mocks

* CIV-8291 : Adding mocks

* CIV-8291 : Adding mocks

* CIV-8291 : Change final state to PROCEEDS_IN_HERITAGE_SYSTEM

* CIV-8291 : Dev comments

* CIV-8291 : Dev comments

* CIV-8291 : Dev comments

* CIV-8291 : Dev comments

* CIV-8241: Set Up Notification

* CIV-8241: Set Up Notification

* CIV-8241: Set Up Notification

* CIV-8241: Set Up Notification

* CIV-8241: Set Up Notification

* CIV-8241: Set Up Notification Test

* CIV-8241: Set Up Notification Test

* CIV-8241: Roll back one line

* CIV-8241: Change method name

* Update build.gradle

* Update build.gradle

---------

Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: sankhajuria <[email protected]>
Co-authored-by: hmcts-version1-pablo <[email protected]>
Co-authored-by: Pablo Ortiz <[email protected]>
Co-authored-by: Raja Mani <[email protected]>
Co-authored-by: jarekPierchala <[email protected]>

* CIV-10727 Assisted order uplift (#3550)

* CIV-11158 Save hearing location in case data
* Added setting assisted order courtLocation to hearingLocation or caseManagementLocation is hearingLocation is not defined
* Fixed not filtering courtLocations by caseTypeId
---------

Co-authored-by: sankaviv1 <[email protected]>
Co-authored-by: sankaviv1 <[email protected]>
Co-authored-by: GarethLancaster <[email protected]>
Co-authored-by: douglasrice <[email protected]>

* CIV-11695 - Update ClaimantResponseCuiCallbackHandler.java (#3616)

* Update ClaimantResponseCuiCallbackHandler.java

* fix for judicial referral

* fixed claim state issue and unit tests.

---------

Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: Pablo Ortiz <[email protected]>
Co-authored-by: annika-moorthy <[email protected]>

* CIV-8905 Claimant Dashboard Status "Mediation E2E, Manual Determination (org), ITP failed" (#3564)

* CIV-8905 Added functionality for dashboard status

* CIV-8905 Added functionality for dashboard status

* CIV-8905 Fixed AC 4

* CIV-11363 add trigger event (#3633)

* CIV-11363 add trigger event

* CIV-8905 Merged with bulk_tasks

---------

Co-authored-by: Pablo Ortiz <[email protected]>
Co-authored-by: MMNycz <[email protected]>

* CIV-8454 Trigger service request after CCD case creation (#3597)

* CIV-8454 Trigger service request after CCD case creation

* CIV-8454 Move Service Request creation to Camunda

* CIV-8454 Undo flow state change - not required

* CIV-8454 Remove empty lines

* CIV-8454 Add test for service request handler CUI

* CIV-8454 Only create service request when no help with fees

* CIV-8454 Change event name

* CIV-11144 updated witness summary to add date (#3623)

* updated witness summary to add date

* Update Jenkinsfile_CNP point at CCD

* Update Jenkinsfile_CNP

* CIV-11363 add caseId to caseIdForRetrigger.txt (#3646)

* CIV-11363 add caseId to caseIdForRetrigger.txt

* adding not suitable for sdo too

* update caseIdForRetriger

---------

Co-authored-by: Astha Malviya <[email protected]>

* testing master build (#3650)

Co-authored-by: sankhajuria <[email protected]>

---------

Co-authored-by: Raja Mani <[email protected]>
Co-authored-by: drummondjm <[email protected]>
Co-authored-by: MMNycz <[email protected]>
Co-authored-by: Astha Malviya <[email protected]>
Co-authored-by: asthamalviya <[email protected]>
Co-authored-by: sankhajuria <[email protected]>
Co-authored-by: jarekPierchala <[email protected]>

* CIV-11603 Set Up Case State

* CIV-11603 Set Up Translation

* CIV-11603 Update Mediation Check

* CIV-11603 Remove unused import

* CIV-11603 Update Unit Test

* CIV-11603 Adding more unit test

* CIV-11603 Update from review

* CIV-11603 Merged with master

---------

Co-authored-by: jarekPierchala <[email protected]>
Co-authored-by: jarekPierchala <[email protected]>
Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: sankhajuria <[email protected]>
Co-authored-by: hmcts-version1-pablo <[email protected]>
Co-authored-by: Pablo Ortiz <[email protected]>
Co-authored-by: Raja Mani <[email protected]>
Co-authored-by: Gareth Lancaster <[email protected]>
Co-authored-by: sankaviv1 <[email protected]>
Co-authored-by: sankaviv1 <[email protected]>
Co-authored-by: GarethLancaster <[email protected]>
Co-authored-by: douglasrice <[email protected]>
Co-authored-by: jeswanth-hmcts <[email protected]>
Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: annika-moorthy <[email protected]>
Co-authored-by: marianadpereira <[email protected]>
Co-authored-by: Manish Garg <[email protected]>
Co-authored-by: MMNycz <[email protected]>
Co-authored-by: Paul Pearson <[email protected]>
Co-authored-by: drummondjm <[email protected]>
Co-authored-by: Astha Malviya <[email protected]>
Co-authored-by: asthamalviya <[email protected]>
Co-authored-by: Harry H <[email protected]>
Co-authored-by: marianadpereira <[email protected]>

* CIV-11603 Fast Track Claimant Intent (#3720)

* CIV-11571 Fix court location if no specific court (#3569)

* CIV-11571: Add null checking

* CIV-11571: Add unit test

---------

Co-authored-by: jarekPierchala <[email protected]>

* CIV-8241 Manual Determination - Lip Notifications (#3529)

* added changes for claimant response cui event.

* CIV-8291 : Functional code - Need to refactor

* CIV-8291 : Refactor duplicated methods to a common service

* CIV-8291 : Handler Test

* CIV-8291 : Fix checkStyle

* CIV-8291 : Fix checkStyle

* CIV-8291 : Adding mocks

* CIV-8291 : Adding mocks

* CIV-8291 : Adding mocks

* CIV-8291 : Change final state to PROCEEDS_IN_HERITAGE_SYSTEM

* CIV-8291 : Dev comments

* CIV-8291 : Dev comments

* CIV-8291 : Dev comments

* CIV-8291 : Dev comments

* CIV-8241: Set Up Notification

* CIV-8241: Set Up Notification

* CIV-8241: Set Up Notification

* CIV-8241: Set Up Notification

* CIV-8241: Set Up Notification

* CIV-8241: Set Up Notification Test

* CIV-8241: Set Up Notification Test

* CIV-8241: Roll back one line

* CIV-8241: Change method name

* Update build.gradle

* Update build.gradle

---------

Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: sankhajuria <[email protected]>
Co-authored-by: hmcts-version1-pablo <[email protected]>
Co-authored-by: Pablo Ortiz <[email protected]>
Co-authored-by: Raja Mani <[email protected]>
Co-authored-by: jarekPierchala <[email protected]>

* CIV-10727 Assisted order uplift (#3550)

* CIV-11158 Save hearing location in case data
* Added setting assisted order courtLocation to hearingLocation or caseManagementLocation is hearingLocation is not defined
* Fixed not filtering courtLocations by caseTypeId
---------

Co-authored-by: sankaviv1 <[email protected]>
Co-authored-by: sankaviv1 <[email protected]>
Co-authored-by: GarethLancaster <[email protected]>
Co-authored-by: douglasrice <[email protected]>

* CIV-11695 - Update ClaimantResponseCuiCallbackHandler.java (#3616)

* Update ClaimantResponseCuiCallbackHandler.java

* fix for judicial referral

* fixed claim state issue and unit tests.

---------

Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: Pablo Ortiz <[email protected]>
Co-authored-by: annika-moorthy <[email protected]>

* CIV-8905 Claimant Dashboard Status "Mediation E2E, Manual Determination (org), ITP failed" (#3564)

* CIV-8905 Added functionality for dashboard status

* CIV-8905 Added functionality for dashboard status

* CIV-8905 Fixed AC 4

* CIV-11363 add trigger event (#3633)

* CIV-11363 add trigger event

* CIV-8905 Merged with bulk_tasks

---------

Co-authored-by: Pablo Ortiz <[email protected]>
Co-authored-by: MMNycz <[email protected]>

* CIV-8454 Trigger service request after CCD case creation (#3597)

* CIV-8454 Trigger service request after CCD case creation

* CIV-8454 Move Service Request creation to Camunda

* CIV-8454 Undo flow state change - not required

* CIV-8454 Remove empty lines

* CIV-8454 Add test for service request handler CUI

* CIV-8454 Only create service request when no help with fees

* CIV-8454 Change event name

* CIV-11144 updated witness summary to add date (#3623)

* updated witness summary to add date

* Update Jenkinsfile_CNP point at CCD

* Update Jenkinsfile_CNP

* CIV-11363 add caseId to caseIdForRetrigger.txt (#3646)

* CIV-11363 add caseId to caseIdForRetrigger.txt

* adding not suitable for sdo too

* update caseIdForRetriger

---------

Co-authored-by: Astha Malviya <[email protected]>

* testing master build (#3650)

Co-authored-by: sankhajuria <[email protected]>

---------

Co-authored-by: Raja Mani <[email protected]>
Co-authored-by: drummondjm <[email protected]>
Co-authored-by: MMNycz <[email protected]>
Co-authored-by: Astha Malviya <[email protected]>
Co-authored-by: asthamalviya <[email protected]>
Co-authored-by: sankhajuria <[email protected]>
Co-authored-by: jarekPierchala <[email protected]>

* CIV-11603 Set Up Case State

* CIV-11603 Set Up Translation

* CIV-11603 Update Mediation Check

* CIV-11603 Remove unused import

* CIV-11603 Update Unit Test

* CIV-11603 Adding more unit test

* CIV-11603 Update from review

* CIV-11603 Merged with master

---------

Co-authored-by: jarekPierchala <[email protected]>
Co-authored-by: jarekPierchala <[email protected]>
Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: sankhajuria <[email protected]>
Co-authored-by: hmcts-version1-pablo <[email protected]>
Co-authored-by: Pablo Ortiz <[email protected]>
Co-authored-by: Raja Mani <[email protected]>
Co-authored-by: Gareth Lancaster <[email protected]>
Co-authored-by: sankaviv1 <[email protected]>
Co-authored-by: sankaviv1 <[email protected]>
Co-authored-by: GarethLancaster <[email protected]>
Co-authored-by: douglasrice <[email protected]>
Co-authored-by: jeswanth-hmcts <[email protected]>
Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: annika-moorthy <[email protected]>
Co-authored-by: marianadpereira <[email protected]>
Co-authored-by: Manish Garg <[email protected]>
Co-authored-by: MMNycz <[email protected]>
Co-authored-by: Paul Pearson <[email protected]>
Co-authored-by: drummondjm <[email protected]>
Co-authored-by: Astha Malviya <[email protected]>
Co-authored-by: asthamalviya <[email protected]>
Co-authored-by: Harry H <[email protected]>
Co-authored-by: marianadpereira <[email protected]>

* CIV-0000 Update from master

* CIV-11699 added organisation policy for triggering NOC (#3795)

* CIV-11699 added organisation policy for triggering NOC

* CIV-8334 fast track noise induced hearing (#3780)

* CIV-8334 set allocatedTrack to fast track in case it's NIHL

* CIV-8334 AllocatedTrack refactor

* CIV-8334 AllocatedTrack refactor

* CIV-8334 AllocatedTrack refactor

* CIV-11935 Content Changes - Make Application (#3768)

* CIV-11935 Content Changes - Make Application

* Revert Enum code

* Revert "Revert Enum code"

This reverts commit ce3db86.

---------

Co-authored-by: Madhan Mahadevan <[email protected]>
Co-authored-by: vasudevganesanhmcts <[email protected]>

* CIV-0000 1v2DS response type is null when Respondent 1 is not represented (#3810)

* 1v2DS response type is null when resp 1 is not represented

* CIV-11980 test caseId

* adding logs for take case offline scheduler

---------

Co-authored-by: MMNycz <[email protected]>

* CIV-10338 Added condition to check regions for Early Adaptors for General Apps (#3604)

* CIV-10338 Added condition to check regions for Early Adaptors

* CIV-10338 revert perf change 1 step for setresp

---------

Co-authored-by: vasudevganesanhmcts <[email protected]>
Co-authored-by: Pijian Liao <[email protected]>
Co-authored-by: pliao-hmcts <[email protected]>

* CIV-8336 Judge decision to reconsider request changes (#3790)

* CIV-8336 Judge decision to reconsider request changes

* CIV-8336 fix checkstyle

* Update JudgeDecisionOnReconsiderationRequestCallbackHandler.java

* Update JudgeDecisionOnReconsiderationRequestCallbackHandlerTest.java

---------

Co-authored-by: krishnanuthalapati <[email protected]>
Co-authored-by: Azam <[email protected]>

* CIV-11980 Investigation : Claims missing tasks/role categories (#3811)

* CIV-11980 test caseId

* CIV-8336 fix sonar issue (#3822)

Co-authored-by: Azam <[email protected]>

* CIV-11937 Update GA Doc template (#3793)

* CIV-11937 Update GA Doc template

* Update GA Judicial doc template

* CIV-11862 Remove Damages form from LR vs LiP claim forms (#3762)

* CIV-11862 Remove Damages form from LR vs LiP claim forms

* CIV-11862 Remove Damages form from LR vs LiP claim forms

---------

Co-authored-by: mfallonhmcts <[email protected]>

* CIV-11467 Paragraph 4.1 for claimant LR (#3736)

Co-authored-by: kdaHMCTS <[email protected]>
Co-authored-by: mfallonhmcts <[email protected]>

---------

Co-authored-by: hmcts-version1-ignacio <[email protected]>
Co-authored-by: karthick mohanasundaram <[email protected]>
Co-authored-by: Madhan Mahadevan <[email protected]>
Co-authored-by: vasudevganesanhmcts <[email protected]>
Co-authored-by: asthamalviya <[email protected]>
Co-authored-by: MMNycz <[email protected]>
Co-authored-by: Deepthi Doppalapudi <[email protected]>
Co-authored-by: Pijian Liao <[email protected]>
Co-authored-by: pliao-hmcts <[email protected]>
Co-authored-by: bhagyashreesharma90 <[email protected]>
Co-authored-by: krishnanuthalapati <[email protected]>
Co-authored-by: Azam <[email protected]>
Co-authored-by: UshaPanneerselvam1 <[email protected]>
Co-authored-by: mfallonhmcts <[email protected]>
Co-authored-by: zikrurR <[email protected]>
Co-authored-by: kdaHMCTS <[email protected]>

* CIV-8903 dashboard settlement agreement (#3787)

* Based on full and part admit repayment plan settlement agreement signed

* reverted the change

* build issue resolved

* CIV-8903 Set settlement agreement response deadline and statuses

* CIV-8147 Merge in dependency

* CIV-8903 Add statuses for AC3 and AC4

* CIV-8903 Fix checkstyle

* CIV-8903 Fix checkstyle

* CIV-8903 Add tests for settlement agreement deadline

* CIV-8903 Implement claim statuses for CmcClaim

* CIV-8903 Run against required ccd and camunda branches

* CIV-11571 Fix court location if no specific court (#3569)

* CIV-11571: Add null checking

* CIV-11571: Add unit test

---------

Co-authored-by: jarekPierchala <[email protected]>

* CIV-8241 Manual Determination - Lip Notifications (#3529)

* added changes for claimant response cui event.

* CIV-8291 : Functional code - Need to refactor

* CIV-8291 : Refactor duplicated methods to a common service

* CIV-8291 : Handler Test

* CIV-8291 : Fix checkStyle

* CIV-8291 : Fix checkStyle

* CIV-8291 : Adding mocks

* CIV-8291 : Adding mocks

* CIV-8291 : Adding mocks

* CIV-8291 : Change final state to PROCEEDS_IN_HERITAGE_SYSTEM

* CIV-8291 : Dev comments

* CIV-8291 : Dev comments

* CIV-8291 : Dev comments

* CIV-8291 : Dev comments

* CIV-8241: Set Up Notification

* CIV-8241: Set Up Notification

* CIV-8241: Set Up Notification

* CIV-8241: Set Up Notification

* CIV-8241: Set Up Notification

* CIV-8241: Set Up Notification Test

* CIV-8241: Set Up Notification Test

* CIV-8241: Roll back one line

* CIV-8241: Change method name

* Update build.gradle

* Update build.gradle

---------

Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: sankhajuria <[email protected]>
Co-authored-by: hmcts-version1-pablo <[email protected]>
Co-authored-by: Pablo Ortiz <[email protected]>
Co-authored-by: Raja Mani <[email protected]>
Co-authored-by: jarekPierchala <[email protected]>

* CIV-10727 Assisted order uplift (#3550)

* CIV-11158 Save hearing location in case data
* Added setting assisted order courtLocation to hearingLocation or caseManagementLocation is hearingLocation is not defined
* Fixed not filtering courtLocations by caseTypeId
---------

Co-authored-by: sankaviv1 <[email protected]>
Co-authored-by: sankaviv1 <[email protected]>
Co-authored-by: GarethLancaster <[email protected]>
Co-authored-by: douglasrice <[email protected]>

* CIV-11695 - Update ClaimantResponseCuiCallbackHandler.java (#3616)

* Update ClaimantResponseCuiCallbackHandler.java

* fix for judicial referral

* fixed claim state issue and unit tests.

---------

Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: Pablo Ortiz <[email protected]>
Co-authored-by: annika-moorthy <[email protected]>

* CIV-8905 Claimant Dashboard Status "Mediation E2E, Manual Determination (org), ITP failed" (#3564)

* CIV-8905 Added functionality for dashboard status

* CIV-8905 Added functionality for dashboard status

* CIV-8905 Fixed AC 4

* CIV-11363 add trigger event (#3633)

* CIV-11363 add trigger event

* CIV-8905 Merged with bulk_tasks

---------

Co-authored-by: Pablo Ortiz <[email protected]>
Co-authored-by: MMNycz <[email protected]>

* CIV-8454 Trigger service request after CCD case creation (#3597)

* CIV-8454 Trigger service request after CCD case creation

* CIV-8454 Move Service Request creation to Camunda

* CIV-8454 Undo flow state change - not required

* CIV-8454 Remove empty lines

* CIV-8454 Add test for service request handler CUI

* CIV-8454 Only create service request when no help with fees

* CIV-8454 Change event name

* CIV-11144 updated witness summary to add date (#3623)

* updated witness summary to add date

* Update Jenkinsfile_CNP point at CCD

* Update Jenkinsfile_CNP

* CIV-11363 add caseId to caseIdForRetrigger.txt (#3646)

* CIV-11363 add caseId to caseIdForRetrigger.txt

* adding not suitable for sdo too

* update caseIdForRetriger

---------

Co-authored-by: Astha Malviya <[email protected]>

* testing master build (#3650)

Co-authored-by: sankhajuria <[email protected]>

---------

Co-authored-by: Raja Mani <[email protected]>
Co-authored-by: drummondjm <[email protected]>
Co-authored-by: MMNycz <[email protected]>
Co-authored-by: Astha Malviya <[email protected]>
Co-authored-by: asthamalviya <[email protected]>
Co-authored-by: sankhajuria <[email protected]>
Co-authored-by: jarekPierchala <[email protected]>

* CIV-8903 Implement missing methods

* CIV-8903 Revert ccd and camunda branches

* CIV-8903 Change SEND to SIGNED

* CIV-8903 Move new common implementations to superclass

* CIV-8903 Remove unused imports

* CIV-8903 Fix checkstyle

* CIV-8903 temporary changes to check response of OCMC claims in preview

* CIV-8903 temporary changes to check response of OCMC claims in preview

* CIV-8903 Removed dateformat from desearilization of cmc claim localdatetime

* CIV-8903 Revert unwanted change in DATE_TIME_FORMAT_CMC

* Update FeatureToggleService.java

* Update FeatureToggleServiceTest.java

* CIV-8903 Temporary System out for debugging OCMC claims

* Update ClaimStoreService.java

Temporary changes for debugging OCMC claims

* CIV-8903 Changes for settlement agreement dashboard status

* CIV-8903 Reverting FeatureToggleService temp changes

* CIV-8903 Updated functionality to show OCMC status with correct status

* CIV-8903 Updated functionality to show OCMC status with correct status

---------

Co-authored-by: kalachandrasekar1 <[email protected]>
Co-authored-by: kalachandrasekar1 <[email protected]>
Co-authored-by: paul-pearson <[email protected]>
Co-authored-by: Paul Pearson <[email protected]>
Co-authored-by: jarekPierchala <[email protected]>
Co-authored-by: kenneth-hmcts <[email protected]>
Co-authored-by: jarekPierchala <[email protected]>
Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: sankhajuria <[email protected]>
Co-authored-by: hmcts-version1-pablo <[email protected]>
Co-authored-by: Pablo Ortiz <[email protected]>
Co-authored-by: Raja Mani <[email protected]>
Co-authored-by: Gareth Lancaster <[email protected]>
Co-authored-by: sankaviv1 <[email protected]>
Co-authored-by: sankaviv1 <[email protected]>
Co-authored-by: GarethLancaster <[email protected]>
Co-authored-by: douglasrice <[email protected]>
Co-authored-by: jeswanth-hmcts <[email protected]>
Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: annika-moorthy <[email protected]>
Co-authored-by: marianadpereira <[email protected]>
Co-authored-by: MMNycz <[email protected]>
Co-authored-by: drummondjm <[email protected]>
Co-authored-by: Astha Malviya <[email protected]>
Co-authored-by: asthamalviya <[email protected]>

* CIV-11161 - Docmosis: Manual Determination -"Claimant's Response" (#3656)

* CIV-11571 Fix court location if no specific court (#3569)

* CIV-11571: Add null checking

* CIV-11571: Add unit test

---------

Co-authored-by: jarekPierchala <[email protected]>

* CIV-8241 Manual Determination - Lip Notifications (#3529)

* added changes for claimant response cui event.

* CIV-8291 : Functional code - Need to refactor

* CIV-8291 : Refactor duplicated methods to a common service

* CIV-8291 : Handler Test

* CIV-8291 : Fix checkStyle

* CIV-8291 : Fix checkStyle

* CIV-8291 : Adding mocks

* CIV-8291 : Adding mocks

* CIV-8291 : Adding mocks

* CIV-8291 : Change final state to PROCEEDS_IN_HERITAGE_SYSTEM

* CIV-8291 : Dev comments

* CIV-8291 : Dev comments

* CIV-8291 : Dev comments

* CIV-8291 : Dev comments

* CIV-8241: Set Up Notification

* CIV-8241: Set Up Notification

* CIV-8241: Set Up Notification

* CIV-8241: Set Up Notification

* CIV-8241: Set Up Notification

* CIV-8241: Set Up Notification Test

* CIV-8241: Set Up Notification Test

* CIV-8241: Roll back one line

* CIV-8241: Change method name

* Update build.gradle

* Update build.gradle

---------

Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: sankhajuria <[email protected]>
Co-authored-by: hmcts-version1-pablo <[email protected]>
Co-authored-by: Pablo Ortiz <[email protected]>
Co-authored-by: Raja Mani <[email protected]>
Co-authored-by: jarekPierchala <[email protected]>

* CIV-10727 Assisted order uplift (#3550)

* CIV-11158 Save hearing location in case data
* Added setting assisted order courtLocation to hearingLocation or caseManagementLocation is hearingLocation is not defined
* Fixed not filtering courtLocations by caseTypeId
---------

Co-authored-by: sankaviv1 <[email protected]>
Co-authored-by: sankaviv1 <[email protected]>
Co-authored-by: GarethLancaster <[email protected]>
Co-authored-by: douglasrice <[email protected]>

* CIV-11695 - Update ClaimantResponseCuiCallbackHandler.java (#3616)

* Update ClaimantResponseCuiCallbackHandler.java

* fix for judicial referral

* fixed claim state issue and unit tests.

---------

Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: Pablo Ortiz <[email protected]>
Co-authored-by: annika-moorthy <[email protected]>

* CIV-8905 Claimant Dashboard Status "Mediation E2E, Manual Determination (org), ITP failed" (#3564)

* CIV-8905 Added functionality for dashboard status

* CIV-8905 Added functionality for dashboard status

* CIV-8905 Fixed AC 4

* CIV-11363 add trigger event (#3633)

* CIV-11363 add trigger event

* CIV-8905 Merged with bulk_tasks

---------

Co-authored-by: Pablo Ortiz <[email protected]>
Co-authored-by: MMNycz <[email protected]>

* CIV-8454 Trigger service request after CCD case creation (#3597)

* CIV-8454 Trigger service request after CCD case creation

* CIV-8454 Move Service Request creation to Camunda

* CIV-8454 Undo flow state change - not required

* CIV-8454 Remove empty lines

* CIV-8454 Add test for service request handler CUI

* CIV-8454 Only create service request when no help with fees

* CIV-8454 Change event name

* CIV-11144 updated witness summary to add date (#3623)

* updated witness summary to add date

* Update Jenkinsfile_CNP point at CCD

* Update Jenkinsfile_CNP

* CIV-11363 add caseId to caseIdForRetrigger.txt (#3646)

* CIV-11363 add caseId to caseIdForRetrigger.txt

* adding not suitable for sdo too

* update caseIdForRetriger

---------

Co-authored-by: Astha Malviya <[email protected]>

* testing master build (#3650)

Co-authored-by: sankhajuria <[email protected]>

---------

Co-authored-by: Raja Mani <[email protected]>
Co-authored-by: drummondjm <[email protected]>
Co-authored-by: MMNycz <[email protected]>
Co-authored-by: Astha Malviya <[email protected]>
Co-authored-by: asthamalviya <[email protected]>
Co-authored-by: sankhajuria <[email protected]>
Co-authored-by: jarekPierchala <[email protected]>

* CIV-11161 docmosis form generate

* CIV-11161 build issue fixed

* CIV-11161 checkstyle issue fix

* CIV-11161 test code updated

* CIV-11161 test case updated

* CIV-11161 - testcase updated

* CIV-11161 review comments fixed

* CIV-11161 common jar version updated

* CIV-11161 common jar version updated

* CIV-11161 common jar version updated

* CIV-11161 common jar version updated

* CIV-11161 rebase issue fixed

---------

Co-authored-by: jarekPierchala <[email protected]>
Co-authored-by: kenneth-hmcts <[email protected]>
Co-authored-by: jarekPierchala <[email protected]>
Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: sankhajuria <[email protected]>
Co-authored-by: hmcts-version1-pablo <[email protected]>
Co-authored-by: Pablo Ortiz <[email protected]>
Co-authored-by: Raja Mani <[email protected]>
Co-authored-by: Gareth Lancaster <[email protected]>
Co-authored-by: sankaviv1 <[email protected]>
Co-authored-by: sankaviv1 <[email protected]>
Co-authored-by: GarethLancaster <[email protected]>
Co-authored-by: douglasrice <[email protected]>
Co-authored-by: jeswanth-hmcts <[email protected]>
Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: annika-moorthy <[email protected]>
Co-authored-by: marianadpereira <[email protected]>
Co-authored-by: Manish Garg <[email protected]>
Co-authored-by: MMNycz <[email protected]>
Co-authored-by: Paul Pearson <[email protected]>
Co-authored-by: drummondjm <[email protected]>
Co-authored-by: Astha Malviya <[email protected]>
Co-authored-by: asthamalviya <[email protected]>
Co-authored-by: Harry H <[email protected]>
Co-authored-by: marianadpereira <[email protected]>

* CIV-11523  Revoking access to claim for claimant LiP after NoC and representative assigned (#3834)

* CIV-11542 Bilingual claim creation (#3781)

* CIV-11542 Bilingual claim creation

* CIV-11542 Bilingual claim creation

* CIV-11542 Bilingual claim creation

* CIV-11542 Merge master fix

* CIV-11542 Merge master fix

---------

Co-authored-by: Pablo Ortiz <[email protected]>
Co-authored-by: hmcts-version1-pablo <[email protected]>

* CIV-11820 Part Admit Immediately Flow have incorrect states (#3690)

* CIV-11571 Fix court location if no specific court (#3569)

* CIV-11571: Add null checking

* CIV-11571: Add unit test

---------

Co-authored-by: jarekPierchala <[email protected]>

* CIV-8241 Manual Determination - Lip Notifications (#3529)

* added changes for claimant response cui event.

* CIV-8291 : Functional code - Need to refactor

* CIV-8291 : Refactor duplicated methods to a common service

* CIV-8291 : Handler Test

* CIV-8291 : Fix checkStyle

* CIV-8291 : Fix checkStyle

* CIV-8291 : Adding mocks

* CIV-8291 : Adding mocks

* CIV-8291 : Adding mocks

* CIV-8291 : Change final state to PROCEEDS_IN_HERITAGE_SYSTEM

* CIV-8291 : Dev comments

* CIV-8291 : Dev comments

* CIV-8291 : Dev comments

* CIV-8291 : Dev comments

* CIV-8241: Set Up Notification

* CIV-8241: Set Up Notification

* CIV-8241: Set Up Notification

* CIV-8241: Set Up Notification

* CIV-8241: Set Up Notification

* CIV-8241: Set Up Notification Test

* CIV-8241: Set Up Notification Test

* CIV-8241: Roll back one line

* CIV-8241: Change method name

* Update build.gradle

* Update build.gradle

---------

Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: sankhajuria <[email protected]>
Co-authored-by: hmcts-version1-pablo <[email protected]>
Co-authored-by: Pablo Ortiz <[email protected]>
Co-authored-by: Raja Mani <[email protected]>
Co-authored-by: jarekPierchala <[email protected]>

* CIV-10727 Assisted order uplift (#3550)

* CIV-11158 Save hearing location in case data
* Added setting assisted order courtLocation to hearingLocation or caseManagementLocation is hearingLocation is not defined
* Fixed not filtering courtLocations by caseTypeId
---------

Co-authored-by: sankaviv1 <[email protected]>
Co-authored-by: sankaviv1 <[email protected]>
Co-authored-by: GarethLancaster <[email protected]>
Co-authored-by: douglasrice <[email protected]>

* CIV-11695 - Update ClaimantResponseCuiCallbackHandler.java (#3616)

* Update ClaimantResponseCuiCallbackHandler.java

* fix for judicial referral

* fixed claim state issue and unit tests.

---------

Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: Pablo Ortiz <[email protected]>
Co-authored-by: annika-moorthy <[email protected]>

* CIV-8905 Claimant Dashboard Status "Mediation E2E, Manual Determination (org), ITP failed" (#3564)

* CIV-8905 Added functionality for dashboard status

* CIV-8905 Added functionality for dashboard status

* CIV-8905 Fixed AC 4

* CIV-11363 add trigger event (#3633)

* CIV-11363 add trigger event

* CIV-8905 Merged with bulk_tasks

---------

Co-authored-by: Pablo Ortiz <[email protected]>
Co-authored-by: MMNycz <[email protected]>

* CIV-8454 Trigger service request after CCD case creation (#3597)

* CIV-8454 Trigger service request after CCD case creation

* CIV-8454 Move Service Request creation to Camunda

* CIV-8454 Undo flow state change - not required

* CIV-8454 Remove empty lines

* CIV-8454 Add test for service request handler CUI

* CIV-8454 Only create service request when no help with fees

* CIV-8454 Change event name

* CIV-11144 updated witness summary to add date (#3623)

* updated witness summary to add date

* Update Jenkinsfile_CNP point at CCD

* Update Jenkinsfile_CNP

* CIV-11363 add caseId to caseIdForRetrigger.txt (#3646)

* CIV-11363 add caseId to caseIdForRetrigger.txt

* adding not suitable for sdo too

* update caseIdForRetriger

---------

Co-authored-by: Astha Malviya <[email protected]>

* testing master build (#3650)

Co-authored-by: sankhajuria <[email protected]>

---------

Co-authored-by: Raja Mani <[email protected]>
Co-authored-by: drummondjm <[email protected]>
Co-authored-by: MMNycz <[email protected]>
Co-authored-by: Astha Malviya <[email protected]>
Co-authored-by: asthamalviya <[email protected]>
Co-authored-by: sankhajuria <[email protected]>
Co-authored-by: jarekPierchala <[email protected]>

* CIV-11820 changes

* CIV-11820 cve suppresion

* CIV-11820 changes

* CIV-11820 changes

* CIV-11820 space removed

* CIV-11820 merge issue fixed

* CIV-11820 checkstyle issue fixed

* CIV-11820 checkstyle fix

---------

Co-authored-by: jarekPierchala <[email protected]>
Co-authored-by: kenneth-hmcts <[email protected]>
Co-authored-by: jarekPierchala <[email protected]>
Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: sankhajuria <[email protected]>
Co-authored-by: hmcts-version1-pablo <[email protected]>
Co-authored-by: Pablo Ortiz <[email protected]>
Co-authored-by: Raja Mani <[email protected]>
Co-authored-by: Gareth Lancaster <[email protected]>
Co-authored-by: sankaviv1 <[email protected]>
Co-authored-by: sankaviv1 <[email protected]>
Co-authored-by: GarethLancaster <[email protected]>
Co-authored-by: douglasrice <[email protected]>
Co-authored-by: jeswanth-hmcts <[email protected]>
Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: annika-moorthy <[email protected]>
Co-authored-by: marianadpereira <[email protected]>
Co-authored-by: Manish Garg <[email protected]>
Co-authored-by: MMNycz <[email protected]>
Co-authored-by: Paul Pearson <[email protected]>
Co-authored-by: drummondjm <[email protected]>
Co-authored-by: Astha Malviya <[email protected]>
Co-authored-by: asthamalviya <[email protected]>
Co-authored-by: Harry H <[email protected]>
Co-authored-by: marianadpereira <[email protected]>

* CIV-11213 Settlement Agreement Document (#3763)

* CIV-11213 changes

* CIV-11213 changes

* CIV-11213 rebase issue fixed

* CIV-11213 rebase issue fixed

* CIV-11213 updated settlement template

---------

Co-authored-by: jarekPierchala <[email protected]>

* Resolved compilation issue

* Resolved compilation issue

* Update build.gradle

* removed duplicated method and field

* fixed comma end of enums

---------

Co-authored-by: jarekPierchala <[email protected]>
Co-authored-by: jarekPierchala <[email protected]>
Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: sankhajuria <[email protected]>
Co-authored-by: hmcts-version1-pablo <[email protected]>
Co-authored-by: Pablo Ortiz <[email protected]>
Co-authored-by: Raja Mani <[email protected]>
Co-authored-by: Gareth Lancaster <[email protected]>
Co-authored-by: sankaviv1 <[email protected]>
Co-authored-by: sankaviv1 <[email protected]>
Co-authored-by: GarethLancaster <[email protected]>
Co-authored-by: douglasrice <[email protected]>
Co-authored-by: jeswanth-hmcts <[email protected]>
Co-authored-by: neeta-hmcts <[email protected]>
Co-authored-by: annika-moorthy <[email protected]>
Co-authored-by: marianadpereira <[email protected]>
Co-authored-by: Manish Garg <[email protected]>
Co-authored-by: MMNycz <[email protected]>
Co-authored-by: Paul Pearson <[email protected]>
Co-authored-by: drummondjm <[email protected]>
Co-authored-by: Astha Malviya <[email protected]>
Co-authored-by: asthamalviya <[email protected]>
Co-authored-by: Harry H <[email protected]>
Co-authored-by: marianadpereira <[email protected]>
Co-authored-by: jeswanth <[email protected]>
Co-authored-by: hmcts-version1-ignacio <[email protected]>
Co-authored-by: karthick mohanasundaram <[email protected]>
Co-authored-by: Madhan Mahadevan <[email protected]>
Co-authored-by: vasudevganesanhmcts <[email protected]>
Co-authored-by: Deepthi Doppalapudi <[email protected]>
Co-authored-by: Pijian Liao <[email protected]>
Co-authored-by: pliao-hmcts <[email protected]>
Co-authored-by: bhagyashreesharma90 <[email protected]>
Co-authored-by: krishnanuthalapati <[email protected]>
Co-authored-by: Azam <[email protected]>
Co-authored-by: UshaPanneerselvam1 <[email protected]>
Co-authored-by: mfallonhmcts <[email protected]>
Co-authored-by: zikrurR <[email protected]>
Co-authored-by: kdaHMCTS <[email protected]>
Co-authored-by: kalachandrasekar1 <[email protected]>
Co-authored-by: kalachandrasekar1 <[email protected]>
Co-authored-by: paul-pearson <[email protected]>
Co-authored-by: ElifDenizEsea <[email protected]>
  • Loading branch information
Show file tree
Hide file tree
Showing 49 changed files with 1,848 additions and 94 deletions.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,8 @@ configurations.all {
}

dependencies {
implementation 'com.github.hmcts:civil-commons:1.0.43'
implementation 'com.github.hmcts:civil-commons:1.0.44'

implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-actuator'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-aop'
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ public enum CaseEvent {
ASSIGN_CASE_TO_APPLICANT1(CAMUNDA),
TRIGGER_APPLICATION_CLOSURE(CAMUNDA),
APPLICATION_CLOSED_UPDATE_CLAIM(CAMUNDA),
APPLY_NOC_DECISION_LIP(CAMUNDA),
TRIGGER_APPLICATION_PROCEEDS_IN_HERITAGE(CAMUNDA),
APPLICATION_OFFLINE_UPDATE_CLAIM(CAMUNDA),
NOTIFY_APPLICANT_SOLICITOR1_BREATHING_SPACE_ENTER(CAMUNDA),
Expand Down Expand Up @@ -317,9 +318,11 @@ public enum CaseEvent {
SEND_HEARING_TO_LIP_CLAIMANT(CAMUNDA),
SEND_FINAL_ORDER_TO_LIP_DEFENDANT(CAMUNDA),
SEND_FINAL_ORDER_TO_LIP_CLAIMANT(CAMUNDA),
NOTIFY_CLAIMANT_LIP_HELP_WITH_FEES(CAMUNDA),
RETRIGGER_CASES(CAMUNDA),
GENERATE_LIP_CLAIMANT_MANUAL_DETERMINATION(CAMUNDA),
GENERATE_LIP_SIGN_SETTLEMENT_AGREEMENT_FORM(CAMUNDA),
NOTIFY_CLAIMANT_LIP_HELP_WITH_FEES(CAMUNDA);

RETRIGGER_CASES(CAMUNDA);
private final UserType userType;

public boolean isCamundaEvent() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
package uk.gov.hmcts.reform.civil.handler.callback.camunda.docmosis;

import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import uk.gov.hmcts.reform.ccd.client.model.AboutToStartOrSubmitCallbackResponse;
import uk.gov.hmcts.reform.ccd.client.model.CallbackResponse;
import uk.gov.hmcts.reform.civil.callback.CaseEvent;
import uk.gov.hmcts.reform.civil.callback.CallbackHandler;
import uk.gov.hmcts.reform.civil.callback.CallbackParams;
import uk.gov.hmcts.reform.civil.callback.Callback;
import uk.gov.hmcts.reform.civil.callback.CallbackType;
import uk.gov.hmcts.reform.civil.documentmanagement.model.CaseDocument;
import uk.gov.hmcts.reform.civil.model.CaseData;
import uk.gov.hmcts.reform.civil.service.SystemGeneratedDocumentService;
import uk.gov.hmcts.reform.civil.service.docmosis.manualdetermination.ClaimantLipManualDeterminationFormGenerator;

import java.util.Collections;
import java.util.List;
import java.util.Map;

import static uk.gov.hmcts.reform.civil.callback.CallbackParams.Params.BEARER_TOKEN;
import static uk.gov.hmcts.reform.civil.callback.CaseEvent.GENERATE_LIP_CLAIMANT_MANUAL_DETERMINATION;

@Service
@RequiredArgsConstructor
public class GenerateClaimantLipManualDeterminationCallBackHandler extends CallbackHandler {

private static final List<CaseEvent> EVENTS = Collections.singletonList(GENERATE_LIP_CLAIMANT_MANUAL_DETERMINATION);
private static final String TASK_ID = "Generate_LIP_Claimant_MD";
private final ObjectMapper objectMapper;
private final ClaimantLipManualDeterminationFormGenerator claimantLipManualDeterminationFormGenerator;
private final SystemGeneratedDocumentService systemGeneratedDocumentService;
private final Map<String, Callback> callbackMap = Map.of(callbackKey(CallbackType.ABOUT_TO_SUBMIT),
this::prepareClaimantLipManualDetermination);

@Override
public String camundaActivityId(CallbackParams callbackParams) {
return TASK_ID;
}

@Override
protected Map<String, Callback> callbacks() {
return callbackMap;
}

@Override
public List<CaseEvent> handledEvents() {
return EVENTS;
}

private CallbackResponse prepareClaimantLipManualDetermination(CallbackParams callbackParams) {
CaseData caseData = callbackParams.getCaseData();

if (!caseData.getRespondent1().isCompanyOROrganisation()) {
return AboutToStartOrSubmitCallbackResponse.builder().build();
}

CaseData.CaseDataBuilder<?, ?> caseDataBuilder = caseData.toBuilder();
CaseDocument claimantResponseForm = claimantLipManualDeterminationFormGenerator.generate(callbackParams.getCaseData(),
callbackParams.getParams().get(BEARER_TOKEN).toString());
caseDataBuilder.systemGeneratedCaseDocuments(systemGeneratedDocumentService
.getSystemGeneratedDocumentsWithAddedDocument(claimantResponseForm, caseData));
return AboutToStartOrSubmitCallbackResponse.builder().data(caseDataBuilder.build().toMap(objectMapper)).build();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
package uk.gov.hmcts.reform.civil.handler.callback.camunda.docmosis;

import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import uk.gov.hmcts.reform.ccd.client.model.AboutToStartOrSubmitCallbackResponse;
import uk.gov.hmcts.reform.ccd.client.model.CallbackResponse;
import uk.gov.hmcts.reform.civil.callback.Callback;
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.documentmanagement.model.CaseDocument;
import uk.gov.hmcts.reform.civil.model.CaseData;
import uk.gov.hmcts.reform.civil.service.SystemGeneratedDocumentService;
import uk.gov.hmcts.reform.civil.service.docmosis.settlementagreement.SettlementAgreementFormGenerator;

import java.util.Collections;
import java.util.List;
import java.util.Map;

import static uk.gov.hmcts.reform.civil.callback.CallbackParams.Params.BEARER_TOKEN;
import static uk.gov.hmcts.reform.civil.callback.CallbackType.ABOUT_TO_SUBMIT;
import static uk.gov.hmcts.reform.civil.callback.CaseEvent.GENERATE_LIP_SIGN_SETTLEMENT_AGREEMENT_FORM;

@Service
@RequiredArgsConstructor
public class GenerateSettlementAgreementFormCallbackHandler extends CallbackHandler {

private final SettlementAgreementFormGenerator settlementAgreementFormGenerator;
private final SystemGeneratedDocumentService systemGeneratedDocumentService;
private final ObjectMapper objectMapper;
private static final List<CaseEvent> EVENTS = Collections.singletonList(GENERATE_LIP_SIGN_SETTLEMENT_AGREEMENT_FORM);
private final Map<String, Callback> callbackMap = Map.of(callbackKey(ABOUT_TO_SUBMIT), this::generateResponseDocument);
private static final String TASK_ID = "GenerateSignSettlementAgreement";

private CallbackResponse generateResponseDocument(CallbackParams callbackParams) {
CaseData caseData = callbackParams.getCaseData();
CaseData.CaseDataBuilder<?, ?> updatedCaseDataBuilder = caseData.toBuilder();

if (caseData.isPayImmediately() || caseData.hasApplicantRejectedRepaymentPlan()) {
return AboutToStartOrSubmitCallbackResponse.builder().build();
}

CaseDocument claimantResponseForm = settlementAgreementFormGenerator.generate(
caseData,
callbackParams.getParams().get(BEARER_TOKEN).toString()
);
updatedCaseDataBuilder.systemGeneratedCaseDocuments(systemGeneratedDocumentService.getSystemGeneratedDocumentsWithAddedDocument(
claimantResponseForm,
caseData
));

return AboutToStartOrSubmitCallbackResponse.builder()
.data(updatedCaseDataBuilder.build().toMap(objectMapper))
.build();
}

@Override
protected Map<String, Callback> callbacks() {
return callbackMap;
}

@Override
public List<CaseEvent> handledEvents() {
return EVENTS;
}

@Override
public String camundaActivityId(CallbackParams callbackParams) {
return TASK_ID;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ private CallbackResponse updateCaseDetails(CallbackParams callbackParams) {
boolean isApplicantSolicitorRole = isApplicantOrRespondent(replacedSolicitorCaseRole);

if (isApplicantSolicitorRole) {
unAssignCaseFromClaimantLip(caseDataBuilder);
updateApplicantSolicitorDetails(caseDataBuilder, addedSolicitorDetails);
} else {
unassignCaseFromDefendantLip(caseData);
Expand Down Expand Up @@ -133,6 +134,19 @@ private void unassignCaseFromDefendantLip(CaseData caseData) {
}
}

private void unAssignCaseFromClaimantLip(CaseData.CaseDataBuilder<?, ?> caseDataBuilder) {
CaseData caseData = caseDataBuilder.build();
if (caseData.isApplicantLiP() && caseData.getClaimantUserDetails() != null) {
coreCaseUserService.unassignCase(
caseData.getCcdCaseReference().toString(),
caseData.getClaimantUserDetails().getId(),
null,
CaseRole.CLAIMANT
);
caseDataBuilder.applicant1Represented(YES);
}
}

private void clearLRIndividuals(String replacedSolicitorCaseRole, CaseData caseData,
CaseData.CaseDataBuilder<?, ?> caseDataBuilder, CaseData oldCaseData) {
if (CaseRole.APPLICANTSOLICITORONE.getFormattedName().equals(replacedSolicitorCaseRole)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,21 @@
import uk.gov.hmcts.reform.civil.model.noc.ChangeOrganisationRequest;
import uk.gov.hmcts.reform.civil.cas.model.DecisionRequest;

import java.util.Collections;
import java.util.List;
import java.util.Map;

import static uk.gov.hmcts.reform.civil.callback.CallbackParams.Params.BEARER_TOKEN;
import static uk.gov.hmcts.reform.civil.callback.CallbackType.ABOUT_TO_SUBMIT;
import static uk.gov.hmcts.reform.civil.callback.CallbackType.SUBMITTED;
import static uk.gov.hmcts.reform.civil.callback.CaseEvent.APPLY_NOC_DECISION;
import static uk.gov.hmcts.reform.civil.callback.CaseEvent.APPLY_NOC_DECISION_LIP;

@Service
@RequiredArgsConstructor
public class ApplyNoticeOfChangeDecisionCallbackHandler extends CallbackHandler {

private static final List<CaseEvent> EVENTS = Collections.singletonList(APPLY_NOC_DECISION);
private static final List<CaseEvent> EVENTS =
List.of(APPLY_NOC_DECISION, APPLY_NOC_DECISION_LIP);

private final AuthTokenGenerator authTokenGenerator;
private final CaseAssignmentApi caseAssignmentApi;
Expand Down Expand Up @@ -78,9 +79,9 @@ private CallbackResponse applyNoticeOfChangeDecision(CallbackParams callbackPara
);

updatedCaseDataBuilder
.businessProcess(BusinessProcess.ready(APPLY_NOC_DECISION))
.businessProcess(BusinessProcess.ready(getBussinessProcessEvent(postDecisionCaseData)))
.changeOfRepresentation(getChangeOfRepresentation(
callbackParams.getCaseData().getChangeOrganisationRequestField(), postDecisionCaseData));
callbackParams.getCaseData().getChangeOrganisationRequestField(), postDecisionCaseData));

return AboutToStartOrSubmitCallbackResponse.builder()
.data(updatedCaseDataBuilder.build().toMap(objectMapper)).build();
Expand Down Expand Up @@ -203,7 +204,8 @@ private void setAddLegalRepDeadlinesToNull(CaseData.CaseDataBuilder<?, ?> update
}

private String getFormerEmail(String caseRole, CaseData caseData) {
if (caseRole.equals(CaseRole.APPLICANTSOLICITORONE.getFormattedName())) {
if (caseRole.equals(CaseRole.APPLICANTSOLICITORONE.getFormattedName())
&& caseData.getApplicantSolicitor1UserDetails() != null) {
return caseData.getApplicantSolicitor1UserDetails().getEmail();
} else if (caseRole.equals(CaseRole.RESPONDENTSOLICITORONE.getFormattedName())) {
return caseData.getRespondentSolicitor1EmailAddress();
Expand All @@ -217,6 +219,13 @@ private boolean isApplicant(String caseRole) {
return caseRole.equals(CaseRole.APPLICANTSOLICITORONE.getFormattedName());
}

private CaseEvent getBussinessProcessEvent(CaseData postDecisionCaseData) {
if (postDecisionCaseData.isApplicantLiP()) {
return APPLY_NOC_DECISION_LIP;
}
return APPLY_NOC_DECISION;
}

@Override
public List<CaseEvent> handledEvents() {
return EVENTS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import uk.gov.hmcts.reform.civil.model.BusinessProcess;
import uk.gov.hmcts.reform.civil.model.CCJPaymentDetails;
import uk.gov.hmcts.reform.civil.model.citizenui.ClaimantLiPResponse;
import uk.gov.hmcts.reform.civil.service.DeadlinesCalculator;
import uk.gov.hmcts.reform.civil.service.FeatureToggleService;
import uk.gov.hmcts.reform.civil.service.JudgementService;
import uk.gov.hmcts.reform.civil.model.CaseData;
Expand Down Expand Up @@ -49,6 +50,7 @@ public class ClaimantResponseCuiCallbackHandler extends CallbackHandler {
private final ObjectMapper objectMapper;
private final Time time;
private final UpdateCaseManagementDetailsService updateCaseManagementLocationDetailsService;
private final DeadlinesCalculator deadlinesCalculator;

@Override
protected Map<String, Callback> callbacks() {
Expand Down Expand Up @@ -76,10 +78,12 @@ private CallbackResponse populateCaseData(CallbackParams callbackParams) {

private CallbackResponse aboutToSubmit(CallbackParams callbackParams) {
CaseData caseData = callbackParams.getCaseData();
LocalDateTime applicant1ResponseDate = LocalDateTime.now();

CaseData.CaseDataBuilder<?, ?> builder = caseData.toBuilder()
.applicant1ResponseDate(LocalDateTime.now())
.businessProcess(BusinessProcess.ready(CLAIMANT_RESPONSE_CUI));
.applicant1ResponseDate(applicant1ResponseDate)
.businessProcess(BusinessProcess.ready(CLAIMANT_RESPONSE_CUI))
.respondent1RespondToSettlementAgreementDeadline(getRespondToSettlementAgreementDeadline(caseData, applicant1ResponseDate));

updateCaseManagementLocationDetailsService.updateCaseManagementDetails(builder, callbackParams);

Expand All @@ -93,23 +97,14 @@ private CallbackResponse aboutToSubmit(CallbackParams callbackParams) {
AboutToStartOrSubmitCallbackResponse.builder()
.data(updatedData.toMap(objectMapper));

updateClaimStateJudicialReferral(response, updatedData);
updateClaimEndState(response, updatedData);

return response.build();
}

private void updateClaimStateJudicialReferral(
AboutToStartOrSubmitCallbackResponse.AboutToStartOrSubmitCallbackResponseBuilder response,
CaseData caseData) {
if (isJudicialReferralAllowed(caseData)) {
response.state(CaseState.JUDICIAL_REFERRAL.name());
}
}

private boolean isJudicialReferralAllowed(CaseData caseData) {
return (caseData.isClaimantNotSettlePartAdmitClaim() || caseData.isFullDefence())
&& (Objects.nonNull(caseData.getCaseDataLiP()) && caseData.getCaseDataLiP().hasClaimantNotAgreedToFreeMediation());
private LocalDateTime getRespondToSettlementAgreementDeadline(CaseData caseData, LocalDateTime responseDate) {
return caseData.hasApplicant1SignedSettlementAgreement()
? deadlinesCalculator.getRespondToSettlementAgreementDeadline(responseDate) : null;
}

private boolean isProceedsInHeritageSystemAllowed(CaseData caseData) {
Expand All @@ -134,20 +129,30 @@ private boolean isProceedsInHeritageSystemAllowed(CaseData caseData) {
|| isCourtDecisionRejected;
}

private void updateClaimEndState(AboutToStartOrSubmitCallbackResponse.AboutToStartOrSubmitCallbackResponseBuilder response, CaseData updatedData) {
if (updatedData.hasDefendantAgreedToFreeMediation() && updatedData.hasClaimantAgreedToFreeMediation()) {
response.state(CaseState.IN_MEDIATION.name());
private String setUpCaseState(AboutToStartOrSubmitCallbackResponse.AboutToStartOrSubmitCallbackResponseBuilder response, CaseData updatedData) {
if (isJudicialReferralAllowed(updatedData)) {
return CaseState.JUDICIAL_REFERRAL.name();
} else if (updatedData.hasDefendantAgreedToFreeMediation() && updatedData.hasClaimantAgreedToFreeMediation()) {
return CaseState.IN_MEDIATION.name();
} else if (updatedData.hasApplicant1SignedSettlementAgreement() && updatedData.hasApplicantAcceptedRepaymentPlan()) {
response.state(CaseState.All_FINAL_ORDERS_ISSUED.name());
} else if (Objects.nonNull(updatedData.getApplicant1PartAdmitIntentionToSettleClaimSpec()) && updatedData.isClaimantIntentionSettlePartAdmit()) {
response.state(CaseState.CASE_SETTLED.name());
return CaseState.All_FINAL_ORDERS_ISSUED.name();
} else if (isCaseSettledAllowed(updatedData)) {
return CaseState.CASE_SETTLED.name();
} else if (updatedData.hasApplicantNotProceededWithClaim()) {
response.state(CaseState.CASE_DISMISSED.name());
return CaseState.CASE_DISMISSED.name();
} else if (isProceedsInHeritageSystemAllowed(updatedData)) {
response.state(CaseState.PROCEEDS_IN_HERITAGE_SYSTEM.name());
return CaseState.PROCEEDS_IN_HERITAGE_SYSTEM.name();
} else {
return response.build().getState();
}
}

private boolean isCaseSettledAllowed(CaseData caseData) {
return ((Objects.nonNull(caseData.getApplicant1PartAdmitIntentionToSettleClaimSpec())
&& caseData.isClaimantIntentionSettlePartAdmit())
|| (caseData.isPartAdmitImmediatePaymentClaimSettled()));
}

private void updateCcjRequestPaymentDetails(CaseData.CaseDataBuilder<?, ?> builder, CaseData caseData) {
if (hasCcjRequest(caseData)) {
CCJPaymentDetails ccjPaymentDetails = judgementService.buildJudgmentAmountSummaryDetails(caseData);
Expand All @@ -159,4 +164,23 @@ private boolean hasCcjRequest(CaseData caseData) {
return (caseData.isLipvLipOneVOne() && featureToggleService.isLipVLipEnabled()
&& caseData.hasApplicant1AcceptedCcj() && caseData.isCcjRequestJudgmentByAdmission());
}

private boolean isJudicialReferralAllowed(CaseData caseData) {
return isProceedOrNotSettleClaim(caseData)
&& (isClaimantOrDefendantRejectMediation(caseData)
|| caseData.isFastTrackClaim());
}

private boolean isProceedOrNotSettleClaim(CaseData caseData) {
return caseData.isClaimantNotSettlePartAdmitClaim() || caseData.isFullDefence() || caseData.isFullDefenceNotPaid();
}

private boolean isClaimantOrDefendantRejectMediation(CaseData caseData) {
return (Objects.nonNull(caseData.getCaseDataLiP()) && caseData.getCaseDataLiP().hasClaimantNotAgreedToFreeMediation())
|| caseData.hasDefendantNotAgreedToFreeMediation();
}

private void updateClaimEndState(AboutToStartOrSubmitCallbackResponse.AboutToStartOrSubmitCallbackResponseBuilder response, CaseData updatedData) {
response.state(setUpCaseState(response, updatedData));
}
}
Loading

0 comments on commit f32a9d9

Please sign in to comment.