From 6622a9ffb94f574ae0138277b56ea6e2c4a6d371 Mon Sep 17 00:00:00 2001 From: Stian Grenborgen Date: Wed, 27 Sep 2023 13:44:55 +0200 Subject: [PATCH 1/3] =?UTF-8?q?Legger=20til=20standardquery=20for=20oppgav?= =?UTF-8?q?ek=C3=B8er.=20(#1696)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Legger til standardquery for oppgavekøer. --- .../ko/db/OppgaveKoRepository.kt | 12 ++++++++-- src/main/resources/los/standard-ko.json | 22 +++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/los/standard-ko.json diff --git a/src/main/kotlin/no/nav/k9/los/nyoppgavestyring/ko/db/OppgaveKoRepository.kt b/src/main/kotlin/no/nav/k9/los/nyoppgavestyring/ko/db/OppgaveKoRepository.kt index cb5e6fd67..1d13acc8e 100644 --- a/src/main/kotlin/no/nav/k9/los/nyoppgavestyring/ko/db/OppgaveKoRepository.kt +++ b/src/main/kotlin/no/nav/k9/los/nyoppgavestyring/ko/db/OppgaveKoRepository.kt @@ -15,6 +15,15 @@ import javax.sql.DataSource class OppgaveKoRepository(val datasource: DataSource) { + private val standardOppgaveString: String by lazy { + val objectMapper = jacksonObjectMapper() + val standardOppgaveQuery = objectMapper.readValue( + OppgaveKoRepository::class.java.getResource("/los/standard-ko.json")!!.readText(), + OppgaveQuery::class.java + ) + objectMapper.writeValueAsString(standardOppgaveQuery) + } + fun hentListe(): OppgaveKoListeDto { return using(sessionOf(datasource)) { it -> it.transaction { tx -> hentListe(tx) } @@ -72,7 +81,6 @@ class OppgaveKoRepository(val datasource: DataSource) { } fun leggTil(tx: TransactionalSession, tittel: String): OppgaveKo { - val objectMapper = jacksonObjectMapper() val oppgaveKoId = tx.run( queryOf( """ @@ -80,7 +88,7 @@ class OppgaveKoRepository(val datasource: DataSource) { VALUES (0, :tittel, '', :query, false, :endret_tidspunkt) RETURNING ID""", mapOf( "tittel" to tittel, - "query" to objectMapper.writeValueAsString(OppgaveQuery()), + "query" to standardOppgaveString, "endret_tidspunkt" to LocalDateTime.now() ) ).map{row -> row.long(1)}.asSingle diff --git a/src/main/resources/los/standard-ko.json b/src/main/resources/los/standard-ko.json new file mode 100644 index 000000000..f05e17a91 --- /dev/null +++ b/src/main/resources/los/standard-ko.json @@ -0,0 +1,22 @@ +{ + "filtere": [ + { + "type": "feltverdi", + "område": null, + "kode": "oppgavestatus", + "operator": "IN", + "verdi": [ + "AAPEN" + ] + } + ], + "select": [], + "order": [ + { + "type": "enkel", + "område": "K9", + "kode": "mottattDato", + "økende": true + } + ] +} \ No newline at end of file From 1d9516c9403525b9872165a0f70918a7b4563842 Mon Sep 17 00:00:00 2001 From: Stian Grenborgen Date: Wed, 27 Sep 2023 15:07:29 +0200 Subject: [PATCH 2/3] =?UTF-8?q?Endrer=20standardverdi=20p=C3=A5=20limit=20?= =?UTF-8?q?til=20ubegrenset.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nav/k9/los/nyoppgavestyring/query/dto/query/OppgaveQuery.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/no/nav/k9/los/nyoppgavestyring/query/dto/query/OppgaveQuery.kt b/src/main/kotlin/no/nav/k9/los/nyoppgavestyring/query/dto/query/OppgaveQuery.kt index 718cb43f4..f29de5e0f 100644 --- a/src/main/kotlin/no/nav/k9/los/nyoppgavestyring/query/dto/query/OppgaveQuery.kt +++ b/src/main/kotlin/no/nav/k9/los/nyoppgavestyring/query/dto/query/OppgaveQuery.kt @@ -7,7 +7,7 @@ class OppgaveQuery( val filtere: List, val select: List = listOf(), val order: List = listOf(), - val limit: Int = 10 + val limit: Int = -1 ) { constructor() : this(listOf(), listOf(), listOf(), 10); From 253e6f461b8dbc38b63d8c804ca1c5bfe56da78e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 10:51:48 +0200 Subject: [PATCH 3/3] Bump dusseldorfKtorVersion from 4.0.8 to 4.0.10 (#1681) Bumps `dusseldorfKtorVersion` from 4.0.8 to 4.0.10. Updates `no.nav.helse:dusseldorf-ktor-core` from 4.0.8 to 4.0.10 - [Release notes](https://github.com/navikt/dusseldorf-ktor/releases) - [Commits](https://github.com/navikt/dusseldorf-ktor/compare/4.0.8...4.0.10) Updates `no.nav.helse:dusseldorf-ktor-jackson` from 4.0.8 to 4.0.10 - [Release notes](https://github.com/navikt/dusseldorf-ktor/releases) - [Commits](https://github.com/navikt/dusseldorf-ktor/compare/4.0.8...4.0.10) Updates `no.nav.helse:dusseldorf-ktor-metrics` from 4.0.8 to 4.0.10 - [Release notes](https://github.com/navikt/dusseldorf-ktor/releases) - [Commits](https://github.com/navikt/dusseldorf-ktor/compare/4.0.8...4.0.10) Updates `no.nav.helse:dusseldorf-ktor-health` from 4.0.8 to 4.0.10 - [Release notes](https://github.com/navikt/dusseldorf-ktor/releases) - [Commits](https://github.com/navikt/dusseldorf-ktor/compare/4.0.8...4.0.10) Updates `no.nav.helse:dusseldorf-ktor-auth` from 4.0.8 to 4.0.10 - [Release notes](https://github.com/navikt/dusseldorf-ktor/releases) - [Commits](https://github.com/navikt/dusseldorf-ktor/compare/4.0.8...4.0.10) Updates `no.nav.helse:dusseldorf-ktor-client` from 4.0.8 to 4.0.10 - [Release notes](https://github.com/navikt/dusseldorf-ktor/releases) - [Commits](https://github.com/navikt/dusseldorf-ktor/compare/4.0.8...4.0.10) Updates `no.nav.helse:dusseldorf-oauth2-client` from 4.0.8 to 4.0.10 - [Release notes](https://github.com/navikt/dusseldorf-ktor/releases) - [Commits](https://github.com/navikt/dusseldorf-ktor/compare/4.0.8...4.0.10) Updates `no.nav.helse:dusseldorf-test-support` from 4.0.8 to 4.0.10 - [Release notes](https://github.com/navikt/dusseldorf-ktor/releases) - [Commits](https://github.com/navikt/dusseldorf-ktor/compare/4.0.8...4.0.10) --- updated-dependencies: - dependency-name: no.nav.helse:dusseldorf-ktor-core dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: no.nav.helse:dusseldorf-ktor-jackson dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: no.nav.helse:dusseldorf-ktor-metrics dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: no.nav.helse:dusseldorf-ktor-health dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: no.nav.helse:dusseldorf-ktor-auth dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: no.nav.helse:dusseldorf-ktor-client dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: no.nav.helse:dusseldorf-oauth2-client dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: no.nav.helse:dusseldorf-test-support dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index dfbefd60b..e2c2a2630 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -12,7 +12,7 @@ val k9KlageVersion = "0.4.0" val fuelVersion = "2.3.1" val jacksonVersion = "2.15.2" -val dusseldorfKtorVersion = "4.0.8" +val dusseldorfKtorVersion = "4.0.10" val ktorVersion = "2.3.4" val kafkaVersion = "3.5.1"