-
Notifications
You must be signed in to change notification settings - Fork 19
Legacy Appeals tied to Non‐SSC AVLJs
The ReturnLegacyAppealsToBoard job automates the process of identifying and moving legacy appeals tied to non-SSC AVLJs. It operates on a regular schedule to ensure appeals are properly managed and moved back to the Board. This process ensures appeals are handled efficiently and in accordance with set priorities. This job identifies all Legacy appeals tied to non-SSC AVLJs, moves these appeals to the appropriate location (location 63) for further processing, updates relevant database records, and sends notifications upon completion. This job runs at a specified interval as determined by system settings, or triggered manually when needed. It generates a CSV report listing the appeals that were moved in the last 48 hours.
Non-SSC:
- Non-Senior Supervisory Counsel
AVLJ:
- Administrative Veteran Law Judge (AVLJ) is a judge who presides over the appeals process within the Veterans Affairs system
To run this job, you must have the appropriate permissions within the Caseflow system. Typically, this is a role assigned to Admin or authorized personnel with access to the Caseflow demo environment.
- Log into Caseflow
- Navigate to
[demo environment url]/acd-controls/test
- Scroll to the Case Movement section
- Click the Run ReturnLegacyAppealsToBoard job button
- Once the job runs, it updates the database with completion status and sends a Slack notification to the relevant channels.
- It generates a CSV report listing the appeals that were moved in the last 48 hours.
Check Banner:
- Ensure the banner confirms the job completion.
Verify Appeals:
- Click on the "Download Loc 63 Appeals Last 48 hrs CSV" button
- Open the downloaded CSV file to verify the list of appeals that were moved
When the ReturnLegacyAppealsToBoardJob is triggered, the following sequence of operations is performed:
- Record Creation: A new record is created in the returned_appeal_jobs table.
- Appeals Identification: All appeals tied to non-SSC AVLJs are found and grouped by AVLJ.
- Appeal Sorting: Appeals are sorted by priority and then by date (BFD19).
- Appeal Selection: Appeals are selected based on the following criteria:
- Two oldest priority appeals.
- If fewer than two priority appeals are found, selects the oldest non-priority appeals.
- Appeal Movement: Selected appeals are moved to location 63.
- Completion Actions: The job updates the database record with the results, including stats and a list of appeals moved.
- Notification: A Slack message is sent to Rails Logs
- Error Handling: If an error occurs, it is logged, and a Slack message is sent detailing the error.
When the ReturnLegacyAppealsToBoard is triggered the following happens:
-
A database record is created in the returned_appeal_jobs database table
-
All appeals tied to non-SSC AVLJs are found
-
If no appeals are found:
- The record created is updated to have a completed date.
- A Slack message is sent to the default Slack channels.
- For local and demo, the record created is updated with the Slack message and is pretty printed in Rails Logs.
-
Appeals are grouped by non-SSC AVLJ, then sorted in this order:
- Priority
- BFD19
- Create an empty array to hold the BRIEFF.BFKEY of appeals to be moved (appeals_to_move)
- For each non-SSC AVLJ
- Find 2 oldest priority appeals
- If found 2
- add the 2 BRIEFF.BFKEY values to appeals_to_move
- else if found 1
- add the BRIEFF.BFKEY value to appeals_to_move
- Find the oldest non-priority appeal
- add the BRIEFF.BFKEY value to appeals_to_move
- else if found 0
- Find the 2 oldest non-priority appeal
- add the 2 BRIEFF.BFKEY values to appeals_to_move
- Go to next non-SSC AVLJ
- If found 2
- Find 2 oldest priority appeals
- For all BRIEFF.BFKEY of appeals to be moved (appeals_to_move) move those appeals to location 63
- use VACOLS::Case.batch_update_vacols_location('63', appeals_to_move)
- After appeals have been moved
- the record created in Step 1 is updated to have an end date
- all BRIEFF.BFKEY of appeals to be moved (appeals_to_move) are put into the returned_appeals column of the record created in Step 1
- stats are recorded for the record created in Step 1
- Number of priority appeals returned to the board
- Number of non-priority appeals returned to the board
- Number of remaining priority appeals tied to non-SSC AVLJs
- Number of remaining non-priority appeals to non-SSC AVLJs
- List of non-SSC AVLJs that appeals were moved from to location '63'
- Keys of the hash the holds "Appeals should be grouped by non-SSC AVLJ"
- An informative Slack message is sent to the default Slack channels
- For local and demo the record created in Step 1 has its stats column updated with the Slack message as one of the json properties
- If an error occurs during the job
- the record created in Step 1 is updated to have an errored date
- The error is included as a property in the stats column for the record created in Step 1
- a Slack message is sent to the default Slack channels
- For local and demo the record created in Step 1 has its stats column updated with the Slack message as one of the json properties
- Error is logged using CaseflowJob.log_error
- EXIT POINT
- Ensure that metrics are recorded for the job before it exits using CaseflowJob.metrics_service_report_runtime
- Home
- Acronyms and Glossary
- Caseflow products
- Caseflow Intake
- Caseflow Queue
- Appeals Consumer
- Caseflow Reader
- Caseflow eFolder
- Caseflow Hearings
- Caseflow Certification
- Caseflow APIs
- Appeal Status API
- Caseflow Dispatch
-
CSUM Roles
- System Admin
- VHA Team Management
- Active Record Queries Resource
- External Integrations
- Caseflow Demo
- Caseflow ProdTest
- Background
- Stuck Jobs
- VA Notify
-
Caseflow-Team
- Tier 4
- Bat Team
- Technical Documentation
- Backend Code Patterns
- Backend Working Group
- FACOLS, VACOLS DB Schema
- Asyncable Models
- External Data: where and why
- Data Fetching Scripts
- Caseflow Data Model and Dictionary
- User Access Permissions
- Controller Schemas
- Constants
- Frontend Best Practices
- Accessibility
- How-To
- Debugging Tips
- Adding a Feature Flag with FeatureToggle
- Editing AMA issues
- Editing a decision review
- Fixing task trees
- Investigating and diagnosing issues
- Data and Metric Request Workflow
- Exporting and Importing Appeals
- Explain page for Appeals
- Record associations and Foreign Keys
- Upgrading Ruby
- Stuck Appeals
- Testing Action Mailer Messages Locally
- Re-running Seed Files
- Rake Generator for Legacy Appeals
- Manually running Scheduled Jobs
- System Admin UI
- Caseflow Makefile
- Upgrading Postgresql from v11.7 to v14.8 Locally
- VACOLS VM Trigger Fix M1
- Using SlackService to Send a Job Alert
- Technical Talks