-
-
Notifications
You must be signed in to change notification settings - Fork 478
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
Bulk Court Dates #5060
Bulk Court Dates #5060
Conversation
* Case groups contain related cases * Bulk court dates can create a court date for all cases in a case group #4997
|
||
def set_court_report_due_date | ||
if date.present? && court_report_due_date.blank? | ||
self.court_report_due_date = date - 3.weeks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This used to be in the controller but since we need it in both controllers I think it makes more sense to be in the model
private | ||
|
||
def set_court_report_due_date | ||
if date.present? && court_report_due_date.blank? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a conditional for court_report_due_date.blank?
. Without this, the value entered in the Court Report Due Date in the UI won't have any affect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working on this!
I'll work on finishing the PR this week |
@littleforest This is ready for another look when you get a chance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! Thank you so much for working on this.
FactoryBot.define do | ||
factory :case_group_membership do | ||
case_group { create(:case_group) } | ||
casa_case { create(:casa_case) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can simplify this and just call the association, and it will automatically create the association:
factory :case_group_membership do
case_group
casa_case
end
What github issue is this PR for, if any?
Resolves #4997
What changed, and why?
How will this affect user permissions?
How is this tested? (please write tests!) 💖💪
Screenshots please :)
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)
Feedback please? (optional)
We are very interested in your feedback! Please give us some :) https://forms.gle/1D5ACNgTs2u9gSdh9