Skip to content

Conversation

@Jonas-C
Copy link
Contributor

@Jonas-C Jonas-C commented Oct 13, 2025

https://github.com/NDLANO/Issues/issues/4442

Hvis du ikke inkluderer inactive i det hele tatt får du både ut aktive og inaktive bilder i resultatet.

@Jonas-C Jonas-C force-pushed the feat/inactive-images branch from 57a0d10 to 9f4f8bf Compare October 13, 2025 13:17
@Jonas-C Jonas-C marked this pull request as ready for review October 13, 2025 13:27
Copy link
Contributor

@jnatten jnatten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Har du testa dette?
Jeg ser ikke helt hvordan det går an å endre feltet?

@Jonas-C Jonas-C marked this pull request as draft October 14, 2025 07:42
@Jonas-C Jonas-C force-pushed the feat/inactive-images branch 8 times, most recently from d1a1250 to 00234a8 Compare December 1, 2025 12:35
@Jonas-C Jonas-C requested a review from a team December 1, 2025 12:37
@Jonas-C Jonas-C marked this pull request as ready for review December 1, 2025 12:37

val inactiveFilter = settings.inactive match {
case None => None
case Some(boolVal) => Some(boolQuery().should(termQuery("inactive", boolVal.toString)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Må vi ha denne toString'en her? Trodde egentlig termQuery skulle støtte å ta i mot boolean direkte

@Jonas-C Jonas-C requested review from a team and jnatten December 1, 2025 14:18
Copy link
Contributor

@jnatten jnatten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment on lines 588 to 602
test("That including inactive images work") {
val Success(searchResult) =
imageSearchService.matchingQuery(searchSettings.copy(inactive = Some(true)), None): @unchecked

searchResult.totalCount should be(1)
searchResult.results.last.id should be("6")
}

test("That excluding inactive images work") {
val Success(searchResult) =
imageSearchService.matchingQuery(searchSettings.copy(inactive = Some(true)), None): @unchecked

searchResult.totalCount should be(1)
searchResult.results.last.id should be("6")
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disse testene er like.

@Jonas-C Jonas-C requested a review from gunnarvelle December 2, 2025 07:06
@Jonas-C Jonas-C force-pushed the feat/inactive-images branch from 9b1077a to 77d43fc Compare December 2, 2025 07:15
@Jonas-C Jonas-C merged commit 8e1ec88 into master Dec 2, 2025
6 of 7 checks passed
@Jonas-C Jonas-C deleted the feat/inactive-images branch December 2, 2025 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants