Skip to content

CSV export view for NotificationTemplates and support for file imports#506

Draft
nikomakela wants to merge 4 commits into
mainfrom
KK-1441-notification-template-csv-export
Draft

CSV export view for NotificationTemplates and support for file imports#506
nikomakela wants to merge 4 commits into
mainfrom
KK-1441-notification-template-csv-export

Conversation

@nikomakela

@nikomakela nikomakela commented Jun 2, 2025

Copy link
Copy Markdown
Contributor

KK-1441.

Replace the old Importers app with a clone from Kultus (https://github.com/City-of-Helsinki/palvelutarjotin/tree/80e9f26097825fee03012e2a74e02e0398eeb705/notification_importers). The improved version of notification importers is first copied with minimal changes in order to get it to work in Kukkuu. Then it's extended with an export to CSV feature. The long goal is to get rid of Google Drive Spreadsheet that stores the content for notification templates. This new Django app looks the same as the old one, but also supports importing the notification templates from the code repo itself. It's been in use in Kultus for a long now.

image

NOTE: This PR also contains small fixes to CSP rules.

@terovirtanen

Copy link
Copy Markdown
Contributor

KUKKUU-API branch is deployed to platta: https://kukkuu-pr506.api.dev.hel.ninja 🚀🚀🚀

@terovirtanen

Copy link
Copy Markdown
Contributor

TestCafe result is success for https://kukkuu-pr506.api.dev.hel.ninja 😆🎉🎉🎉

@nikomakela nikomakela force-pushed the KK-1441-notification-template-csv-export branch from da4bac4 to 2fc3747 Compare June 3, 2025 06:31
@terovirtanen

Copy link
Copy Markdown
Contributor

KUKKUU-API branch is deployed to platta: https://kukkuu-pr506.api.dev.hel.ninja 🚀🚀🚀

@terovirtanen

Copy link
Copy Markdown
Contributor

TestCafe result is success for https://kukkuu-pr506.api.dev.hel.ninja 😆🎉🎉🎉

@nikomakela nikomakela added the Comodori Team Comodori's projected work. label Jun 3, 2025
@nikomakela nikomakela force-pushed the KK-1441-notification-template-csv-export branch from 2fc3747 to afc1f9a Compare June 5, 2025 10:46
@terovirtanen

Copy link
Copy Markdown
Contributor

KUKKUU-API branch is deployed to platta: https://kukkuu-pr506.api.dev.hel.ninja 🚀🚀🚀

@terovirtanen

Copy link
Copy Markdown
Contributor

TestCafe result is success for https://kukkuu-pr506.api.dev.hel.ninja 😆🎉🎉🎉

@nikomakela nikomakela requested a review from karisal-anders June 5, 2025 12:54
@nikomakela nikomakela marked this pull request as ready for review June 5, 2025 12:55
@nikomakela nikomakela requested a review from a team as a code owner June 5, 2025 12:55
@nikomakela nikomakela force-pushed the KK-1441-notification-template-csv-export branch from afc1f9a to 889a52c Compare June 5, 2025 13:32
In `settings.py` CSP configuration it was said that SpectacularRedocView
needs `UNSAFE_EVAL`, but it does not need one. If it does, it could
quite easily be set for redoc view only in the same `urls.py`.
KK-1441.

Replace the importers app used to maintain and import django_ilmoitin
notification templates from a Google Drive Spreadsheet with
notification_importers app, that is copied with minimal changes from the
[Kultus API](https://github.com/City-of-Helsinki/palvelutarjotin/tree/
80e9f26097825fee03012e2a74e02e0398eeb705/notification_importers). The
new app to import notification templates does not only support the
Google Drive Spreadsheet importing, but also importing from files. The
long goal is to get rid of external Google Drive Spreadsheet, because
it's so hard to maintain and the notification templates are not in code
repository.
KK-1441.

Preview was prevented by CSP control.
KK-1441.

Add an export to CSV button for notification templates in Django admin
site.
@nikomakela nikomakela force-pushed the KK-1441-notification-template-csv-export branch from 889a52c to 77ba0ef Compare June 5, 2025 13:34
@terovirtanen

Copy link
Copy Markdown
Contributor

KUKKUU-API branch is deployed to platta: https://kukkuu-pr506.api.dev.hel.ninja 🚀🚀🚀

@terovirtanen

Copy link
Copy Markdown
Contributor

TestCafe result is success for https://kukkuu-pr506.api.dev.hel.ninja 😆🎉🎉🎉

@sonarqubecloud

sonarqubecloud Bot commented Jun 5, 2025

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
54.6% Coverage on New Code (required ≥ 65%)
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@nikomakela nikomakela self-assigned this Jun 6, 2025
@karisal-anders karisal-anders removed their request for review September 18, 2025 12:32
@karisal-anders

Copy link
Copy Markdown
Contributor

Removed review request from myself to make my review request list more up to date. If this really needs code review still, and this is really going to be merged, then please ask for code review from me anew. Thank you!

@nikomakela nikomakela marked this pull request as draft April 8, 2026 12:09
@nikomakela

Copy link
Copy Markdown
Contributor Author

Converted to draft, since there is no plan for this yet and Solution office requested the change to draft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Comodori Team Comodori's projected work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants