Skip to content

Commit

Permalink
Remove staffIdentifier from ap-and-delius API
Browse files Browse the repository at this point in the history
This commit removes staffIdentifier from the ap-and-delius API and updates the domain events to no longer expect a value for this field (which wasn’t being used anyway)
  • Loading branch information
davidatkinsuk committed Dec 4, 2024
1 parent 4b273ef commit c30a6e0
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ object EventDetailsGenerator {
private fun staffMember(staff: Staff, username: String? = null) = StaffMember(
username = username,
staffCode = staff.code,
staffIdentifier = staff.id,
forenames = staff.forename,
surname = staff.surname
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ object StaffMemberGenerator {

fun generate(
staffCode: String = "N54A001",
staffIdentifier: Long = 1501234567,
forenames: String = "John",
surname: String = "Smith",
username: String? = null
) = StaffMember(
staffCode = staffCode,
staffIdentifier = staffIdentifier,
forenames = forenames,
surname = surname,
username = username
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ class StaffControllerIntegrationTest {
assertThat(res.code, equalTo(StaffGenerator.DEFAULT_STAFF.code))
assertThat(res.email, equalTo("[email protected]"))
assertThat(res.telephoneNumber, equalTo("07321165373"))
assertThat(res.staffIdentifier, equalTo(StaffGenerator.DEFAULT_STAFF.id))
assertThat(res.teams[0].borough?.code, equalTo(StaffGenerator.DEFAULT_STAFF.teams[0].district.borough.code))
assertThat(
res.teams[0].borough?.description,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package uk.gov.justice.digital.hmpps.integrations.approvedpremises

data class StaffMember(
val staffCode: String,
val staffIdentifier: Long,
val forenames: String,
val surname: String,
val username: String?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ data class ProbationArea(
data class StaffDetail(
val email: String?,
val telephoneNumber: String?,
val staffIdentifier: Long,
val teams: List<Team> = emptyList(),
val probationArea: ProbationArea,
val username: String?,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ class StaffService(
code = probationArea.code,
description = probationArea.description
),
active = isActive(),
staffIdentifier = id
active = isActive()
)
}

0 comments on commit c30a6e0

Please sign in to comment.