Skip to content

Commit 77d3250

Browse files
committed
Include TRY when searching for MED in oppgave.
1 parent 0a6b121 commit 77d3250

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/main/kotlin/no/nav/klage/oppgave/clients/gosysoppgave/GosysOppgaveClient.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,15 @@ class GosysOppgaveClient(
117117

118118
fun fetchGosysOppgaveForAktoerIdAndTema(
119119
aktoerId: String,
120-
tema: Tema?
120+
temaList: List<Tema>?
121121
): List<GosysOppgaveRecord> {
122122
val oppgaveResponse =
123123
logTimingAndWebClientResponseException(GosysOppgaveClient::fetchGosysOppgaveForAktoerIdAndTema.name) {
124124
gosysOppgaveWebClient.get()
125125
.uri { uriBuilder ->
126126
uriBuilder.pathSegment("oppgaver")
127127
uriBuilder.queryParam("aktoerId", aktoerId)
128-
tema?.let { uriBuilder.queryParam("tema", it.navn) }
128+
temaList?.let { uriBuilder.queryParam("tema", temaList.map { it.navn }) }
129129
uriBuilder.queryParam("limit", 1000)
130130
uriBuilder.queryParam("offset", 0)
131131
uriBuilder.build()

src/main/kotlin/no/nav/klage/oppgave/service/GosysOppgaveService.kt

+10-1
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,18 @@ class GosysOppgaveService(
295295
fun getGosysOppgaveList(fnr: String, tema: Tema?): List<GosysOppgaveView> {
296296
val aktoerId = pdlFacade.getAktorIdFromIdent(ident = fnr)
297297

298+
val temaList = if (tema != null) {
299+
if (tema == Tema.MED) {
300+
//Legger til TRY når vi søker på MED.
301+
listOf(tema, Tema.TRY)
302+
} else {
303+
listOf(tema)
304+
}
305+
} else null
306+
298307
val gosysOppgaveList = gosysOppgaveClient.fetchGosysOppgaveForAktoerIdAndTema(
299308
aktoerId = aktoerId,
300-
tema = tema,
309+
temaList = temaList,
301310
)
302311

303312
return gosysOppgaveList.map { it.toGosysOppgaveView(systemContext = false) }

0 commit comments

Comments
 (0)