Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 20, 2026

What is the goal of this PR and why is this important?

Implements /organizations/:id/annual_evaluations?year=YYYY endpoint to display aggregated annual evaluation responses per organization per year. Organizations need to view all submitted evaluations with questions and answers grouped for analysis.

How did you approach the change?

Model Layer

  • Created Organization model as STI from Project (organizations are projects in this system)
  • Added annual_evaluations_for_year(year) - fetches evaluations via Rails associations
  • Added aggregated_annual_evaluation_responses(year) - groups responses by form field

Controller & Routes

  • OrganizationsController#annual_evaluations with year filtering
  • Standard CRUD actions for organization management
  • Member route: GET /organizations/:id/annual_evaluations

Form Seed

  • Annual Evaluation FormBuilder with 17 fields:
    • Organization/contact details
    • Metrics (participants, facilitators, workshops)
    • Qualitative feedback (accomplishments, challenges, needs)
    • Quality rating with multiple choice options

View

  • Displays all questions with aggregated responses
  • Multiple choice: count summaries with badges
  • Free-form: table with respondent names and dates
  • Year selector dropdown for filtering

Tests

  • Model specs for aggregation methods
  • Request specs for all controller actions
  • Routing specs including member route
  • Factory for organizations

Anything else to add?

The existing FormField#multiple_choice? method has a bug (checks for "multiple choice" with space instead of "multiple_choice" with underscore), so the view uses direct string checking on answer_type instead.

Future performance optimization: consider indexes on form_builders.name and reports.created_at as evaluation volume grows.

Original prompt

This section details on the original issue you should resolve

<issue_title>Aggregated Annual Evaluations page per year per Organization</issue_title>
<issue_description>so, a new endpoint: organizations/:id/annual_evaluations?year=2025

shows each question on annual evaluation, along with all answers</issue_description>

<agent_instructions>read the pdf in the comments (or go here https://www.surveymonkey.com/r/2025annualeval) and build a Form seed to have a Form for annual evaluations.

add any new data fields needed in facilitator or organization to the db and UI.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@maebeale [SurveyMonkey-Powered-Online-Survey-12-27-2025_05_22_PM.pdf](https://github.com/user-attachments/files/24357025/SurveyMonkey-Powered-Online-Survey-12-27-2025_05_22_PM.pdf) @maebeale @copilot read the pdf in the comments (or go here https://www.surveymonkey.com/r/2025annualeval) and build a Form seed to have a Form for annual evaluations.

add any new data fields needed in facilitator or organization to the db and UI.</comment_new>


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 8 commits January 20, 2026 00:53
…on form seed

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
…psis in seed

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
… inline JS

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
Copilot AI changed the title [WIP] Add aggregated annual evaluations endpoint for organizations Add aggregated annual evaluations endpoint for organizations Jan 20, 2026
Copilot AI requested a review from maebeale January 20, 2026 01:07
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.

Aggregated Annual Evaluations page per year per Organization

2 participants