Skip to content

Comments

YJDH-806 | Backend: Add 15, 18 y.o. Helsinkian target groups, not defaults#3871

Merged
karisal-anders merged 1 commit intomainfrom
YJDH-806-add-15-18-target-groups
Feb 6, 2026
Merged

YJDH-806 | Backend: Add 15, 18 y.o. Helsinkian target groups, not defaults#3871
karisal-anders merged 1 commit intomainfrom
YJDH-806-add-15-18-target-groups

Conversation

@karisal-anders
Copy link
Collaborator

@karisal-anders karisal-anders commented Feb 4, 2026

Description ✨

Backend: Add 15, 18 y.o. Helsinkian target groups, not defaults

also:

  • make "primary_target_group,secondary_target_group" the default target group selection when using create_summervoucher_configuration command
  • add support for "all" target groups to create_summervoucher_configuration
  • fix tests by not setting hki_15 and hki_18 target groups in tests
  • fix CSRF when accessing e.g. Django admin in local development

Issues 🐛

YJDH-806

Testing ⚗️

Screenshots 📸

Additional notes 🗒️

@karisal-anders karisal-anders marked this pull request as ready for review February 4, 2026 15:00
@karisal-anders karisal-anders requested review from a team as code owners February 4, 2026 15:00
@karisal-anders karisal-anders removed request for a team February 4, 2026 15:00
@azure-pipelines
Copy link

YJDH-KESASETELI-API branch is deployed to platta: https://yjdh-kesaseteli-pr3871.api.dev.hel.ninja 🚀🚀🚀

@karisal-anders karisal-anders force-pushed the YJDH-806-add-15-18-target-groups branch from 72d7d27 to 39f41ce Compare February 4, 2026 15:09
@azure-pipelines
Copy link

YJDH-KESASETELI-API branch is deployed to platta: https://yjdh-kesaseteli-pr3871.api.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

YOUTH branch is deployed to platta: https://nuortenkesaseteli-pr3871.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

HANDLER branch is deployed to platta: https://kesaseteli-handler-ui-pr3871.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

EMPLOYER branch is deployed to platta: https://kesaseteli-pr3871.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

TestCafe result is success for https://nuortenkesaseteli-pr3871.dev.hel.ninja 😆🎉🎉🎉

@azure-pipelines
Copy link

TestCafe result is success for https://kesaseteli-handler-ui-pr3871.dev.hel.ninja 😆🎉🎉🎉

@azure-pipelines
Copy link

TestCafe result is success for https://kesaseteli-pr3871.dev.hel.ninja 😆🎉🎉🎉

@pytest.fixture(autouse=True)
def seed_default_configuration_for_tests(db):
target_groups = [identifier for identifier, _ in get_target_group_choices()]
default_target_groups = ["primary_target_group", "secondary_target_group"]
Copy link
Contributor

Choose a reason for hiding this comment

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

This could be read from settings.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As we are currently not allowing the configuring of SUMMER_VOUCHER_DEFAULT_TARGET_GROUPS setting from environment this is ok, but if we'd be allowing configuring the setting from environment variables, then it'd IMHO be better not to read the value from settings but to use some prechosen values for the tests specifically—in order to make the tests more robust and not break if someone locally changes their .env.kesaseteli SUMMER_VOUCHER_DEFAULT_TARGET_GROUPS value.

@karisal-anders karisal-anders force-pushed the YJDH-806-add-15-18-target-groups branch from 39f41ce to 3b93a95 Compare February 5, 2026 15:49
@karisal-anders
Copy link
Collaborator Author

Force pushed changes.

@azure-pipelines
Copy link

YJDH-KESASETELI-API branch is deployed to platta: https://yjdh-kesaseteli-pr3871.api.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

YOUTH branch is deployed to platta: https://nuortenkesaseteli-pr3871.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

HANDLER branch is deployed to platta: https://kesaseteli-handler-ui-pr3871.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

EMPLOYER branch is deployed to platta: https://kesaseteli-pr3871.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

TestCafe result is success for https://nuortenkesaseteli-pr3871.dev.hel.ninja 😆🎉🎉🎉

@azure-pipelines
Copy link

TestCafe result is success for https://kesaseteli-handler-ui-pr3871.dev.hel.ninja 😆🎉🎉🎉

@azure-pipelines
Copy link

TestCafe result is success for https://kesaseteli-pr3871.dev.hel.ninja 😆🎉🎉🎉

also:
- make "primary_target_group,secondary_target_group" the default target
  group selection when using create_summervoucher_configuration command
- add support for "all" target groups to
  create_summervoucher_configuration
- fix tests by not setting hki_15 and hki_18 target groups in tests
- fix CSRF when accessing e.g. Django admin in local development

refs YJDH-806
@karisal-anders karisal-anders force-pushed the YJDH-806-add-15-18-target-groups branch from 3b93a95 to e45ef81 Compare February 6, 2026 12:30
@karisal-anders karisal-anders merged commit eec29b8 into main Feb 6, 2026
20 of 26 checks passed
@karisal-anders karisal-anders deleted the YJDH-806-add-15-18-target-groups branch February 6, 2026 12:32
@azure-pipelines
Copy link

YJDH-KESASETELI-API branch is deployed to platta: https://yjdh-kesaseteli-pr3871.api.dev.hel.ninja 🚀🚀🚀

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 6, 2026

@azure-pipelines
Copy link

YOUTH branch is deployed to platta: https://nuortenkesaseteli-pr3871.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

HANDLER branch is deployed to platta: https://kesaseteli-handler-ui-pr3871.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

EMPLOYER branch is deployed to platta: https://kesaseteli-pr3871.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

TestCafe result is success for https://kesaseteli-handler-ui-pr3871.dev.hel.ninja 😆🎉🎉🎉

@azure-pipelines
Copy link

TestCafe result is success for https://nuortenkesaseteli-pr3871.dev.hel.ninja 😆🎉🎉🎉

@azure-pipelines
Copy link

TestCafe result is success for https://kesaseteli-pr3871.dev.hel.ninja 😆🎉🎉🎉

karisal-anders added a commit that referenced this pull request Feb 9, 2026
done:
- "python manage.py makemigrations"

refs YJDH-806
karisal-anders added a commit that referenced this pull request Feb 9, 2026
done:
- "python manage.py makemigrations"

refs YJDH-806
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