Skip to content

Commit caea446

Browse files
APS-1642 - Remove staffIdentifier from ap-and-delius API (#4479)
Remove staffIdentifier from ap-and-delius API 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)
1 parent 4b273ef commit caea446

File tree

6 files changed

+1
-8
lines changed

6 files changed

+1
-8
lines changed

projects/approved-premises-and-delius/src/dev/kotlin/uk/gov/justice/digital/hmpps/data/generator/EventDetailsGenerator.kt

-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ object EventDetailsGenerator {
9898
private fun staffMember(staff: Staff, username: String? = null) = StaffMember(
9999
username = username,
100100
staffCode = staff.code,
101-
staffIdentifier = staff.id,
102101
forenames = staff.forename,
103102
surname = staff.surname
104103
)

projects/approved-premises-and-delius/src/dev/kotlin/uk/gov/justice/digital/hmpps/data/generator/StaffMemberGenerator.kt

-2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ object StaffMemberGenerator {
77

88
fun generate(
99
staffCode: String = "N54A001",
10-
staffIdentifier: Long = 1501234567,
1110
forenames: String = "John",
1211
surname: String = "Smith",
1312
username: String? = null
1413
) = StaffMember(
1514
staffCode = staffCode,
16-
staffIdentifier = staffIdentifier,
1715
forenames = forenames,
1816
surname = surname,
1917
username = username

projects/approved-premises-and-delius/src/integrationTest/kotlin/uk/gov/justice/digital/hmpps/StaffControllerIntegrationTest.kt

-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ class StaffControllerIntegrationTest {
8585
assertThat(res.code, equalTo(StaffGenerator.DEFAULT_STAFF.code))
8686
assertThat(res.email, equalTo("[email protected]"))
8787
assertThat(res.telephoneNumber, equalTo("07321165373"))
88-
assertThat(res.staffIdentifier, equalTo(StaffGenerator.DEFAULT_STAFF.id))
8988
assertThat(res.teams[0].borough?.code, equalTo(StaffGenerator.DEFAULT_STAFF.teams[0].district.borough.code))
9089
assertThat(
9190
res.teams[0].borough?.description,

projects/approved-premises-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/approvedpremises/StaffMember.kt

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package uk.gov.justice.digital.hmpps.integrations.approvedpremises
22

33
data class StaffMember(
44
val staffCode: String,
5-
val staffIdentifier: Long,
65
val forenames: String,
76
val surname: String,
87
val username: String?

projects/approved-premises-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/model/StaffResponse.kt

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ data class ProbationArea(
2626
data class StaffDetail(
2727
val email: String?,
2828
val telephoneNumber: String?,
29-
val staffIdentifier: Long,
3029
val teams: List<Team> = emptyList(),
3130
val probationArea: ProbationArea,
3231
val username: String?,

projects/approved-premises-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/StaffService.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ class StaffService(
7777
code = probationArea.code,
7878
description = probationArea.description
7979
),
80-
active = isActive(),
81-
staffIdentifier = id
80+
active = isActive()
8281
)
8382
}

0 commit comments

Comments
 (0)