Skip to content
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

Placement reports #4768

Merged
merged 8 commits into from
Jun 2, 2023
Merged

Conversation

rae-stanton
Copy link
Collaborator

This adds the placement report CSV for the current casa organization with tests for the service object as well. This also adds the expected route on the reports page and a decorator to format the date within the CSV to look cleaner. Please let me know if there is anything I may have missed or if something isn't 100% right! 😊😊

What github issue is this PR for, if any?

Resolves #4718
This was part of the new Placements epic!

What changed, and why?

This adds the ability to export placement data! Previously, this was not available as an option for the orgs.

How will this affect user permissions?

  • Supervisor/admin permissions: Adds ability to export the data

How is this tested? (please write tests!) 💖💪

Tested to expect specific columns to render properly when the CSV is generated.

Screenshots please :)

placementsample

Feelings gif~

What gif best describes your feeling working on this issue?

@github-actions github-actions bot added erb ruby Pull requests that update Ruby code Tests! 🎉💖👏 labels Apr 19, 2023
@compwron
Copy link
Collaborator

compwron commented May 5, 2023

nice gif xD

@littleforest
Copy link
Collaborator

@rae-stanton could you merge in main and fix linting, both standardrb and erb?

@rae-stanton
Copy link
Collaborator Author

Ok, I fixed some things on this ticket, I'm not 100% sure why some of the checks are failing right now, but everything is passing on my local for the changes I've made thus far. Let me know if there's something I may have missed though! @littleforest

@FireLemons
Copy link
Collaborator

Try prefixing your commands with bundle exec this forces your rails version to match the project's rails version. For example bundle exec standardrb --fix If you have a global rails version it will use that by default.

Copy link
Collaborator

@littleforest littleforest left a comment

Choose a reason for hiding this comment

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

Thanks for working on this!

@littleforest
Copy link
Collaborator

@rae-stanton could you merge or rebase in main and try again with bundle exec standardrb --fix ?

This adds the placement report CSV for the current casa organization with tests for the service object as well. This also adds the expected route on the reports page and a decorator to format the date within the CSV to look cleaner.
This updated the casa org association that allows placement service & spec to run as expected.
adjusted index file to fix linting issue and also adjusted service file for small rubocop fix.
This adds the placement report CSV for the current casa organization with tests for the service object as well. This also adds the expected route on the reports page and a decorator to format the date within the CSV to look cleaner.
adjusted index file to fix linting issue and also adjusted service file for small rubocop fix.
@rae-stanton rae-stanton force-pushed the csv-placements-4718 branch from fc36c3d to fb56ced Compare May 26, 2023 18:46
This adds the suggested changes from Jeanine - removes `id` in controller to just reference the organization itself and got rid of some unnecessary code in the index and csv service file. Adjusted tests to reflect changes and moved the `let` statements into the `it` block instead.
@rae-stanton
Copy link
Collaborator Author

Ok all changes have been made! It looks like the only not passing thing with spec checker is that it really wants me to have a controller test. If that's needed, I'm happy to write one up, otherwise, let me know if there's anything else! Thanks for all the help and feedback. @littleforest

@littleforest
Copy link
Collaborator

@rae-stanton it's okay to add the the controller to the list of tests to skip in the .allow_skipping_tests file, but would you mind adding a simple request spec, similar to this code: https://github.com/rubyforgood/casa/blob/main/spec/requests/hearing_types_spec.rb#L1-L13

We should fix up that .allow_skipping_tests file since we want to get away from controller specs anyway.

@@ -0,0 +1,15 @@
require "rails_helper"
require "factory_bot_rails"
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can remove this line.

This adds the placement reports controller to the list of skipped controller tests and adds a request spec.
@compwron compwron merged commit 1dd5331 into rubyforgood:main Jun 2, 2023
@elasticspoon elasticspoon mentioned this pull request May 26, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
erb ruby Pull requests that update Ruby code Tests! 🎉💖👏
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Export Data report for all Placements within a Casa Org
4 participants