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

Fix priority logic for appeals with aod motions for distributions #15352

Closed
7 tasks
hschallhorn opened this issue Sep 30, 2020 · 2 comments
Closed
7 tasks

Fix priority logic for appeals with aod motions for distributions #15352

hschallhorn opened this issue Sep 30, 2020 · 2 comments
Assignees
Labels
Feature: auto-case-distribution Priority: High Escalations from Support, blocking issue/NO workaround, or "first in" priority for new work. Product: caseflow-queue Stakeholder: BVA Functionality associated with the Board of Veterans' Appeals workflows/feature requests Team: Echo 🐬 Type: Bug

Comments

@hschallhorn
Copy link
Contributor

hschallhorn commented Sep 30, 2020

Description

Now that AOD motions should be associated with an actual appeal (#14085), we need to adjust the logic for what we consider priority for distributions. This is still looking for motions associated with the claimant that were created after the appeal was established.

def priority
join_aod_motions
.where("advance_on_docket_motions.created_at > appeals.established_at")
.where("advance_on_docket_motions.granted = ?", true)
.or(join_aod_motions
.where("people.date_of_birth <= ?", 75.years.ago))
.group("appeals.id")
end

Acceptance criteria

  • Priority ama appeals are pulled for distribution ONLY if one of the following are true
    • aod_based_on_age is true on the appeal
    • The claimant's dob is over 75 years ago
    • The claimant has a granted age base aod motion
    • The appeal has a granted aod motion associated with the appeal
    • The appeal is a cavc remand (not yet implemented)
  • Scope is created for appeal model that captures all this with no N+1 queries (should only produce one db call if possible)

Notes

The first 3 AC have a lot of overlap. What should we consider as our source of truth as I assume we don't want to check all 3?

Background/context/resources

Technical notes

@hschallhorn hschallhorn added Product: caseflow-queue Type: Bug Feature: auto-case-distribution Stakeholder: BVA Functionality associated with the Board of Veterans' Appeals workflows/feature requests Team: Echo 🐬 Priority: Medium Blocking issue w/workaround, or "second in" priority for new work. labels Sep 30, 2020
@araposo-tistatech araposo-tistatech added Priority: High Escalations from Support, blocking issue/NO workaround, or "first in" priority for new work. and removed Priority: Medium Blocking issue w/workaround, or "second in" priority for new work. labels Oct 1, 2020
@yoomlam
Copy link
Contributor

yoomlam commented Oct 1, 2020

what is this chart?

1 | 
2 | |||||
3 | ||||
5 | 
8 | 

Maybe a helper function to answer the requirements? Not sure where it would go though.

Why 1?

Why 2?

  • Well scoped change

Why 3?

  • Testing various scenarios for each permutation of the boolean logic checks
  • AOD has historically been a little tricky

@yoomlam
Copy link
Contributor

yoomlam commented Oct 29, 2020

Blocked and deprioritized -- see #13175 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: auto-case-distribution Priority: High Escalations from Support, blocking issue/NO workaround, or "first in" priority for new work. Product: caseflow-queue Stakeholder: BVA Functionality associated with the Board of Veterans' Appeals workflows/feature requests Team: Echo 🐬 Type: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants