Skip to content

Commit

Permalink
IS-2596: Delete oppgave no longer in use (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
andersrognstad authored Aug 28, 2024
1 parent f0205f3 commit 9755a95
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@ fun PersonOppgave.toHendelseType(): PersonoppgavehendelseType {
if (isUBehandlet()) PersonoppgavehendelseType.BEHANDLERDIALOG_MELDING_AVVIST_MOTTATT
else PersonoppgavehendelseType.BEHANDLERDIALOG_MELDING_AVVIST_BEHANDLET
}
PersonOppgaveType.AKTIVITETSKRAV_VURDER_STANS -> {
if (isUBehandlet()) PersonoppgavehendelseType.AKTIVITETSKRAV_VURDER_STANS_MOTTATT
else PersonoppgavehendelseType.AKTIVITETSKRAV_VURDER_STANS_BEHANDLET
}
PersonOppgaveType.BEHANDLER_BER_OM_BISTAND -> {
if (isUBehandlet()) PersonoppgavehendelseType.BEHANDLER_BER_OM_BISTAND_MOTTATT
else PersonoppgavehendelseType.BEHANDLER_BER_OM_BISTAND_BEHANDLET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ enum class PersonOppgaveType {
BEHANDLERDIALOG_SVAR,
BEHANDLERDIALOG_MELDING_UBESVART,
BEHANDLERDIALOG_MELDING_AVVIST,
AKTIVITETSKRAV_VURDER_STANS,
BEHANDLER_BER_OM_BISTAND,
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ enum class PersonoppgavehendelseType {
BEHANDLERDIALOG_MELDING_UBESVART_BEHANDLET,
BEHANDLERDIALOG_MELDING_AVVIST_MOTTATT,
BEHANDLERDIALOG_MELDING_AVVIST_BEHANDLET,
AKTIVITETSKRAV_VURDER_STANS_MOTTATT,
AKTIVITETSKRAV_VURDER_STANS_BEHANDLET,
BEHANDLER_BER_OM_BISTAND_MOTTATT,
BEHANDLER_BER_OM_BISTAND_BEHANDLET,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DELETE FROM person_oppgave where type = 'AKTIVITETSKRAV_VURDER_STANS';
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class PublishOppgavehendelseCronjobSpek : Spek({

val unpublishedUbehandletPersonoppgave = generatePersonoppgave(
personIdent = UserConstants.ARBEIDSTAKER_FNR,
type = PersonOppgaveType.AKTIVITETSKRAV_VURDER_STANS,
type = PersonOppgaveType.BEHANDLER_BER_OM_BISTAND,
publish = true,
)

Expand Down Expand Up @@ -94,7 +94,7 @@ class PublishOppgavehendelseCronjobSpek : Spek({

val kafkaPersonoppgavehendelse1 = kafkaRecordSlot1.captured.value()
kafkaPersonoppgavehendelse1.personident shouldBeEqualTo unpublishedUbehandletPersonoppgave.personIdent.value
kafkaPersonoppgavehendelse1.hendelsetype shouldBeEqualTo PersonoppgavehendelseType.AKTIVITETSKRAV_VURDER_STANS_MOTTATT.name
kafkaPersonoppgavehendelse1.hendelsetype shouldBeEqualTo PersonoppgavehendelseType.BEHANDLER_BER_OM_BISTAND_MOTTATT.name

val kafkaPersonoppgavehendelse2 = kafkaRecordSlot2.captured.value()
kafkaPersonoppgavehendelse2.personident shouldBeEqualTo unpublishedUbehandletPersonoppgave.personIdent.value
Expand Down Expand Up @@ -130,7 +130,7 @@ class PublishOppgavehendelseCronjobSpek : Spek({

val kafkaPersonoppgavehendelse = kafkaRecordSlot.captured.value()
kafkaPersonoppgavehendelse.personident shouldBeEqualTo unpublishedUbehandletPersonoppgave.personIdent.value
kafkaPersonoppgavehendelse.hendelsetype shouldBeEqualTo PersonoppgavehendelseType.AKTIVITETSKRAV_VURDER_STANS_BEHANDLET.name
kafkaPersonoppgavehendelse.hendelsetype shouldBeEqualTo PersonoppgavehendelseType.BEHANDLER_BER_OM_BISTAND_BEHANDLET.name
}

it("Will not publish already published oppgave") {
Expand Down

0 comments on commit 9755a95

Please sign in to comment.