Skip to content

feat: add alerts in data-gouv export#50

Merged
MaGOs92 merged 1 commit into
masterfrom
gfay_fix_add-alerts-in-data-gouv-export
May 21, 2026
Merged

feat: add alerts in data-gouv export#50
MaGOs92 merged 1 commit into
masterfrom
gfay_fix_add-alerts-in-data-gouv-export

Conversation

@MaGOs92

@MaGOs92 MaGOs92 commented May 21, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the weekly Data.gouv CSV export to include alert (“alertes”) counts per commune alongside existing signalement counts, and updates the task test accordingly.

Changes:

  • Add AlertService.getAlertCountsByCommune() to compute alert status totals grouped by commune.
  • Update TaskService.weeklyDataGouvCSVExport() to merge signalement + alert counts per commune and export the expanded CSV schema.
  • Extend the Task module test to create alerts and assert the new CSV columns/rows (including communes that only appear via alerts).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/tests/task.spec.ts Updates the weekly Data.gouv export test to seed alerts and validate the new alert count columns and an additional commune row.
src/modules/task/task.service.ts Merges signalement + alert counts per commune, updates CSV header/rows, and sorts by combined totals before upload.
src/modules/task/task.module.ts Imports AlertModule so TaskService can inject AlertService.
src/modules/alert/alert.service.ts Adds a query-based aggregation method to return alert counts by commune and status.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MaGOs92 MaGOs92 merged commit cabab05 into master May 21, 2026
7 checks passed
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.

2 participants