Skip to content

Commit

Permalink
More OData, more fun (#190)
Browse files Browse the repository at this point in the history
* ARKIV-318 Graveløyver til deg, Stein Helge & co. Kos dere.

* ARKIV-318 Alle skal få <3
  • Loading branch information
nilsodd authored Oct 10, 2024
1 parent a8c94c7 commit 9c1d788
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ jobs:
- cluster: aks-beta-fint-2021-11-23
deploy-every-branch: true

- cluster: aks-api-fint-2022-02-08
org: bfk-no
deploy-every-branch: true


steps:
- uses: actions/checkout@v4

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,15 @@ get cases based on a OData filter, not only `mappeid`, `systemid` and `soknadsnu
The old filter (query param `title`) is now deprecated, use `$filter=tittel eq 'Tittel'` instead!
FYI: The title filter is by nature a contains so you don't need a complete title.

We support `saksaar`, `sakssekvensnummer`, `arkivdel`, `administrativenhet`, `tilgangskode`, `saksmappetype`,
We support `saksaar`, `sakssekvensnummer`, `saksdato`, `oppdatert`, `arkivdel`, `administrativenhet`, `tilgangskode`, `saksmappetype`,
`tittel`, `mappeid`, `systemid` and primary and secundary `klassifikasjon`.

### Examples
- `$filter=saksaar eq '2023'`
- `$filter=saksaar eq '2023' and sakssekvensnummer eq '42'`
- `$filter=sakssekvensnummer eq '42'`
- `$filter=saksdato eq '31-12-1999'`
- `$filter=oppdatert eq '29-02-2024'` (last record date)
- `$filter=arkivdel eq 'Drosje'`
- `$filter=administrativenhet eq '1337'`
- `$filter=tilgangskode eq 'UO'`
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/no/fint/sikri/service/CaseService.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ public CaseService(SikriObjectModelService objectModelService, ExternalSystemLin
odataFilterFieldMapper = new ImmutableMap.Builder<String, String>()
.put("saksaar", "CaseYear")
.put("sakssekvensnummer", "SequenceNumber")
.put("saksdato", "CaseDate")
.put("oppdatert", "LastRecordDate")
.put("arkivdel", "SeriesId")
.put("administrativenhet", "AdministrativeUnitId")
.put("tilgangskode", "AccessCodeId")
Expand Down
2 changes: 2 additions & 0 deletions src/test/groovy/no/fint/sikri/service/CaseServiceSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class CaseServiceSpec extends Specification {
"saksaar eq '2023'" || "CaseYear='2023'"
"saksaar eq '2023' and sakssekvensnummer eq '27'" || "CaseYear='2023' AND SequenceNumber='27'"
"sakssekvensnummer eq '27'" || "SequenceNumber='27'"
"saksdato eq '01-01-1970'" || "CaseDate='01-01-1970'"
"oppdatert eq '01-01-1970'" || "LastRecordDate='01-01-1970'"
"arkivdel eq 'Drosje'" || "SeriesId='Drosje'"
"administrativenhet eq '42'" || "AdministrativeUnitId='42'"
"tilgangskode eq 'UO'" || "AccessCodeId='UO'"
Expand Down

0 comments on commit 9c1d788

Please sign in to comment.