Skip to content

Some extra search filtering and aggregations#850

Open
gunnarvelle wants to merge 8 commits intomasterfrom
draft-responsibles
Open

Some extra search filtering and aggregations#850
gunnarvelle wants to merge 8 commits intomasterfrom
draft-responsibles

Conversation

@gunnarvelle
Copy link
Member

@gunnarvelle gunnarvelle commented Jan 29, 2026

Litt forskjellig fra https://trello.com/c/J05Ep4B2/1590-justeringer

  • Endepunkt for å hente ut alle responsibles-koder for artikler.
  • Endepunkt for å hente ut alle userids som har lagra artikkel eller ligger i endringslogg
  • NONE parameter for fag for å få artikler uten fag
  • NONE parameter for responsibleId for å få artikler uten ansvarlig

@gunnarvelle gunnarvelle requested a review from a team January 29, 2026 13:55
@gunnarvelle gunnarvelle force-pushed the draft-responsibles branch 2 times, most recently from f43f37e to d260001 Compare February 3, 2026 13:10
@gunnarvelle gunnarvelle requested review from a team and jnatten February 4, 2026 07:15
@gunnarvelle gunnarvelle requested a review from amatho February 16, 2026 09:08
@gunnarvelle gunnarvelle force-pushed the draft-responsibles branch 2 times, most recently from 7571b13 to 3957ee1 Compare February 20, 2026 08:48
@gunnarvelle gunnarvelle requested review from a team and amatho February 20, 2026 08:58
@gunnarvelle gunnarvelle force-pushed the draft-responsibles branch 2 times, most recently from ed30402 to 5ebf3f6 Compare March 4, 2026 08:02
@gunnarvelle gunnarvelle changed the title Get all responsibles for articles Some extra search filtering and aggregations Mar 4, 2026
Copy link
Contributor

@amatho amatho left a comment

Choose a reason for hiding this comment

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

Nå har jeg funnet en del steder hvor det mangler refresh av responsible og user ID views'ene 😅 Så jeg lurer på om det egentlig hadde vært enklere med enten en cronjobb, eller databasetrigger av noe slag, som refresh'er view'ene i stedet for å måtte holde styr på det i koden?

Har ikke testa noe av dette, men her er noen forslag fra chattern 😄 https://chatgpt.com/share/e/69b2a2ca-1c20-8015-b296-eca3012aea05

created = clock.now(),
published = clock.now(),
updatedBy = userInfo.id,
responsible = newResponsible,
Copy link
Contributor

Choose a reason for hiding this comment

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

Her må vel også responsible_view refresh'es?

Copy link
Contributor

Choose a reason for hiding this comment

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

Samme gjelder vel user_ids_view

fileStorage.copyResource(withoutPrefix, newFileName).map(f => s"/files/$f")
}

def newArticle(newArticle: api.NewArticleDTO, user: TokenUser): Try[api.ArticleDTO] = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Her må også responsible og user IDs refresh'es?

}
}

def updateArticleStatus(status: DraftStatus, id: Long, user: TokenUser): Try[api.ArticleDTO] = dbUtility
Copy link
Contributor

Choose a reason for hiding this comment

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

Her ser det også ut til at responsible må refresh'es

else booleanMust("contexts.rootId", subjectId)
)
Some(mustBeConceptOr(nestedQuery("contexts", boolQuery().should(subjectQueries)).ignoreUnmapped(true)))
protected def subjectFilter(subjects: Option[List[String]], filterInactive: Boolean): Option[Query] = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Vet ikke hvordan frontend gjør det i dag, men om den alltid sender tom liste (i stedet for å ikke sende parameter), så er dette breaking. Tenker fortsatt det kan være nice å endre, må bare passe på å endre frontend også i så fall 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

Meiner graphql-api fjerner parametre som er undefined slik at den blir None så antar dette er trygt. Men skal sjekke.

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.

3 participants