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

Code clean up after prod backfill #9710

Merged
merged 14 commits into from
Mar 4, 2019
Merged

Conversation

oscarAtNava
Copy link
Contributor

Resolves #9594

Description

Remove some code no longer needed now that prod data is cleaned up.

Acceptance Criteria

  • Code compiles correctly

Testing Plan

  1. TBD

@ghost ghost assigned oscarAtNava Feb 28, 2019
@ghost ghost added the In-Progress label Feb 28, 2019
end
ScheduleHearingTask.create!(appeal: appeal) do |task|
task.assigned_to = HearingsManagement.singleton
task.parent = parent
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be updated to always create a new HearingTask as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean to replace HearingTask.find_or_create_by!() with just HearingTask.create!()?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, that's correct!

Copy link
Contributor

@sharonwarner sharonwarner left a comment

Choose a reason for hiding this comment

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

This looks good! Let's til Monday and confirm that all ScheduleHearingTasks and DispositionTasks have HearingTasks as parents before deploying.

Copy link
Contributor

@tomas-nava tomas-nava left a comment

Choose a reason for hiding this comment

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

🗣 Approved!

@tomas-nava
Copy link
Contributor

This PR also resolves #9538

@oscarAtNava
Copy link
Contributor Author

oscarAtNava commented Mar 1, 2019

@sharonwarner Almost all Disposition and ScheduleHearingTasks have a HearingTask parent. I ran the following SQL Queries to confirm and found one issue:

Total ScheduleHearingTask and DispositionTask

select count(*)
from tasks
where type IN ('DispositionTask', 'ScheduleHearingTask')

Result ==> 28,190

DispositionTask and ScheduleHearingTask with HearingTask parent

select count(*)
from tasks p, tasks c
where c.parent_id = p.id
and c.type IN ('DispositionTask', 'ScheduleHearingTask')
and p.type = 'HearingTask'

Results ==> 28,189

Appeal with issue

appeal_id = 864. It is an AMA appeal hence was not touched by my script. Appeal has a Disposition and ScheduleHearingTask with RootTask as parent.

We can fix it manually next week.

@sharonwarner
Copy link
Contributor

Yes, it's fine to ignore that AMA appeal. It's already been distributed to an attorney, so we shouldn't need to do anything else.

@oscarAtNava oscarAtNava added the Ready-to-Merge This PR is ready to be merged and will be picked up by va-bot to automatically merge to master label Mar 4, 2019
@oscarAtNava oscarAtNava merged commit 6e407ae into master Mar 4, 2019
@ghost ghost removed the In-Progress label Mar 4, 2019
@oscarAtNava oscarAtNava removed the Ready-to-Merge This PR is ready to be merged and will be picked up by va-bot to automatically merge to master label Mar 4, 2019
@pkarman pkarman deleted the oar-issue-9594-code-clean-up branch March 18, 2019 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants