Collection page shows a different dataset count in the card and the results header
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 82/100
Direzione di ricerca
Leggi app/routes.py e app/templates/index.html, poi confronta la gestione del conteggio con collection_card.html e l’adeguamento del record padre della pagina del dataset. Usa il totale del risultato della ricerca per il conteggio della raccolta e correggi il plurale nell’intestazione; aggiungi un test per una raccolta con più di 20 dataset. Il lavoro è completato quando entrambi i conteggi visualizzati mostrano il totale e l’intestazione usa il plurale corretto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
On a collection page, the collection card at the top caps its dataset count at 20, while the results header just below shows the real total. Collections with more than 20 datasets show two different numbers.
- Environment: prod catalog.data.gov
- Component: datagov-catalog, collection view (
/?collection=<identifier>) - Example: https://catalog.data.gov/?collection=US-GOV-SSA-314 (SSI Annual Statistical Report series). The card says "20 datasets in this collection", the results header says "24 dataset in this collection". The collection has 24 datasets (2002 to 2025).
How to reproduce
- Open https://catalog.data.gov/?collection=US-GOV-SSA-314, or click "Explore Collection" on https://catalog.data.gov/dataset/ssi-annual-statistical-report-series
- Compare the count in the collection card with the count in the results header below it.
Expected behavior
- Both counts show 24.
- The header reads "24 datasets", plural.
Actual behavior
- The card shows 20.
app/routes.pysetscollection_data["count"]tolen(interface.search_datasets(...).results), which is the length of one page of results (20 by default), not the total. - The header says "24 dataset" because
app/templates/index.htmluses{{s if total > 1 }}, wheresis an undefined variable rather than the string"s".
Sketch
- Use the search result's
totalfor the collection count instead of the length ofresults(check whether the parent record needs to be excluded, as the dataset page does withresult.total - 1) - Fix the plural in
index.htmlto{{ "s" if total != 1 }}, matchingcollection_card.html - Add a test with a collection of more than 20 datasets
- Lingua principale
- Python
- Stelle
- 1.2k
- Fork
- 207
- Merge medio
- 3g 16h
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di GSA/data.gov
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Harvester
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
-
blocked form submission shows home pageForse già presa @FuhuXia l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
idle-in-transaction for harvest record selectionForse già presa @theyottaboy l’ha presa 13 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Harvester pagination: add page-number navigation to paginationForse già presa @jaredb96 l’ha presa 23 giorni fa. Apertabug Harvester
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Tutte le issue di GSA/data.gov
Issue simili
-
Public benchmark import end-to-end test fails when the test stack's worker runs the parity jobApertaaccepted
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
future-agi/future-agi#6392 ·
I maintainer di solito rispondono entro 1 giorno
-
memmapped_arange ignores the start value and drops the last point above the memmap thresholdForse già presa @prathameshfuke l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
StingraySoftware/HENDRICS#213 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni
-
bot-triaged module: decompositions module: edge cases module: int overflow module: primTorch oncall: pt2 triage review
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno