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

Bulk Court Dates #5060

Merged
merged 15 commits into from
Aug 4, 2023
Merged

Bulk Court Dates #5060

merged 15 commits into from
Aug 4, 2023

Conversation

kcdragon
Copy link
Collaborator

@kcdragon kcdragon commented Jul 30, 2023

What github issue is this PR for, if any?

Resolves #4997

What changed, and why?

  • Case groups contain related cases
  • Bulk court dates can create a court date for all cases in a case group

How will this affect user permissions?

  • Volunteer permissions:
  • Supervisor permissions:
  • Admin permissions:

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

Screenshots please :)

Screen Shot 2023-07-30 at 11 07 17 AM Screen Shot 2023-07-30 at 11 56 42 AM Screen Shot 2023-07-30 at 11 57 23 AM Screen Shot 2023-07-30 at 11 00 36 AM

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

* Case groups contain related cases
* Bulk court dates can create a court date for all cases in a case group

#4997
@github-actions github-actions bot added ruby Pull requests that update Ruby code Tests! 🎉💖👏 erb labels Jul 30, 2023

def set_court_report_due_date
if date.present? && court_report_due_date.blank?
self.court_report_due_date = date - 3.weeks
Copy link
Collaborator Author

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?
Copy link
Collaborator Author

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

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.

Thank you for working on this!

.allow_skipping_tests Outdated Show resolved Hide resolved
@kcdragon
Copy link
Collaborator Author

kcdragon commented Aug 1, 2023

I'll work on finishing the PR this week

@kcdragon kcdragon marked this pull request as ready for review August 2, 2023 00:02
@kcdragon
Copy link
Collaborator Author

kcdragon commented Aug 2, 2023

@littleforest This is ready for another look when you get a chance.

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.

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) }
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 simplify this and just call the association, and it will automatically create the association:

  factory :case_group_membership do
    case_group
    casa_case
  end

@littleforest littleforest merged commit 07497d6 into main Aug 4, 2023
13 checks passed
@littleforest littleforest deleted the md-4997-bulk-court-dates branch August 4, 2023 17:10
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.

Assign court dates to multiple cases at the same time
2 participants