Skip to content

Commit

Permalink
PI-2174 Recalculate RAR count for inactive requirements (#3737)
Browse files Browse the repository at this point in the history
Previously, when session feedback was received for an appointment linked to a terminated requirement, then the RAR count would not be re-calculated. However, session feedback can still be recorded after the termination, and we should still update the RAR count in this case.
  • Loading branch information
marcus-bcl authored May 13, 2024
1 parent 8512188 commit 3fc89b6
Show file tree
Hide file tree
Showing 11 changed files with 1,323 additions and 353 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ interface RequirementRepository : JpaRepository<Requirement, Long> {
where r.personId = :personId
and r.disposalId = :disposalId
and r.mainCategory.code = :type
and r.active = true
"""
)
fun findForPersonAndEvent(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
package uk.gov.justice.digital.hmpps.integrations.delius.referral.entity

import jakarta.persistence.Column
import jakarta.persistence.Entity
import jakarta.persistence.Id
import jakarta.persistence.JoinColumn
import jakarta.persistence.ManyToOne
import jakarta.persistence.Table
import jakarta.persistence.*
import org.hibernate.annotations.Immutable
import org.hibernate.annotations.SQLRestriction

@Immutable
@Entity
@Table(name = "rqmnt")
@SQLRestriction("soft_deleted = 0 and active_flag = 1")
@SQLRestriction("soft_deleted = 0")
class Requirement(

@Column(name = "offender_id")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ delius: Delius {
}

d_update_contact: Update\nAppointment Contact

d_update_nsi: Recalculate\nRAR Count
}

refer_and_monitor -> delius
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3fc89b6

Please sign in to comment.