feat: tilføj kommune- og datafølsomhedsfilter til kataloget - #226
Open
martinydeAI wants to merge 1 commit into
Open
feat: tilføj kommune- og datafølsomhedsfilter til kataloget#226martinydeAI wants to merge 1 commit into
martinydeAI wants to merge 1 commit into
Conversation
Kommune er det mest oplagte udgangspunkt når en medarbejder leder efter noget en anden kommune allerede har løst, men man kunne ikke filtrere på det. Datafølsomhed blev vist på hver assistent uden at kunne filtreres på. Begge facetter følger den opskrift CatalogCriteria selv dokumenterer, og lægges efter tag-facetten, så eksisterende chip-rækkefølge er uændret. Kommune-facetten grupperer på organisationens navn, så URL'erne forbliver læsbare; assistenter uden organisation falder ud af joinet — samme adfærd som en assistent uden tags har i dag. Datafølsomheds-facetten grupperer på enum-værdien og oversætter labelen, så ingen får vist "ordinary_personal". Samtidig fjernes de to øverste chips fra detaljesidens header. Både rammeværk og datafølsomhed står allerede i meta-asiden i højre side, så headeren gentog sig selv. Assistentens egne tags er urørte og vises fortsat i Beskrivelse-fanen. Refs #225 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Links to issues
Closes #225
Leantime tickets: 8213, 8220.
Description
8220 — Kommune filter. Kommune is the most obvious way into the catalogue
(a caseworker looks for what a comparable municipality already solved) and there
was no way to filter on it.
8213 — Datafølsomhed filter + duplicate chips. The classification was shown
on every assistant without being filterable, and the two chips in the detail
header repeated what the meta aside already says.
CatalogCriteriadocuments on itself, and areappended after the tag facet so existing chip positions are untouched.
label, so nobody is shown
ordinary_personal.templates/assistant/show.html.twig. The assistant's own tags are unaffectedand still render in the Beskrivelse tab.
Screenshot of the result
Not included — the catalogue and detail pages sit behind authentication and I
could not drive the stateless-CSRF login from the sandbox. The filter rail
gains two groups and the detail header loses a row, so a reviewer should look
at both pages.
Checklist
Markdown lint could not be run locally:
itkdev/markdownlint's arm64 manifestentry contains x86-64 binaries, so the container exits with
exec format erroron aarch64. CI will cover it.
Details - AI specificities
Two deliberate behaviours, both pinned by tests:
join drops them, exactly as an untagged assistant behaves in the tag facet.
The fixture baseline has 21 assistants but only 9 with an organisation, so
the bucket total is intentionally below the catalogue size.
?data_sensitivity[]=value (hand-edited URL) falls back todisplaying itself rather than rendering a blank chip.
Chip labels now pass through
|trans. The sensitivity chip carries theenum's translation key; every other facet's label is already the raw value, and
transreturns an unknown id unchanged, so this is a no-op for them.dataSensitivityFacetCounts()normalises its own hydration. Array hydrationof an
enumTypecolumn has returned both the case and the backing string acrossORM versions, so the method handles either rather than assuming.
Test changes (approved in advance):
AssistantControllerTest:63— the one existing assertion that moved. Itasserted
'Fortrolige data'appears inside<article>, which was the removedheader pill. It now asserts both labels are absent from the article; the same
test already checks the aside separately via
$runtime, so aside coverage isunchanged.
CatalogCriteriaTestandAssistantRepositoryTest— additive only, six andfive new methods covering the facets, chip ordering, removal maths, and the
fallback above.
Verification.
task test— 701 tests, 2075 assertions, green (up 11).task test-coverageis 100% oncesrc/DataFixtures/LocalUserFixtures.phpisexcluded; that file is gitignored and untracked, so it does not exist in CI.
PHP CS Fixer, Twig CS Fixer, and Prettier all pass.
Non-goals. 8217 (missing kommune name on one assistant, purge test data) is
the remaining Catalog ticket and is not addressed here.