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

Bug: "Youth's Date in Care" being deleted when new case is created #5291

Closed
bcastillo32 opened this issue Oct 20, 2023 · 4 comments · Fixed by #5295
Closed

Bug: "Youth's Date in Care" being deleted when new case is created #5291

bcastillo32 opened this issue Oct 20, 2023 · 4 comments · Fixed by #5295
Assignees

Comments

@bcastillo32
Copy link
Collaborator

bcastillo32 commented Oct 20, 2023

Impacted User Types

  • volunteers
  • supervisors
  • admins

Environment

desktop

Current Behavior

When a new case is created, "Youth's Date in Care" entered is deleted.



Before Clicking "+Create CASA Case" (submitting form)
image



After - "Edit Case Details"
image

Expected Behavior

When a New CASA Case is created, all info submitted is saved

How to Replicate

ex:

  1. Log in as an admin.
  2. Click on "Cases" in the left sidebar menu.
  3. Click "+New Case"
  4. Fill out Form details including "Youth's Date in Care"
  5. Submit form - click "+Create CASA Case"
  6. Click "Edit Case Details" and notice "Youth's Date in Care" is missing

How to access the QA site

Login Details:
Link to QA site

Login Emails:

password for all users: 12345678

Questions? Join Slack!

We highly recommend that you join us in slack https://rubyforgood.herokuapp.com/ #casa channel to ask questions quickly and hear about office hours (currently Tuesday 5-7pm Pacific), stakeholder news, and upcoming new issues.

@bcastillo32 bcastillo32 added Type: Bug Help Wanted This is a special label that enables github to showcase issues that want help labels Oct 20, 2023
@mattzollinhofer
Copy link
Contributor

I can take a look at this issue.

@mattzollinhofer
Copy link
Contributor

mattzollinhofer commented Oct 20, 2023

After an initial look, it appears that date_in_care is not part of permitted params and so the date is not making its way into the CasaCase creation.

  def casa_case_params
    params.require(:casa_case).permit(
      :case_number,
      :birth_month_year_youth,
      :court_report_due_date,
      :empty_court_date,
      casa_case_contact_types_attributes: [:contact_type_id],
      court_dates_attributes: [:date]
    )
  end

@github-actions github-actions bot removed the Help Wanted This is a special label that enables github to showcase issues that want help label Oct 20, 2023
@schoork
Copy link
Collaborator

schoork commented Oct 20, 2023

@mattzollinhofer Can you start with an initially failing test and then make the changes to fix it?

@mattzollinhofer
Copy link
Contributor

@mattzollinhofer Can you start with an initially failing test and then make the changes to fix it?

Ha, sorry -- I was just taking notes while I wasn't assigned to the issue. I'll certainly get specs around this and get an PR out.

mattzollinhofer added a commit to mattzollinhofer/casa that referenced this issue Oct 21, 2023
mattzollinhofer added a commit to mattzollinhofer/casa that referenced this issue Oct 21, 2023
The date in care was not a permitted param so it was not being included
in the attributes during CasaCase creation. Added it to the list of
permitted params.

Fixes rubyforgood#5291
mattzollinhofer added a commit to mattzollinhofer/casa that referenced this issue Oct 21, 2023
The date in care was not a permitted param so it was not being included
in the attributes during CasaCase creation. Added it to the list of
permitted params.

Fixes rubyforgood#5291
@github-project-automation github-project-automation bot moved this from Todo to Merged to QA in CASA Volunteer Portal Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants