Skip to content

4987 annual report across years, implementation and unit tests #5199

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alexwitedja
Copy link

@alexwitedja alexwitedja commented May 19, 2025

Resolves #4987

Description

  • Give user the ability to download annual surveys from the first reportable year to the latest completed year.
  • I was thinking whether I should add or change the existing ExportReportCSVService class to handle this usecase but decided to keep it simple as my first contribution.

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update
  • Documentation update

How Has This Been Tested?

  1. I created unit test to see if csv result is correct.
  2. Testing manually by clicking button.

Screenshots

image
image

@alexwitedja
Copy link
Author

maintainers, please let me know if I need to change anything. I will update the user documentation later.

@cielf
Copy link
Collaborator

cielf commented May 20, 2025

@alexwitedja:
Go ahead and update the user documentation as part of this PR, please. We wouldn't want to merge without it.

Initial functional checks look good. I'm going to want to test this against production data, but also passing it on to @dorner for technical checks.

@cielf
Copy link
Collaborator

cielf commented May 20, 2025

@alexwitedja When I tested against production data, I'm seeing some anomalies. They may well be pre-existing, but I want to investigate further to find out what's going on.

(Edit: The anomalies are enough that we might as well hold off on @dorner checking this until I'm done. Go ahead with the user guide update, though, please -- they shouldn't affect that.)

@cielf
Copy link
Collaborator

cielf commented May 20, 2025

I'm at the end of my time on this for today -- So far, I'm seeing that there is a a difference between what is coming out for Cloth diapers distributed for some of the earlier years between what happens on an export of the individual year, and what is in the export that goes over all the years.

I suspect there is something year-specific in the existing code.

(This does not surprise us at all -- it's probably why we ranked this as "intermediate" rather than beginner. )

Copy link
Collaborator

@cielf cielf left a comment

Choose a reason for hiding this comment

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

I think this is going to be a heavier introduction to the system than you may have anticipated!

Looking at the results I get when I do an export with data going all the way back to 2018 -- it appears that the export for each year has different columns.

What we're going to need for this export is the same columns for each year .

If we don't calculate a value for a particular column for a given year, please put "N/A" in the cell. That's a "nice to have" -- I expect we could work with them being empty.

@cielf
Copy link
Collaborator

cielf commented Jun 20, 2025

Hey @alexwitedja - Are you still working on this?

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.

Annual survey export - make it work across years
2 participants