Skip to content

Update specs to reflect new court report status select#1285

Merged
compwron merged 2 commits into
rubyforgood:mainfrom
ChaelCodes:806-court-report-submitted-status
Nov 8, 2020
Merged

Update specs to reflect new court report status select#1285
compwron merged 2 commits into
rubyforgood:mainfrom
ChaelCodes:806-court-report-submitted-status

Conversation

@ChaelCodes

Copy link
Copy Markdown
Contributor

What github issue is this PR for, if any?

Resolves #806

What changed, and why?

court_report_submitted as a boolean only tracked whether or not the report had been submitted. It did not track when it was submitted nor if it was completed. This PR adds court_report_status which tracks the current status of the court report, and court_report_submitted_at which tracks when it was submitted.

Cases will now have a court report status of 'Not submitted' by default. All users can update court_report_status. When the court_report_status is set to 'Submitted', 'In review', or 'Completed' for the first time, the court_report_submitted_at field is immediately set. If the court_report_status is ever set to 'Not submitted', the court_report_submitted_at date field will be cleared.

This PR also adds an after_party backfill that modifies all cases that were previously marked as court_report_submitted. All cases will be updated to have a court_report_submitted_at of the current date and court_report_status of submitted.

How will this affect user permissions?

  • Volunteer permissions: No Change
  • Supervisor permissions: No Change
  • Admin permissions: No Change

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

  • Using Unit tests, and updating the request specs for casa cases

Screenshots

Details Page - Not Submitted (court_report_status: :not_submitted, court_report_submitted_at: nil)

Details Page - Submitted (court_report_status: :submitted, court_report_submitted_at: '2020-11-08 18:29:16')

Details Page - Completed (court_report_status: :completed, court_report_submitted_at: '2020-11-08 18:29:16')

Edit Page
image

@github-actions github-actions Bot added ruby Touches Ruby code Tests! 🎉💖👏 labels Nov 8, 2020

@compwron compwron left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🙌🏼💪✨

@compwron compwron merged commit 3321225 into rubyforgood:main Nov 8, 2020
@compwron

Copy link
Copy Markdown
Collaborator

You are invited to the CASA asynchronous retrospective-and-futurespective! Please take a look at https://bit.ly/casaretro (no login required) and add at least one note! Even if it's just "I was here and you are cool" or "omg y'all why do you keep messaging me" we want to hear it. <3
Next week Wednesday 18 November @ 6pm Pacific time we will Zoom about the board and talk about themes and takeaways. (Zoom link in our calendar at http://bit.ly/casacal or slack #casa channel https://rubyforgood.herokuapp.com/ )
Please ESPECIALLY add lots of notes if you won't be able to make it on Wednesday to talk!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ruby Touches Ruby code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

supervisors/admins can edit court report submission status

2 participants