-
-
Notifications
You must be signed in to change notification settings - Fork 472
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
5630 switch followups to polymorphic reads #6001
Draft
acasarsa
wants to merge
10
commits into
main
Choose a base branch
from
5630-switch-followups-to-polymorphic-reads
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains 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
* routes * followup model * followups_controller updates * views updates to match new route * followupService updates
…request from sweetalert js file
* refactored find_followupable to use followupable_type and id passed in params * added white listed classes for the followupable_types * fixed namespace that was still in the classname. * adjusted the associations on case_contact and followup to reflect polymorphic usage * updated the existing_requested_followup? validation to work with followupable * refactored / renamed send_followup_notification method in FollowupService to be more flexible and allow for future use of followups by other models. * added helper to make _followup partial reusable with any model. * refactored js file that performs the post request to work with other changes. This is a WIP though because it needs to be either removed / renamed to not be associated with case_contact or handled differently to allow for reusability across other models.
* added check for associated_casa_case so it can handle followups in other areas like directly on a casa case * added association for casa_case to followupable
* removed casa_case as followupable for now as it was mainly there to help test that polymorph refactors worked with different followupable types * refactor FollowupExportCsvService * update specs for FollowupExportCsvService * update specs for backfill * refactor self.in_organization * move maintain_backwards_compatability out of FollowupService and into a before_save in the Followup model * add followupable association with default case_contact to followups factory * update followup_spec to use polymorphic creation
* and add to followup_service specs
github-actions
bot
added
javascript
for use by Github Labeler to mark pull requests that update Javascript code
ruby
Pull requests that update Ruby code
Tests! 🎉💖👏
erb
labels
Aug 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
erb
javascript
for use by Github Labeler to mark pull requests that update Javascript code
ruby
Pull requests that update Ruby code
Tests! 🎉💖👏
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.
What github issue is this PR for, if any?
Resolves #XXXX
What changed, and why?
How is this tested? (please write tests!) 💖💪
Note: if you see a flake in your test build in github actions, please post in slack #casa "Flaky test: " :) 💪
Note: We love capybara tests! If you are writing both haml/js and ruby, please try to test your work with tests at every level including system tests like https://github.com/rubyforgood/casa/tree/main/spec/system
Screenshots please :)
Run your local server and take a screenshot of your work! Try to include the URL of the page as well as the contents of the page.
Feelings gif (optional)
What gif best describes your feeling working on this issue? https://giphy.com/
How to embed:
![alt text](https://media.giphy.com/media/1nP7ThJFes5pgXKUNf/giphy.gif)