-
Notifications
You must be signed in to change notification settings - Fork 14
Feature/group lupaus agenda items by category #443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
petrjasek
merged 8 commits into
develop
from
feature/group_lupaus_agenda_items_by_category
Oct 9, 2025
Merged
Feature/group lupaus agenda items by category #443
petrjasek
merged 8 commits into
develop
from
feature/group_lupaus_agenda_items_by_category
Oct 9, 2025
Conversation
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
* Rename extraction helpers:
* get_stturgency_from_agenda_item -> get_priority_from_agenda_item
* get_numeric_value_from_stturgency -> get_numeric_value_from_priority
* Introduce set_stt_fields() to compute and filter planning items (centralizes related_events expansion)
* Replace _set_stt_urgency_fields with _set_priority_fields
* Agenda enrichment now calls set_stt_fields() instead of inline loops
* Rename item fields:
* stturgency -> stt_priority
* stturgency_numeric -> stt_priority_numeric
* Update template macro (stt_urgency_text -> stt_priority_text) and usage
…ring enrich_related.py: * Add get_category_from_agenda_item() to extract category (scheme 'categories') * Add _group_agenda_items_by_category() to build category -> [items] mapping * Extend (renamed) _set_stt_fields() to attach grouped_items per agenda * Rename public helper set_stt_fields -> _set_stt_fields (now internal) * Update enrich_planning_agendas() to call _set_stt_fields() in all paths lupaus_events_template.html: * Introduce render_planning_item macro to DRY per-item rendering * Refactor loop to use agenda.grouped_items and render each category with <h2> * Preserve existing item formatting (priority, events, coverages) * Remove previous ungrouped inline rendering code Result: Templates now support category-based grouping via agenda.grouped_items populated in enrichment.
…ctions
* Add _get_items_with_highest_priority() and attach main_topic_items to each agenda (highest numeric priority = 3300)
* Continue grouping agenda items by category via _group_agenda_items_by_category(), now stored under agenda['grouped_items']
* Template updates:
* Introduce render_planning_item_category() and render_main_topic_item() helpers
* Prepend each item line with a dash (“- …”) for bullet-style formatting
* Render a new “Kärkiaiheitamme” section listing main_topic_items
* Keep category sections (<h2>{{ category }}</h2>) with existing per-item layout
… sections * enrich_related.py * Add _get_planning_item_coverage_status_from_mongo() helper to pull coverages[*].news_coverage_status (limited to g2_content_type == "teksti") from Mongo. * During agenda enrichment, attach the retrieved news_coverage_status dict to each planning item before priority filtering. * lupaus_events_template.html * Normalize headings to uppercase (KÄRKIAIHEITAMME, category names). * Within each category section, group items by news_coverage_status: * “coverage intended” → rendered first with no extra heading. * “coverage not decided yet” → rendered under <h2>JOS AIHETTA</h2>. * Empty/other statuses → rendered under <h2>EI</h2>. Result: Lupaus agendas now carry coverage intent metadata and surface it in the template, highlighting intended coverages and separating undecided/other items.
…us_agenda_items_by_category
|
merged develop here to fix the tests, fyi we're switching to async version now |
petrjasek
approved these changes
Oct 9, 2025
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.
feat(lupaus): group agenda items by category and expose grouped rendering
===
feat(lupaus): surface main-topic priorities and show category/main sections
===
feat(lupaus): enrich planning with coverage status and render grouped sections