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

mbeard/APPEALS-49585 #22020

Merged
merged 6 commits into from
Jun 26, 2024
Merged

mbeard/APPEALS-49585 #22020

merged 6 commits into from
Jun 26, 2024

Conversation

mbeardy
Copy link
Contributor

@mbeardy mbeardy commented Jun 25, 2024

Resolves APPEALS-49585

Description

Fixes bug in Docket Time Goals where value and unit don't show up for member only view

Acceptance Criteria

  • Code compiles correctly

Testing Plan

  1. Go to Jira Issue/Test Plan Link or list them below
  • For feature branches merging into master: Was this deployed to UAT?

Frontend

User Facing Changes

  • Screenshots of UI changes added to PR & Original Issue
BEFORE AFTER

Storybook Story

For Frontend (Presentation) Components

  • Add a Storybook file alongside the component file (e.g. create MyComponent.stories.js alongside MyComponent.jsx)
  • Give it a title that reflects the component's location within the overall Caseflow hierarchy
  • Write a separate story (within the same file) for each discrete variation of the component

Backend

Database Changes

Only for Schema Changes

  • Add typical timestamps (created_at, updated_at) for new tables
  • Update column comments; include a "PII" prefix to indicate definite or potential PII data content
  • Have your migration classes inherit from Caseflow::Migration, especially when adding indexes (use add_safe_index) (see Writing DB migrations)
  • Verify that migrate:rollback works as desired (change supported functions)
  • Perform query profiling (eyeball Rails log, check bullet and fasterer output)
  • For queries using raw sql was an explain plan run by System Team
  • Add appropriate indexes (especially for foreign keys, polymorphic columns, unique constraints, and Rails scopes)
  • Run make check-fks; add any missing foreign keys or add to config/initializers/immigrant.rb (see Record associations and Foreign Keys)
  • Add belongs_to for associations to enable the schema diagrams to be automatically updated
  • Document any non-obvious semantics or logic useful for interpreting database data at Caseflow Data Model and Dictionary

Integrations: Adding endpoints for external APIs

  • Check that Caseflow's external API code for the endpoint matches the code in the relevant integration repo
    • Request: Service name, method name, input field names
    • Response: Check expected data structure
    • Check that calls are wrapped in MetricService record block
  • Check that all configuration is coming from ENV variables
    • Listed all new ENV variables in description
    • Worked with or notified System Team that new ENV variables need to be set
  • Update Fakes
  • For feature branches: Was this tested in Caseflow UAT

Best practices

Code Documentation Updates

  • Add or update code comments at the top of the class, module, and/or component.

Tests

Test Coverage

Did you include any test coverage for your code? Check below:

  • RSpec
  • Jest
  • Other

Code Climate

Your code does not add any new code climate offenses? If so why?

  • No new code climate issues added

Monitoring, Logging, Auditing, Error, and Exception Handling Checklist

Monitoring

  • Are performance metrics (e.g., response time, throughput) being tracked?
  • Are key application components monitored (e.g., database, cache, queues)?
  • Is there a system in place for setting up alerts based on performance thresholds?

Logging

  • Are logs being produced at appropriate log levels (debug, info, warn, error, fatal)?
  • Are logs structured (e.g., using log tags) for easier querying and analysis?
  • Are sensitive data (e.g., passwords, tokens) redacted or omitted from logs?
  • Is log retention and rotation configured correctly?
  • Are logs being forwarded to a centralized logging system if needed?

Auditing

  • Are user actions being logged for audit purposes?
  • Are changes to critical data being tracked ?
  • Are logs being securely stored and protected from tampering or exposing protected data?

Error Handling

  • Are errors being caught and handled gracefully?
  • Are appropriate error messages being displayed to users?
  • Are critical errors being reported to an error tracking system (e.g., Sentry, ELK)?
  • Are unhandled exceptions being caught at the application level ?

Exception Handling

  • Are custom exceptions defined and used where appropriate?
  • Is exception handling consistent throughout the codebase?
  • Are exceptions logged with relevant context and stack trace information?
  • Are exceptions being grouped and categorized for easier analysis and resolution?

@amybids amybids merged commit 2c84c2f into feature/APPEALS-36234 Jun 26, 2024
17 checks passed
@amybids amybids deleted the mbeard/APPEALS-49585 branch June 26, 2024 21:14
amybids added a commit that referenced this pull request Jun 27, 2024
* APPEALS-36339 (#21436)

* Updated to remove obsolete levers of ACD Disable Legacy Distributions and ACD Disable Non-priority Distributions

* Fixed redundant linting issue

* Fixed empty line linting issue

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* mbeard/APPEALS-44379 (#21451)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44417 Seeds for Docket Lever Demo (#21534)

Co-authored-by: Christopher Detlef <>

* APPEALS-36345-updated (#21537)

* Refactored exclusion table

* Fixed ordering issue and testing

* mbeard/APPEALS-44379 (#21530)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

* first new commit with new args

* updates methods and test query

* updates age_of_oldest methods params

* cleans up method removes args and updates tests, fixes linting

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44346 Demo Docket Goal Lever Test Seed Data (#21524)

Co-authored-by: Christopher Detlef <>

* Chrisbdetlef/appeals 40705 (#21535)

* Chris backend Work

* APPEALS-44441. Added initial changes for individual seed

* WIP

* APPEALS-44441. Fixed the table css

* APPEALS-44441. Added Custom and Scenario Seed components and jest tests

* APPEALS-44441. Fix ScenarioSeeds jest test

* APPEALS-44441. Fix CustomeSeeds Jest test

* init commit

* fixes linting issues

* capybara test init

* APPEALS-44441. Backend Integration API changes

* APPEALS-44441_1. Matched the constant keys in the backend

* APPEALS-44441_1. Update the param to match the backend and fixed spec

* APPEALS-44441. lint fixes

* APPEALS-44441. linting fixes

* sharsha/APPEALS-44441. fixed the route and tests

* Change route

* Change variables to match front and back end

* CustomSeed Jest test fix

* Fix issues

* Fix rubocop issues

* Use existing method in the controller

---------

Co-authored-by: Christopher Detlef <>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Michael Beard <michael.beard@va.gov>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 (#21566)

* Fixed rspec failures on constants

* APPEALS-45531. Remove dead code

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Updated lever history to handle null unit values from docket levers (#21567)

Co-authored-by: 631966 <amy.detwiler@va.gov>

* Sharsha/appeals 45531_1 (#21573)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 1 (#21609)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

* TEST FOR FIX

* MORE TESTING

* Fixed rspec issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45502. Organize route and fix the controller (#21595)

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Ricky/APPEALS-36345.fixes (#21612)

* Updated lever history to handle null unit values from docket levers

* Updated member view of exclusion table with proper text display and fixed missing css

* Updated unit test and test data to test rendering of exclusionTable

---------

Co-authored-by: 631966 <amy.detwiler@va.gov>

* ricky/APPEALS-44053 (#21587)

* init commit, adds conditional to check for docket_type ama to method, fixes json constants to snakecase

* puts statements testing

* updates seeds for evidence_submission, adds method to hearing_request_docket.rb and dist_concern.rb

* updated appeals dsit

* final fix for PR

* updates spec to reflect changes in hearing_request_docket

* uncomments seeds

* Ricky/appeals 43523 (#21649)

* Added Assignment Queue link to Switch Users test page

* Updated controller to validate role and redirect

* Updated error information

* Updated rspec tests

---------

Co-authored-by: 631068 <rickybmanus@gmail.com>

* APPEALS-45898. Updated the lever_group_order values (#21639)

* APPEALS-45898. Updated the lever_group_order values

* APPEALS-45898. Updated order of the evidence submission priority and non-priority

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-40646 (#21645)

* Init commit

* adds methods and useffect first pass

* fixes isIdle warning

* removes important from scss

* refined handleToggleChange method

* updates font color for h4

* adds keys to the td and fixed proptype for loadAcdExcludeFromAffinity in casedistributionapp

* Chrisbdetlef/appeals 43117.cleanup (#21671)

* APPEALS-43421: Attorney Selection Sticking on Dropdown after Assignment (#21401)

* redo init commit

* updated imp. logic

* attorney widget fix

---------

Co-authored-by: Calvin <Calvin.Costa@va.gov>

* Add ruby CE API Gem

* remove correspondence changes from schema.rb (#21468)

* Revert "Add ruby CE API Gem" (#21479)

This reverts commit c78afe3.

* Override SCT Bulk Assign Page task limit (#21465)

* Override SCT Bulk Assign Queue 15 case limit & Adjust SCT attorney assign task action label

* feature/APPEALS-35707-29633-29632 (prodtest) (#21485)

* 🔀 Squash merge AlecK/APPEALS-35707 - Replace `database_cleaner` with `database_cleaner-active_record`

* 🔀 Squash merge jcroteau/APPEALS-29632-fix-deprecation-action-view-base-instances

* 🔀 Squash merge jcroteau/APPEALS-29633-fix-deprecation-warning-active_record-result-to_hash

* feature/APPEALS-44871 Steps for installing node in the Caseflow demo environment  (#21483) (#21484)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Revert "feature/APPEALS-44871 Steps for installing node in the Caseflow demo …" (#21489)

This reverts commit a626200.

* Sbashamoni/appeals 44871 node14 demo fixes (#21490) (#21495)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* add error rules to demo builds (#21496) (#21498)

Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>

* APPEALS-43117 Add QA Users for testing

* Fix rspecs

* Fix issues with attorneys and judge teams

* Fix org count

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: youfoundmanesh <maneshreddy.kommidi@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>
Co-authored-by: Christopher Detlef <>

* Minor fixes (#21694)

* Minor fixes

* Fix rspec tests and properly check for judge css id

* Fix lint issue

---------

Co-authored-by: Christopher Detlef <>

* Fix Legacy Case issues (#21747)

Co-authored-by: Christopher Detlef <>

* APPEALS-46037. Fix padding in the lever history table (#21725)

* APPEALS-46037. Fix padding in the lever history table

* APPEALS-46037. Fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Fix Lauren Roth issue (#21813)

* Users with a VACOLS::Staff entry no longer get created with the default name of Lauren Roth

Co-authored-by: Christopher Detlef <>

* ricky/APPEALS-44044 (#21814)

* first pass at legacy_docket method and spec

* second iteration of legacy_docket and spec

* adds method to age_of_oldest methods and updates test scenarios

* Updated testing and expanded method missing logic

* Updated legacy_docket_spec file and tests

* Updated boolean logic, updated rspecs and factories

* Updated rspec tests to include factories

* updates docket_spec line 317 and factory for disable_ama_non_priority_direct_review

---------

Co-authored-by: Michael Beard <michael.beard@va.gov>

* updates ready_priority_nonpriority_appeals to public_send, updates test (#21844)

* APPEALS-36333 first iteration of docket time goal and prior to goal (#21523)

* APPEALS-36333 first iteration of docket time goal and prior to goal

* APPEALS-36333 address pr comments and moved the logic to docket model

* APPEALS-36333 Added specs for docket and hearing request docket models

* refactored code and moved it to distribution scopes

* APPEALS-36333 address pr comments and refactor code

* APPEALS-43996 updated lever name in all the required files to fix spec failures

* APPEALS-44000 revert hearing request docket model changes to keept it in sync with feature

* APPEALS-44000 updated hearing request docket model specs

* APPEALS-44000 fixed jest tests

* APPEALS-44000 fixed broken rspecs

* APPEALS-43996 fix rubocop warnings

* APPEALS-43996 fix push priority job spec failures

* APPEALS-43996 Updated case distribution lever and docker model and refactor specs

* APPEALS-43996 added rake task to update case distribution lever item in db

* APPEALS-43996 update docket model to handle the scenario when the lever being disabled by a user via the UI

* APPEALS-43996 update section title

* APPEALS-43996 revert rake task

* APPEALS-43996 add new factories to case distribution lever and fix spec failures

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks (#21834)

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks

* APPEALS-45191. Refactor and fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* refactor the logic and fix docket spec failures

* changed the call times to 3 times

* APPEALS-36333 fixed the docket time goal to check the existence of the item before using the public send to get the value

---------

Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: 631966 <amy.detwiler@va.gov>

* updated the seeds to align with the work completed

* Updated Toggle Switch behavior when clicked while idle (#21874)

* Csv research (#21892)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

* csv and etc

* CSS for buttons

* jest tests for the reducer and action types

* Jest test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-46057. CleanUP (#21914)

* more jest tests

* Disable scenario seeds

* Lint fixes

* APPEALS-46057. disable all scenario seeds

* APPEALS-46057. Refactor the TestSeed wrapper to be a functional component and fixed jest test

* APPEALS-46057. Jest job in GHA complaining on test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* updates line of test to correctly build lever item (#21918)

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45191. Updated the query to return the date based on the calculation (#21928)

* APPEALS-45191. Updated the query to return the date based on the calculation

* APPEALS-45191. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisharsha/appeals 43962 (#21929)

* Sharsha/appeals-44911_1 (#21784)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisbdetlef/appeals 44910 (#21838)

* Initial

* Add JSON parsing and multiple calls to rake tasks

* Pre-caby tets

* Add capybara tests and add IDs to buttons

---------

Co-authored-by: Christopher Detlef <>

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: cdetlefva <133903625+cdetlefva@users.noreply.github.com>

* APPEALS-43962. Lint fixes (#21932)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Ricky/APPEALS-47293 (#21925)

* First pass implementation of fixing seeding rspecs

* Second pass at fixing errors in rspecs

* Revert updates to test if rspec passes

* Fixed linting issues in test_docket_seeds_controller_spec

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-48292 updated the column to be a string (#21954)

* APPEALS-48292 updated the column to be a string

* APPEALS-48292 added comment to the control_group field in the migration

* APPEALS-48292 added column comment to the schema, changed migration so that it can be rolled back

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false (#21948)

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false

* APPEALS-49004 added spec to check when Start Distribution Prior to Docket Time Goal toggle is on

* APPEALS-49004 fixed lint issues in docket.rb

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query (#21949)

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query

* APPEALS-48898. Renamed the column and update the method

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-49100. getting value from the start_distribution_prior_to_goal (#21968)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-46257 (#21976)

* updates routes and frontend urls to namespace

* removes superfluous <a> tags

* Ensure that legacy appeals are being created (#21981)

* Ensure that legacy appeals are being created

* Remove puts

---------

Co-authored-by: Christopher Detlef <>

* APPEALS-49403. Added buttons Docket Lever Seed (#21989)

* APPEALS-49403. Added buttons Docket Lever Seed

* sharsha/APPEALS-49403. Updated the endpoint URL path

* APPEALS-49403. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-44000 added check to skip priority appeals in docket model (#21992)

* Feature/appeals 36234 masterupgrade (#22003)

* sbashamoni/APPEALS-43724 Node 16 version upgrade changes (#21966) (#21975)

* Update node verstion to 16 in git workflow

* Update node verstion to 16 in nvm and dockerfile for demo

* Update node version in yarn.lock and package.json and .nvmrc file

* Update node's version path to node16 in docker-bin/env.sh

* Update and upgrade to node16 in client

* More updates to yarn.lock and package.json

* Fix tests by Adam Shaw

* Upadate snapshot for ScheduleVeteran.test.js.snap

* Doing some code clean up

* Doiing some more clean up

* Add and remove spaces to match master

* One more space to take care of

* One more space to take care of again

* One more space to take care of again

---------

Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* init master merge branch

---------

Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* Remove AOD trait from non-priority legacy appeal creation (#22013)

Co-authored-by: Christopher Detlef <>

* Sharsha/appeals 49461 (#22018)

* sharsha/APPEALS-49461. initial commit

* sharsha/APPEALS-49461. fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49421 (#22014)

* init commit fixes ama_np_ capybara test to expect user as admin, and first attempt  test_docket_seeds test

* removes previous chane for TASKS_LOADED

* fixes capybara for test seeds controller button ids

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-49403. Updated the buttons label (#22025)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49585 (#22020)

* init commit for non member view input

* fixes css issue for docket-lever-right

* Added a hyphen between value and unit for member only view

* replaces hyphen with comma

---------

Co-authored-by: Blake Manus <33578594+Blake-Manus@users.noreply.github.com>
Co-authored-by: sbashamoni <SampathKumar.Bashamoni@va.gov>
Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: Michael Beard <131783726+mbeardy@users.noreply.github.com>
Co-authored-by: cdetlefva <133903625+cdetlefva@users.noreply.github.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Michael Beard <michael.beard@va.gov>
Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
Co-authored-by: 631068 <rickybmanus@gmail.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: youfoundmanesh <maneshreddy.kommidi@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>
Co-authored-by: kristeja <112115264+kristeja@users.noreply.github.com>
Co-authored-by: Craig Reese <Reese_Craig@bah.com>
Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>
Co-authored-by: Matt Roth <roth_matthew@bah.com>
amybids added a commit that referenced this pull request Jun 28, 2024
* APPEALS-36339 (#21436)

* Updated to remove obsolete levers of ACD Disable Legacy Distributions and ACD Disable Non-priority Distributions

* Fixed redundant linting issue

* Fixed empty line linting issue

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* mbeard/APPEALS-44379 (#21451)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44417 Seeds for Docket Lever Demo (#21534)

Co-authored-by: Christopher Detlef <>

* APPEALS-36345-updated (#21537)

* Refactored exclusion table

* Fixed ordering issue and testing

* mbeard/APPEALS-44379 (#21530)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

* first new commit with new args

* updates methods and test query

* updates age_of_oldest methods params

* cleans up method removes args and updates tests, fixes linting

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44346 Demo Docket Goal Lever Test Seed Data (#21524)

Co-authored-by: Christopher Detlef <>

* Chrisbdetlef/appeals 40705 (#21535)

* Chris backend Work

* APPEALS-44441. Added initial changes for individual seed

* WIP

* APPEALS-44441. Fixed the table css

* APPEALS-44441. Added Custom and Scenario Seed components and jest tests

* APPEALS-44441. Fix ScenarioSeeds jest test

* APPEALS-44441. Fix CustomeSeeds Jest test

* init commit

* fixes linting issues

* capybara test init

* APPEALS-44441. Backend Integration API changes

* APPEALS-44441_1. Matched the constant keys in the backend

* APPEALS-44441_1. Update the param to match the backend and fixed spec

* APPEALS-44441. lint fixes

* APPEALS-44441. linting fixes

* sharsha/APPEALS-44441. fixed the route and tests

* Change route

* Change variables to match front and back end

* CustomSeed Jest test fix

* Fix issues

* Fix rubocop issues

* Use existing method in the controller

---------

Co-authored-by: Christopher Detlef <>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Michael Beard <michael.beard@va.gov>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 (#21566)

* Fixed rspec failures on constants

* APPEALS-45531. Remove dead code

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Updated lever history to handle null unit values from docket levers (#21567)

Co-authored-by: 631966 <amy.detwiler@va.gov>

* Sharsha/appeals 45531_1 (#21573)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 1 (#21609)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

* TEST FOR FIX

* MORE TESTING

* Fixed rspec issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45502. Organize route and fix the controller (#21595)

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Ricky/APPEALS-36345.fixes (#21612)

* Updated lever history to handle null unit values from docket levers

* Updated member view of exclusion table with proper text display and fixed missing css

* Updated unit test and test data to test rendering of exclusionTable

---------

Co-authored-by: 631966 <amy.detwiler@va.gov>

* ricky/APPEALS-44053 (#21587)

* init commit, adds conditional to check for docket_type ama to method, fixes json constants to snakecase

* puts statements testing

* updates seeds for evidence_submission, adds method to hearing_request_docket.rb and dist_concern.rb

* updated appeals dsit

* final fix for PR

* updates spec to reflect changes in hearing_request_docket

* uncomments seeds

* Ricky/appeals 43523 (#21649)

* Added Assignment Queue link to Switch Users test page

* Updated controller to validate role and redirect

* Updated error information

* Updated rspec tests

---------

Co-authored-by: 631068 <rickybmanus@gmail.com>

* APPEALS-45898. Updated the lever_group_order values (#21639)

* APPEALS-45898. Updated the lever_group_order values

* APPEALS-45898. Updated order of the evidence submission priority and non-priority

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-40646 (#21645)

* Init commit

* adds methods and useffect first pass

* fixes isIdle warning

* removes important from scss

* refined handleToggleChange method

* updates font color for h4

* adds keys to the td and fixed proptype for loadAcdExcludeFromAffinity in casedistributionapp

* Chrisbdetlef/appeals 43117.cleanup (#21671)

* APPEALS-43421: Attorney Selection Sticking on Dropdown after Assignment (#21401)

* redo init commit

* updated imp. logic

* attorney widget fix

---------

Co-authored-by: Calvin <Calvin.Costa@va.gov>

* Add ruby CE API Gem

* remove correspondence changes from schema.rb (#21468)

* Revert "Add ruby CE API Gem" (#21479)

This reverts commit c78afe3.

* Override SCT Bulk Assign Page task limit (#21465)

* Override SCT Bulk Assign Queue 15 case limit & Adjust SCT attorney assign task action label

* feature/APPEALS-35707-29633-29632 (prodtest) (#21485)

* 🔀 Squash merge AlecK/APPEALS-35707 - Replace `database_cleaner` with `database_cleaner-active_record`

* 🔀 Squash merge jcroteau/APPEALS-29632-fix-deprecation-action-view-base-instances

* 🔀 Squash merge jcroteau/APPEALS-29633-fix-deprecation-warning-active_record-result-to_hash

* feature/APPEALS-44871 Steps for installing node in the Caseflow demo environment  (#21483) (#21484)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Revert "feature/APPEALS-44871 Steps for installing node in the Caseflow demo …" (#21489)

This reverts commit a626200.

* Sbashamoni/appeals 44871 node14 demo fixes (#21490) (#21495)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* add error rules to demo builds (#21496) (#21498)

Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>

* APPEALS-43117 Add QA Users for testing

* Fix rspecs

* Fix issues with attorneys and judge teams

* Fix org count

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: youfoundmanesh <maneshreddy.kommidi@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>
Co-authored-by: Christopher Detlef <>

* Minor fixes (#21694)

* Minor fixes

* Fix rspec tests and properly check for judge css id

* Fix lint issue

---------

Co-authored-by: Christopher Detlef <>

* Fix Legacy Case issues (#21747)

Co-authored-by: Christopher Detlef <>

* APPEALS-46037. Fix padding in the lever history table (#21725)

* APPEALS-46037. Fix padding in the lever history table

* APPEALS-46037. Fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Fix Lauren Roth issue (#21813)

* Users with a VACOLS::Staff entry no longer get created with the default name of Lauren Roth

Co-authored-by: Christopher Detlef <>

* ricky/APPEALS-44044 (#21814)

* first pass at legacy_docket method and spec

* second iteration of legacy_docket and spec

* adds method to age_of_oldest methods and updates test scenarios

* Updated testing and expanded method missing logic

* Updated legacy_docket_spec file and tests

* Updated boolean logic, updated rspecs and factories

* Updated rspec tests to include factories

* updates docket_spec line 317 and factory for disable_ama_non_priority_direct_review

---------

Co-authored-by: Michael Beard <michael.beard@va.gov>

* updates ready_priority_nonpriority_appeals to public_send, updates test (#21844)

* APPEALS-36333 first iteration of docket time goal and prior to goal (#21523)

* APPEALS-36333 first iteration of docket time goal and prior to goal

* APPEALS-36333 address pr comments and moved the logic to docket model

* APPEALS-36333 Added specs for docket and hearing request docket models

* refactored code and moved it to distribution scopes

* APPEALS-36333 address pr comments and refactor code

* APPEALS-43996 updated lever name in all the required files to fix spec failures

* APPEALS-44000 revert hearing request docket model changes to keept it in sync with feature

* APPEALS-44000 updated hearing request docket model specs

* APPEALS-44000 fixed jest tests

* APPEALS-44000 fixed broken rspecs

* APPEALS-43996 fix rubocop warnings

* APPEALS-43996 fix push priority job spec failures

* APPEALS-43996 Updated case distribution lever and docker model and refactor specs

* APPEALS-43996 added rake task to update case distribution lever item in db

* APPEALS-43996 update docket model to handle the scenario when the lever being disabled by a user via the UI

* APPEALS-43996 update section title

* APPEALS-43996 revert rake task

* APPEALS-43996 add new factories to case distribution lever and fix spec failures

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks (#21834)

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks

* APPEALS-45191. Refactor and fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* refactor the logic and fix docket spec failures

* changed the call times to 3 times

* APPEALS-36333 fixed the docket time goal to check the existence of the item before using the public send to get the value

---------

Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: 631966 <amy.detwiler@va.gov>

* updated the seeds to align with the work completed

* Updated Toggle Switch behavior when clicked while idle (#21874)

* Csv research (#21892)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

* csv and etc

* CSS for buttons

* jest tests for the reducer and action types

* Jest test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-46057. CleanUP (#21914)

* more jest tests

* Disable scenario seeds

* Lint fixes

* APPEALS-46057. disable all scenario seeds

* APPEALS-46057. Refactor the TestSeed wrapper to be a functional component and fixed jest test

* APPEALS-46057. Jest job in GHA complaining on test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* updates line of test to correctly build lever item (#21918)

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45191. Updated the query to return the date based on the calculation (#21928)

* APPEALS-45191. Updated the query to return the date based on the calculation

* APPEALS-45191. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisharsha/appeals 43962 (#21929)

* Sharsha/appeals-44911_1 (#21784)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisbdetlef/appeals 44910 (#21838)

* Initial

* Add JSON parsing and multiple calls to rake tasks

* Pre-caby tets

* Add capybara tests and add IDs to buttons

---------

Co-authored-by: Christopher Detlef <>

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: cdetlefva <133903625+cdetlefva@users.noreply.github.com>

* APPEALS-43962. Lint fixes (#21932)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Ricky/APPEALS-47293 (#21925)

* First pass implementation of fixing seeding rspecs

* Second pass at fixing errors in rspecs

* Revert updates to test if rspec passes

* Fixed linting issues in test_docket_seeds_controller_spec

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-48292 updated the column to be a string (#21954)

* APPEALS-48292 updated the column to be a string

* APPEALS-48292 added comment to the control_group field in the migration

* APPEALS-48292 added column comment to the schema, changed migration so that it can be rolled back

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false (#21948)

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false

* APPEALS-49004 added spec to check when Start Distribution Prior to Docket Time Goal toggle is on

* APPEALS-49004 fixed lint issues in docket.rb

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query (#21949)

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query

* APPEALS-48898. Renamed the column and update the method

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-49100. getting value from the start_distribution_prior_to_goal (#21968)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-46257 (#21976)

* updates routes and frontend urls to namespace

* removes superfluous <a> tags

* Ensure that legacy appeals are being created (#21981)

* Ensure that legacy appeals are being created

* Remove puts

---------

Co-authored-by: Christopher Detlef <>

* APPEALS-49403. Added buttons Docket Lever Seed (#21989)

* APPEALS-49403. Added buttons Docket Lever Seed

* sharsha/APPEALS-49403. Updated the endpoint URL path

* APPEALS-49403. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-44000 added check to skip priority appeals in docket model (#21992)

* Feature/appeals 36234 masterupgrade (#22003)

* sbashamoni/APPEALS-43724 Node 16 version upgrade changes (#21966) (#21975)

* Update node verstion to 16 in git workflow

* Update node verstion to 16 in nvm and dockerfile for demo

* Update node version in yarn.lock and package.json and .nvmrc file

* Update node's version path to node16 in docker-bin/env.sh

* Update and upgrade to node16 in client

* More updates to yarn.lock and package.json

* Fix tests by Adam Shaw

* Upadate snapshot for ScheduleVeteran.test.js.snap

* Doing some code clean up

* Doiing some more clean up

* Add and remove spaces to match master

* One more space to take care of

* One more space to take care of again

* One more space to take care of again

---------

Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* init master merge branch

---------

Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* Remove AOD trait from non-priority legacy appeal creation (#22013)

Co-authored-by: Christopher Detlef <>

* Sharsha/appeals 49461 (#22018)

* sharsha/APPEALS-49461. initial commit

* sharsha/APPEALS-49461. fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49421 (#22014)

* init commit fixes ama_np_ capybara test to expect user as admin, and first attempt  test_docket_seeds test

* removes previous chane for TASKS_LOADED

* fixes capybara for test seeds controller button ids

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-49403. Updated the buttons label (#22025)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49585 (#22020)

* init commit for non member view input

* fixes css issue for docket-lever-right

* Added a hyphen between value and unit for member only view

* replaces hyphen with comma

* Init commit replaces th with div for 508 compliance (#22036)

* Chrisbdetlef/appeals 47008 1 (#22040)

* Allow judges to see legacy cases and attorneys to be assigned cases

* Remove testing function

* Update spec to reflect new user count in seed file

---------

Co-authored-by: Christopher Detlef <>

* got rid of extraneous file

* got rid of yarn lock orig

---------

Co-authored-by: Blake Manus <33578594+Blake-Manus@users.noreply.github.com>
Co-authored-by: sbashamoni <SampathKumar.Bashamoni@va.gov>
Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: Michael Beard <131783726+mbeardy@users.noreply.github.com>
Co-authored-by: cdetlefva <133903625+cdetlefva@users.noreply.github.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Michael Beard <michael.beard@va.gov>
Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
Co-authored-by: 631068 <rickybmanus@gmail.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: youfoundmanesh <maneshreddy.kommidi@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>
Co-authored-by: kristeja <112115264+kristeja@users.noreply.github.com>
Co-authored-by: Craig Reese <Reese_Craig@bah.com>
Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>
Co-authored-by: Matt Roth <roth_matthew@bah.com>
amybids added a commit that referenced this pull request Jul 3, 2024
* APPEALS-36339 (#21436)

* Updated to remove obsolete levers of ACD Disable Legacy Distributions and ACD Disable Non-priority Distributions

* Fixed redundant linting issue

* Fixed empty line linting issue

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* mbeard/APPEALS-44379 (#21451)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44417 Seeds for Docket Lever Demo (#21534)

Co-authored-by: Christopher Detlef <>

* APPEALS-36345-updated (#21537)

* Refactored exclusion table

* Fixed ordering issue and testing

* mbeard/APPEALS-44379 (#21530)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

* first new commit with new args

* updates methods and test query

* updates age_of_oldest methods params

* cleans up method removes args and updates tests, fixes linting

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44346 Demo Docket Goal Lever Test Seed Data (#21524)

Co-authored-by: Christopher Detlef <>

* Chrisbdetlef/appeals 40705 (#21535)

* Chris backend Work

* APPEALS-44441. Added initial changes for individual seed

* WIP

* APPEALS-44441. Fixed the table css

* APPEALS-44441. Added Custom and Scenario Seed components and jest tests

* APPEALS-44441. Fix ScenarioSeeds jest test

* APPEALS-44441. Fix CustomeSeeds Jest test

* init commit

* fixes linting issues

* capybara test init

* APPEALS-44441. Backend Integration API changes

* APPEALS-44441_1. Matched the constant keys in the backend

* APPEALS-44441_1. Update the param to match the backend and fixed spec

* APPEALS-44441. lint fixes

* APPEALS-44441. linting fixes

* sharsha/APPEALS-44441. fixed the route and tests

* Change route

* Change variables to match front and back end

* CustomSeed Jest test fix

* Fix issues

* Fix rubocop issues

* Use existing method in the controller

---------

Co-authored-by: Christopher Detlef <>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Michael Beard <michael.beard@va.gov>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 (#21566)

* Fixed rspec failures on constants

* APPEALS-45531. Remove dead code

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Updated lever history to handle null unit values from docket levers (#21567)

Co-authored-by: 631966 <amy.detwiler@va.gov>

* Sharsha/appeals 45531_1 (#21573)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 1 (#21609)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

* TEST FOR FIX

* MORE TESTING

* Fixed rspec issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45502. Organize route and fix the controller (#21595)

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Ricky/APPEALS-36345.fixes (#21612)

* Updated lever history to handle null unit values from docket levers

* Updated member view of exclusion table with proper text display and fixed missing css

* Updated unit test and test data to test rendering of exclusionTable

---------

Co-authored-by: 631966 <amy.detwiler@va.gov>

* ricky/APPEALS-44053 (#21587)

* init commit, adds conditional to check for docket_type ama to method, fixes json constants to snakecase

* puts statements testing

* updates seeds for evidence_submission, adds method to hearing_request_docket.rb and dist_concern.rb

* updated appeals dsit

* final fix for PR

* updates spec to reflect changes in hearing_request_docket

* uncomments seeds

* Ricky/appeals 43523 (#21649)

* Added Assignment Queue link to Switch Users test page

* Updated controller to validate role and redirect

* Updated error information

* Updated rspec tests

---------

Co-authored-by: 631068 <rickybmanus@gmail.com>

* APPEALS-45898. Updated the lever_group_order values (#21639)

* APPEALS-45898. Updated the lever_group_order values

* APPEALS-45898. Updated order of the evidence submission priority and non-priority

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-40646 (#21645)

* Init commit

* adds methods and useffect first pass

* fixes isIdle warning

* removes important from scss

* refined handleToggleChange method

* updates font color for h4

* adds keys to the td and fixed proptype for loadAcdExcludeFromAffinity in casedistributionapp

* Chrisbdetlef/appeals 43117.cleanup (#21671)

* APPEALS-43421: Attorney Selection Sticking on Dropdown after Assignment (#21401)

* redo init commit

* updated imp. logic

* attorney widget fix

---------

Co-authored-by: Calvin <Calvin.Costa@va.gov>

* Add ruby CE API Gem

* remove correspondence changes from schema.rb (#21468)

* Revert "Add ruby CE API Gem" (#21479)

This reverts commit c78afe30620716d59d2ac31ad6eed71585d78a98.

* Override SCT Bulk Assign Page task limit (#21465)

* Override SCT Bulk Assign Queue 15 case limit & Adjust SCT attorney assign task action label

* feature/APPEALS-35707-29633-29632 (prodtest) (#21485)

* 🔀 Squash merge AlecK/APPEALS-35707 - Replace `database_cleaner` with `database_cleaner-active_record`

* 🔀 Squash merge jcroteau/APPEALS-29632-fix-deprecation-action-view-base-instances

* 🔀 Squash merge jcroteau/APPEALS-29633-fix-deprecation-warning-active_record-result-to_hash

* feature/APPEALS-44871 Steps for installing node in the Caseflow demo environment  (#21483) (#21484)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Revert "feature/APPEALS-44871 Steps for installing node in the Caseflow demo …" (#21489)

This reverts commit a6262001f9bedabca60598c82bfe1b803f0f16c7.

* Sbashamoni/appeals 44871 node14 demo fixes (#21490) (#21495)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* add error rules to demo builds (#21496) (#21498)

Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>

* APPEALS-43117 Add QA Users for testing

* Fix rspecs

* Fix issues with attorneys and judge teams

* Fix org count

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: youfoundmanesh <maneshreddy.kommidi@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>
Co-authored-by: Christopher Detlef <>

* Minor fixes (#21694)

* Minor fixes

* Fix rspec tests and properly check for judge css id

* Fix lint issue

---------

Co-authored-by: Christopher Detlef <>

* Fix Legacy Case issues (#21747)

Co-authored-by: Christopher Detlef <>

* APPEALS-46037. Fix padding in the lever history table (#21725)

* APPEALS-46037. Fix padding in the lever history table

* APPEALS-46037. Fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Fix Lauren Roth issue (#21813)

* Users with a VACOLS::Staff entry no longer get created with the default name of Lauren Roth

Co-authored-by: Christopher Detlef <>

* ricky/APPEALS-44044 (#21814)

* first pass at legacy_docket method and spec

* second iteration of legacy_docket and spec

* adds method to age_of_oldest methods and updates test scenarios

* Updated testing and expanded method missing logic

* Updated legacy_docket_spec file and tests

* Updated boolean logic, updated rspecs and factories

* Updated rspec tests to include factories

* updates docket_spec line 317 and factory for disable_ama_non_priority_direct_review

---------

Co-authored-by: Michael Beard <michael.beard@va.gov>

* updates ready_priority_nonpriority_appeals to public_send, updates test (#21844)

* APPEALS-36333 first iteration of docket time goal and prior to goal (#21523)

* APPEALS-36333 first iteration of docket time goal and prior to goal

* APPEALS-36333 address pr comments and moved the logic to docket model

* APPEALS-36333 Added specs for docket and hearing request docket models

* refactored code and moved it to distribution scopes

* APPEALS-36333 address pr comments and refactor code

* APPEALS-43996 updated lever name in all the required files to fix spec failures

* APPEALS-44000 revert hearing request docket model changes to keept it in sync with feature

* APPEALS-44000 updated hearing request docket model specs

* APPEALS-44000 fixed jest tests

* APPEALS-44000 fixed broken rspecs

* APPEALS-43996 fix rubocop warnings

* APPEALS-43996 fix push priority job spec failures

* APPEALS-43996 Updated case distribution lever and docker model and refactor specs

* APPEALS-43996 added rake task to update case distribution lever item in db

* APPEALS-43996 update docket model to handle the scenario when the lever being disabled by a user via the UI

* APPEALS-43996 update section title

* APPEALS-43996 revert rake task

* APPEALS-43996 add new factories to case distribution lever and fix spec failures

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks (#21834)

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks

* APPEALS-45191. Refactor and fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* refactor the logic and fix docket spec failures

* changed the call times to 3 times

* APPEALS-36333 fixed the docket time goal to check the existence of the item before using the public send to get the value

---------

Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: 631966 <amy.detwiler@va.gov>

* updated the seeds to align with the work completed

* Updated Toggle Switch behavior when clicked while idle (#21874)

* Csv research (#21892)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

* csv and etc

* CSS for buttons

* jest tests for the reducer and action types

* Jest test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-46057. CleanUP (#21914)

* more jest tests

* Disable scenario seeds

* Lint fixes

* APPEALS-46057. disable all scenario seeds

* APPEALS-46057. Refactor the TestSeed wrapper to be a functional component and fixed jest test

* APPEALS-46057. Jest job in GHA complaining on test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* updates line of test to correctly build lever item (#21918)

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45191. Updated the query to return the date based on the calculation (#21928)

* APPEALS-45191. Updated the query to return the date based on the calculation

* APPEALS-45191. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisharsha/appeals 43962 (#21929)

* Sharsha/appeals-44911_1 (#21784)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisbdetlef/appeals 44910 (#21838)

* Initial

* Add JSON parsing and multiple calls to rake tasks

* Pre-caby tets

* Add capybara tests and add IDs to buttons

---------

Co-authored-by: Christopher Detlef <>

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: cdetlefva <133903625+cdetlefva@users.noreply.github.com>

* APPEALS-43962. Lint fixes (#21932)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Ricky/APPEALS-47293 (#21925)

* First pass implementation of fixing seeding rspecs

* Second pass at fixing errors in rspecs

* Revert updates to test if rspec passes

* Fixed linting issues in test_docket_seeds_controller_spec

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-48292 updated the column to be a string (#21954)

* APPEALS-48292 updated the column to be a string

* APPEALS-48292 added comment to the control_group field in the migration

* APPEALS-48292 added column comment to the schema, changed migration so that it can be rolled back

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false (#21948)

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false

* APPEALS-49004 added spec to check when Start Distribution Prior to Docket Time Goal toggle is on

* APPEALS-49004 fixed lint issues in docket.rb

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query (#21949)

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query

* APPEALS-48898. Renamed the column and update the method

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-49100. getting value from the start_distribution_prior_to_goal (#21968)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-46257 (#21976)

* updates routes and frontend urls to namespace

* removes superfluous <a> tags

* Ensure that legacy appeals are being created (#21981)

* Ensure that legacy appeals are being created

* Remove puts

---------

Co-authored-by: Christopher Detlef <>

* APPEALS-49403. Added buttons Docket Lever Seed (#21989)

* APPEALS-49403. Added buttons Docket Lever Seed

* sharsha/APPEALS-49403. Updated the endpoint URL path

* APPEALS-49403. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-44000 added check to skip priority appeals in docket model (#21992)

* Feature/appeals 36234 masterupgrade (#22003)

* sbashamoni/APPEALS-43724 Node 16 version upgrade changes (#21966) (#21975)

* Update node verstion to 16 in git workflow

* Update node verstion to 16 in nvm and dockerfile for demo

* Update node version in yarn.lock and package.json and .nvmrc file

* Update node's version path to node16 in docker-bin/env.sh

* Update and upgrade to node16 in client

* More updates to yarn.lock and package.json

* Fix tests by Adam Shaw

* Upadate snapshot for ScheduleVeteran.test.js.snap

* Doing some code clean up

* Doiing some more clean up

* Add and remove spaces to match master

* One more space to take care of

* One more space to take care of again

* One more space to take care of again

---------

Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* init master merge branch

---------

Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* Remove AOD trait from non-priority legacy appeal creation (#22013)

Co-authored-by: Christopher Detlef <>

* Sharsha/appeals 49461 (#22018)

* sharsha/APPEALS-49461. initial commit

* sharsha/APPEALS-49461. fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49421 (#22014)

* init commit fixes ama_np_ capybara test to expect user as admin, and first attempt  test_docket_seeds test

* removes previous chane for TASKS_LOADED

* fixes capybara for test seeds controller button ids

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-49403. Updated the buttons label (#22025)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49585 (#22020)

* init commit for non member view input

* fixes css issue for docket-lever-right

* Added a hyphen between value and unit for member only view

* replaces hyphen with comma

* Init commit replaces th with div for 508 compliance (#22036)

* Chrisbdetlef/appeals 47008 1 (#22040)

* Allow judges to see legacy cases and attorneys to be assigned cases

* Remove testing function

* Update spec to reflect new user count in seed file

---------

Co-authored-by: Christopher Detlef <>

* got rid of extraneous file

* got rid of yarn lock orig

* APPEALS-50734. Remove Legacy appeals from the query (#22071)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-46087 fix css table width issues for case distribution lever history table (#22024)

* Feature/appeals 36234.merge master.20240701 (#22075)

* APPEALS-47277 remove Vegas office (#21876)

* APPEALS-47277 remove Vagas office

* Removed Texas ID from other files and updated tests

* Snapshot update

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* hotfix/APPEALS-22403 (#21942)

* add identifier for filenumber or ssn in filenumber search

* linting

* codeclimate linting

* update match call to return boolean

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* APPEALS-46907: Update to Determination of Gen Pop Legacy Cases (#21986)

* Isaiah/merge 46910 (#21983)

* removed BFHINES checks and modified tests

* removed lingering bfhines test

* modified test

* most recent updates on tests for passing status

* removed refs to cavc updates

* Skip flaky test ro_viewhearsched_spec

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* APPEALS-44916: Case Distribution Affinity Calculations (#21899)

* APPEALS-44956: Add AppealAffinity model and database table (#21526)

* add migration for appeal_affinities

* add AppealAffinity model and associations, update migration for new column

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

* add new job, update affinity model validation and after save hook

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

* add return in job if no query results, tests for no query results

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

* remove comment, fix hearing factory, disable some seeds for testing

* add more tests

* test refactor

* update appeals for dist query to add affinity start, add seed file, fix hearing factory, add stat to dist factory

* disable new seed on reset

* update seed file with vet names, add another seed category

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* APPEALS-44959: Modify affinity date checks to use appeal_affinity (#21611)

* swap distribution queries from distribution_task to appeal_affinities

* update seed files to use appeal affinities instead of distribution task

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

* fix user seed, fix date format in distribution task instructions

* fix tests for date format update

* Calvin/APPEALS-44957-rake-affinity (#21577)

* grabbed receipt dates from distributed cases

* refactored for functionality + added method to grab appeals that match

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

* if appeal affinity is nil, it will now be updated

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

* updated start date to receipt date instead of Time.now

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

* APPEALS-46016: Add Affinity Start Date to the Explain Page (#21660)

* add affinity start date to explain page

* add feature test to verify dates display

* update rake task and spec (#21731)

* APPEALS-46325: Add Seeds for AOD Appeals and Update Dates to Match CAVC (#21730)

* add aod hearing cases to ama affinity cases seed

* fix lever spec

* APPEALS-45148: Hook to clear saved affinity date (#21623)

* initial imp. idea

* AC1: check for affinity_start_date on assignment

* AC2/3: update affinity start date  w/ instr.

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

* add case dist lever to new tests (#21776)

* remove unnecessarily included module from job (#21827)

* APPEALS-47211: Improve Performance of Distribution Queries (#21840)

* rework ready_for_distribution scope

* fix non-hearing docket distribution bug

* restart tests

* added null checks for appeal affinity in distribution queries, update tests (#21893)

* add check for appeal being active to distribution and associated slack message (#21902)

* Update users_spec.rb

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* hotfix/APPEALS-45177: TaskTable Default Sorting Fix (#21772)

* Updated the TaskTable component to use the defaultSort property instead of the defaultSortIdx property for queue table since that property is not used anywhere. Added a default sorting hash to the UnassignedCasesPage component and now pass that down to TaskTable. Removed references to defaultSortIdx.

* Added the type column default sort to the AssignedCasesPage widget as well.

* Added a parenthesis for clarity around a boolean. Moved the defaultSortingHash out into a constants file.

---------

Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>

* APPEALS-47106 Caseflow Swagger (#21993)

* Add Rswag and convert existing API documentation (#21778)

* add rswag

* Update Gemfile.lock

* Setup yaml UI

* remove and reroute old swagger files

* update format and servers values

* Update route_docs_controller.rb

* Update cmp_controller.rb

* cmp endpoint yaml

* cmp endpoint to return 501

* CMP endpoint swagger flies

* update swagger files

* adjust server order, add auth token

* cmp parameter name change

* add comments

* Update users_controller.rb

* unit tests and linting

* lint fixes

* Update swagger_helper.rb

* APPEALS-48048 Swagger Updates (#21909)

* update servers to not include a host

* remove host for server

* remove generated swaggers from definitions

* remove internal API endpoints from having generated swagger

* IDT servers fixes

* disable CMP swagger in prod and prodtest

* set authorization correctly

* fix what is required for CMP upload

* fix linting issues, update lint rake task to autocorrect for rubocop, add rubocop make command

* Update decision_reviews.yaml

* Update ama_issues.yaml

* Update vacols_issues.yaml

* Update swagger.yaml

* fix check failures

* Update docs_controller_spec.rb

* fix unit tests

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update rswag_ui.rb

* Update lint.rake

* Update decision_reviews_spec.rb

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update veterans_controller_spec.rb

* feature/APPEALS-43597 RC1.5.1 (#21996)

* APPEALS-36759 Add sms_response_content and sms_response_time notifications table

* APPEALS-37003 First pass at job refactor

* APPEALS-37003 Add comments and update kwargs for va notify service

* APPEALS-37003 Update spec files

* APPEALS-37003 Update spec

* APPEALS-37003 Ensure user in job and create email_enabled method

* APPEALS-37003 Remove question mark

* Limit max retry attempts to 5

* Add ? to boolen return methods

* jcohen/APPEALS-43706 (#21444)

* APPEALS-43706 macros added to each model file for the polymorphic relationship to be setup.

* APPEALS-43706 migration made and yet to be run.

* APPEALS-43706 migrations ran and expected columns and indexes are in table.

* Fix some spec failures unrelated to this branch

* Limit schema diff

* Add a missing tab

* Fix more unrelated failures. Also prevent ACD lever seeds from overwriting spec output

* Fix last unrelated failure.

* APPEALS-43706 linting issues in va_notify_service fixed.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* [APPEALS-43598] Quarterly Notification Job refactoring (#21505)

* Quarterly Notification Job refactoring

* APPEALS-43598 Fix lint issues for QuarterlyNotificationsJob refactor

* APPEALS-43598 Fix db schema.rb file

* APPEALS-43598 Fix schema.rb file

* APPEALS-43598 Refactoring QuarterlyNotificationsJob for readability

* APPEALS-43598 Refactoring QuarterlyNotificationsJob and removing extra methods

* [APPEALS-43598] Update method name

---------

Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-44007: Eliminate Transmission of Notifications to Deceased Veterans (#21481)

* APPEALS-44007: Writing tests to ensure adding the 'failure due to deceased' information is properly set and added to the db

* updates to pr

* pushing changes for tonight

* updating spec file to handle enabling and disabling feature flags

* Update format_message_status

* Lint roll

* fixing conflicts

* Updates to send notification spec

* Fix one of the legacy test cases

* Remove accidental push

* Fix remaining test

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-45235: Remove Temporary PDF Files From tmp Directory After All eFolder Upload Attempts (#21557)

* Cleanup files after uploading to VBMS

* Only delete file if it exists

* Resolve linter issue

* Update specs

* Trigger CodeClimate

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Add appeal alias for notifiable

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications (#21575)

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications

* fixing some errors

* updating factory

* updating tests

* updating tests and factory

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-43596 Adding JobMessageDeletionMiddleware to delete SQS messages for certain jobs

* APPEALS-43596 Adding tests

* APPEALS-43596 Fix codeclimate

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables (#21596)

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables

* pushing changes

* updating tests

* rubocop

* rubocop'n

* deleting repeat constants

* removing file in favor of EVENT_TYPE_FILTERS.json

* removing instances of using VA_NOTIFY_TEMPLATE_NAMES and using EVENT_TYPE_FILTERS instead

* replacing all instances of strings with constants

* fixing bug

* rubocop'n

* rubocop'n

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Clean notification_events after notification report specs finish (#21662)

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-43725: Extract `notify_appellant` Call from `QuaterlyNotificationsJob` to Decrease Runtime (#21643)

* Group notification types as scopes

* Add new job

* Fix typo

* Add back batching

* Batch send messages

* Multithread job queueing

* Reconfigure bulk enqueueing to utilize send_notifications.fifo queue

* Update the comment on QuaterlyNotificationsJob#perform

to adhere to the RDoc standard

* Use constants for template name

* Provide a more descriptive var name

* Remove unused env var

* Fix linting issues

* Prevent error from being thrown early in init job

* Add RDoc comments to appeal_state

* Add rdoc comment to init job

* Add another rdoc comment to the init job

* Use a more specific error class whenever an appeal

cannot be located within the init job

* Add a more specific error to CaseflowJob#enqueue_batch_of_jobs

* Add test for SendNotificationJob.queue_name_suffix

* Update QuarterlyNotificationsJob tests

* Update appeal_state_spec.rb to cover new scopes

* Add spec file for NotificationInitializationJob

* Add CaseflowJob specs

* Add CaseflowJob specs

* Address rubocop issue (by ignoring it)

* Kicking off CodeClimate

* Fix some lint issues

* Freeze constant

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Move spec file to proper location

* APPEALS-43599 (#21696)

* APPEALS-43599 Refactoring SendNotificationJob

* APPEALS-43599 Remove comments

* APPEALS-43599 Suppress code smells from reek

* APPEALS-43599 Suppress code smells from reek

* jcohen/APPEALS-43727 (#21589)

* APPEALS-43727 Branch created. Extracted all the 'when' conditions in the case statement within appellant_notification.rb update_appeal_state method.

* APPEALS-43727 appellant_notification_service is created, logic from crowded method in appellant_notificaion.rb placed in newly created file, allowing redability.

* APPEALS-43727 added logic to appeal_state.rb, appellant_notification.rb updated with less logic, readable code through well named methods.

* APPEALS-43727 commit before merge from teammates work

* APPEALS-43727 removed freeze method on default status hash in appeal_state.rb. removed some rubocop disabling in appellant_notificaion.rb

* APPEALS-43727 extracted more logic from the appellant_notification module and placed it into the appeal_state class. Also got rid of rubocop declarations in app_notif and app_state as well. finally removed feature_toggle calls in appell_notif.

* APPEALS-43727 tests passing, code works

* APPEALS-43727 adding tests to appeal_state_spec to test functionality

* APPEALS-43727 rspec tests in appeal_state.

* APPEALS-43727 tests pass.

* Fixing code climate duplicate code issue

* fixing case statement

* code climate things

* rubocop

* APPEALS-43727 work completed.

* APPEALS-43727 PR comments applied. tests not in a working state.

* APPEALS-43727 PR comments applied. appeal_state_spec in working state.

* APPEALS-43727 PR comments applied. appellant_notification_spec.rb all green.

* Adjust spacing of comments in appeal_state.rb

* Utilize #external_id method over ternary

* Swap or conditional for blank?

* Fix another whitespace gap

* APPEALS-43727 PR comments applied. again after reset.

* APPEALS-43727 PR comments applied. flipped conditionals in appeal_state.rb

* Update app/models/concerns/appeal_concern.rb

* APPEALS-43727 code/test edits

* APPEALS-43727 bulk_task_reasssignment_spec reverted to orginal state, with the exception of an expectation that was on line 98

* APPEALS-43727 lint fix

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-46179 (#21712)

* APPEALS-46179 Create JobExecutionTimes table

* APPEALS-46179 Add comment

* APPEALS-46179 Update schema

* APPEALS-46193 (#21753)

* APPEALS-46193 Add record to JobExecutionTime table when job is performed

* APPEALS-46193 Updating JobExecutionTimes table with an upsert query

* APPEALS-46193 Ignore JobExecutionTimes for certain jobs

* APPEALS-46193 Update ignore_job_execution_time? method

* APPEALS-46193 Adding tests

* Fix lint issues

* Update AWS dependencies

* Rollback gem reduction due to UAT issue

* Alter queue priority

* Forward error in SendNotificationJob

* Allow for notification audit records to remain in ProdTest

* Fix spec

* Fix typo in test fixture's name

* Fix lint infraction related to re-raising exceptions

* Address duplication CC error

* Reenable-privacy-mail-notifications (#21859)

* Add conditional for FOIA and Privacy Act mail

task to receives 'Privacy Act Pending' notifications

* Update spec

* Adjust some specs

* Add missing param

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Remove byebug from spec

* Revert queue tweak

* Remove duplicate method

* APPEALS-47382: Refactor Job Behavior Filtering Boolean Methods (#21898)

* initial commit

* refactoring methods to have constants instead of methods

* adding comments back in

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* APPEALS-48342: Prevent Intentional Retries of SendNotificationJobs in ProdTest from Causing Duplicate Notification Table Entries (#21927)

* initial commit

* rubocop'n

* rubcop'n

* fixing tests

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Resolve missed conflict

* MattT/APPEALS-48514 (#21959)

* Prototype of privacy act fix

* Leave privacy act states intact upon decision mailed

* Remove unused param

* Attempt updating specs to cover new behavior

* Fix attr name typo

* Add missing bang

* Skip reek issue

The issue has been deemed to be minor enough to not warrant having to reinvent everything for now.

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix quarterly specs by add in necessary hearings

* Adjust spacing/ordering of gems (#21978)

* MattT/APPEALS-49085 (#21960)

* Filter out appeals whose hearings have been held from hearing_scheduled scope

* Fix whitespace issues

* Fix failing specs caused by an oversight on my part

* Fix lint issue

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-49212 (#21991)

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add step to NightlySyncsJob to sync hearing dispositions and appeal stateS

* Add comment to new method

* Use constant for disposition type

* Fix typo in accessor

* Add spec for new appeal state action

* Create user in top scope

* Expand nighlty syncs job to check all scheduled hearing disposition types.

No show was left off as we don't have a requirement around it yet.

* Add nightly sync job spec

* Add disp task spec

* Add specs targeting the hearings controller

* Add sync script

* Eager load constants

* Add distinct

* Remove appeal_docketed from being reset

* Add script to adjust ama hearing statuses

* Correct mistype

* Add appeal_type clause

* Fix specs

* Lint fixes

* Flip conditionals in specs

* Fix var name

* Fix var

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Backfill addition to script

* Add AppealState record for newly docketed LegacyAppeals (#21999)

* APPEALS-48966 Adding AppealState record for recently docketed appeals

* APPEALS-48966 Refactor code and add comments

* Delete extraneous files

* Revert to using constants value

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix typo

---------

Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Feature/appeals 43597 release candidate (#22004)

* APPEALS-36759 Add sms_response_content and sms_response_time notifications table

* APPEALS-37003 First pass at job refactor

* APPEALS-37003 Add comments and update kwargs for va notify service

* APPEALS-37003 Update spec files

* APPEALS-37003 Update spec

* APPEALS-37003 Ensure user in job and create email_enabled method

* APPEALS-37003 Remove question mark

* Limit max retry attempts to 5

* Add ? to boolen return methods

* jcohen/APPEALS-43706 (#21444)

* APPEALS-43706 macros added to each model file for the polymorphic relationship to be setup.

* APPEALS-43706 migration made and yet to be run.

* APPEALS-43706 migrations ran and expected columns and indexes are in table.

* Fix some spec failures unrelated to this branch

* Limit schema diff

* Add a missing tab

* Fix more unrelated failures. Also prevent ACD lever seeds from overwriting spec output

* Fix last unrelated failure.

* APPEALS-43706 linting issues in va_notify_service fixed.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* [APPEALS-43598] Quarterly Notification Job refactoring (#21505)

* Quarterly Notification Job refactoring

* APPEALS-43598 Fix lint issues for QuarterlyNotificationsJob refactor

* APPEALS-43598 Fix db schema.rb file

* APPEALS-43598 Fix schema.rb file

* APPEALS-43598 Refactoring QuarterlyNotificationsJob for readability

* APPEALS-43598 Refactoring QuarterlyNotificationsJob and removing extra methods

* [APPEALS-43598] Update method name

---------

Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-44007: Eliminate Transmission of Notifications to Deceased Veterans (#21481)

* APPEALS-44007: Writing tests to ensure adding the 'failure due to deceased' information is properly set and added to the db

* updates to pr

* pushing changes for tonight

* updating spec file to handle enabling and disabling feature flags

* Update format_message_status

* Lint roll

* fixing conflicts

* Updates to send notification spec

* Fix one of the legacy test cases

* Remove accidental push

* Fix remaining test

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-45235: Remove Temporary PDF Files From tmp Directory After All eFolder Upload Attempts (#21557)

* Cleanup files after uploading to VBMS

* Only delete file if it exists

* Resolve linter issue

* Update specs

* Trigger CodeClimate

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Add appeal alias for notifiable

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications (#21575)

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications

* fixing some errors

* updating factory

* updating tests

* updating tests and factory

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-43596 Adding JobMessageDeletionMiddleware to delete SQS messages for certain jobs

* APPEALS-43596 Adding tests

* APPEALS-43596 Fix codeclimate

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables (#21596)

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables

* pushing changes

* updating tests

* rubocop

* rubocop'n

* deleting repeat constants

* removing file in favor of EVENT_TYPE_FILTERS.json

* removing instances of using VA_NOTIFY_TEMPLATE_NAMES and using EVENT_TYPE_FILTERS instead

* replacing all instances of strings with constants

* fixing bug

* rubocop'n

* rubocop'n

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Clean notification_events after notification report specs finish (#21662)

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-43725: Extract `notify_appellant` Call from `QuaterlyNotificationsJob` to Decrease Runtime (#21643)

* Group notification types as scopes

* Add new job

* Fix typo

* Add back batching

* Batch send messages

* Multithread job queueing

* Reconfigure bulk enqueueing to utilize send_notifications.fifo queue

* Update the comment on QuaterlyNotificationsJob#perform

to adhere to the RDoc standard

* Use constants for template name

* Provide a more descriptive var name

* Remove unused env var

* Fix linting issues

* Prevent error from being thrown early in init job

* Add RDoc comments to appeal_state

* Add rdoc comment to init job

* Add another rdoc comment to the init job

* Use a more specific error class whenever an appeal

cannot be located within the init job

* Add a more specific error to CaseflowJob#enqueue_batch_of_jobs

* Add test for SendNotificationJob.queue_name_suffix

* Update QuarterlyNotificationsJob tests

* Update appeal_state_spec.rb to cover new scopes

* Add spec file for NotificationInitializationJob

* Add CaseflowJob specs

* Add CaseflowJob specs

* Address rubocop issue (by ignoring it)

* Kicking off CodeClimate

* Fix some lint issues

* Freeze constant

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Move spec file to proper location

* APPEALS-43599 (#21696)

* APPEALS-43599 Refactoring SendNotificationJob

* APPEALS-43599 Remove comments

* APPEALS-43599 Suppress code smells from reek

* APPEALS-43599 Suppress code smells from reek

* jcohen/APPEALS-43727 (#21589)

* APPEALS-43727 Branch created. Extracted all the 'when' conditions in the case statement within appellant_notification.rb update_appeal_state method.

* APPEALS-43727 appellant_notification_service is created, logic from crowded method in appellant_notificaion.rb placed in newly created file, allowing redability.

* APPEALS-43727 added logic to appeal_state.rb, appellant_notification.rb updated with less logic, readable code through well named methods.

* APPEALS-43727 commit before merge from teammates work

* APPEALS-43727 removed freeze method on default status hash in appeal_state.rb. removed some rubocop disabling in appellant_notificaion.rb

* APPEALS-43727 extracted more logic from the appellant_notification module and placed it into the appeal_state class. Also got rid of rubocop declarations in app_notif and app_state as well. finally removed feature_toggle calls in appell_notif.

* APPEALS-43727 tests passing, code works

* APPEALS-43727 adding tests to appeal_state_spec to test functionality

* APPEALS-43727 rspec tests in appeal_state.

* APPEALS-43727 tests pass.

* Fixing code climate duplicate code issue

* fixing case statement

* code climate things

* rubocop

* APPEALS-43727 work completed.

* APPEALS-43727 PR comments applied. tests not in a working state.

* APPEALS-43727 PR comments applied. appeal_state_spec in working state.

* APPEALS-43727 PR comments applied. appellant_notification_spec.rb all green.

* Adjust spacing of comments in appeal_state.rb

* Utilize #external_id method over ternary

* Swap or conditional for blank?

* Fix another whitespace gap

* APPEALS-43727 PR comments applied. again after reset.

* APPEALS-43727 PR comments applied. flipped conditionals in appeal_state.rb

* Update app/models/concerns/appeal_concern.rb

* APPEALS-43727 code/test edits

* APPEALS-43727 bulk_task_reasssignment_spec reverted to orginal state, with the exception of an expectation that was on line 98

* APPEALS-43727 lint fix

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-46179 (#21712)

* APPEALS-46179 Create JobExecutionTimes table

* APPEALS-46179 Add comment

* APPEALS-46179 Update schema

* APPEALS-46193 (#21753)

* APPEALS-46193 Add record to JobExecutionTime table when job is performed

* APPEALS-46193 Updating JobExecutionTimes table with an upsert query

* APPEALS-46193 Ignore JobExecutionTimes for certain jobs

* APPEALS-46193 Update ignore_job_execution_time? method

* APPEALS-46193 Adding tests

* Fix lint issues

* Update AWS dependencies

* Rollback gem reduction due to UAT issue

* Alter queue priority

* Forward error in SendNotificationJob

* Allow for notification audit records to remain in ProdTest

* Fix spec

* Fix typo in test fixture's name

* Fix lint infraction related to re-raising exceptions

* Address duplication CC error

* Reenable-privacy-mail-notifications (#21859)

* Add conditional for FOIA and Privacy Act mail

task to receives 'Privacy Act Pending' notifications

* Update spec

* Adjust some specs

* Add missing param

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Remove byebug from spec

* Revert queue tweak

* Remove duplicate method

* APPEALS-47382: Refactor Job Behavior Filtering Boolean Methods (#21898)

* initial commit

* refactoring methods to have constants instead of methods

* adding comments back in

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* APPEALS-48342: Prevent Intentional Retries of SendNotificationJobs in ProdTest from Causing Duplicate Notification Table Entries (#21927)

* initial commit

* rubocop'n

* rubcop'n

* fixing tests

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Resolve missed conflict

* MattT/APPEALS-48514 (#21959)

* Prototype of privacy act fix

* Leave privacy act states intact upon decision mailed

* Remove unused param

* Attempt updating specs to cover new behavior

* Fix attr name typo

* Add missing bang

* Skip reek issue

The issue has been deemed to be minor enough to not warrant having to reinvent everything for now.

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix quarterly specs by add in necessary hearings

* Adjust spacing/ordering of gems (#21978)

* MattT/APPEALS-49085 (#21960)

* Filter out appeals whose hearings have been held from hearing_scheduled scope

* Fix whitespace issues

* Fix failing specs caused by an oversight on my part

* Fix lint issue

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-49212 (#21991)

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add step to NightlySyncsJob to sync hearing dispositions and appeal stateS

* Add comment to new method

* Use constant for disposition type

* Fix typo in accessor

* Add spec for new appeal state action

* Create user in top scope

* Expand nighlty syncs job to check all scheduled hearing disposition types.

No show was left off as we don't have a requirement around it yet.

* Add nightly sync job spec

* Add disp task spec

* Add specs targeting the hearings controller

* Add sync script

* Eager load constants

* Add distinct

* Remove appeal_docketed from being reset

* Add script to adjust ama hearing statuses

* Correct mistype

* Add appeal_type clause

* Fix specs

* Lint fixes

* Flip conditionals in specs

* Fix var name

* Fix var

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Backfill addition to script

* Add AppealState record for newly docketed LegacyAppeals (#21999)

* APPEALS-48966 Adding AppealState record for recently docketed appeals

* APPEALS-48966 Refactor code and add comments

* Delete extraneous files

* Revert to using constants value

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix typo

* Fix typo

* Fix seed script

* Fix seed script

* Ensure cleanup

* Change copy for Appeal Docketed status (#22006)

* Change copy for Appeal Docketed status

* Change case

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Use status text value instead of key

---------

Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-44916 seed data update (#22008)

* APPEALS-44956: Add AppealAffinity model and database table (#21526)

* add migration for appeal_affinities

* add AppealAffinity model and associations, update migration for new column

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

* add new job, update affinity model validation and after save hook

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

* add return in job if no query results, tests for no query results

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

* remove comment, fix hearing factory, disable some seeds for testing

* add more tests

* test refactor

* update appeals for dist query to add affinity start, add seed file, fix hearing factory, add stat to dist factory

* disable new seed on reset

* update seed file with vet names, add another seed category

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* APPEALS-44959: Modify affinity date checks to use appeal_affinity (#21611)

* swap distribution queries from distribution_task to appeal_affinities

* update seed files to use appeal affinities instead of distribution task

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

* fix user seed, fix date format in distribution task instructions

* fix tests for date format update

* Calvin/APPEALS-44957-rake-affinity (#21577)

* grabbed receipt dates from distributed cases

* refactored for functionality + added method to grab appeals that match

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

* if appeal affinity is nil, it will now be updated

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

* updated start date to receipt date instead of Time.now

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

* APPEALS-46016: Add Affinity Start Date to the Explain Page (#21660)

* add affinity start date to explain page

* add feature test to verify dates display

* update rake task and spec (#21731)

* APPEALS-46325: Add Seeds for AOD Appeals and Update Dates to Match CAVC (#21730)

* add aod hearing cases to ama affinity cases seed

* fix lever spec

* APPEALS-45148: Hook to clear saved affinity date (#21623)

* initial imp. idea

* AC1: check for affinity_start_date on assignment

* AC2/3: update affinity start date  w/ instr.

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

* add case dist lever to new tests (#21776)

* remove unnecessarily included module from job (#21827)

* APPEALS-47211: Improve Performance of Distribution Queries (#21840)

* rework ready_for_distribution scope

* fix non-hearing docket distribution bug

* restart tests

* added null checks for appeal affinity in distribution queries, update tests (#21893)

* add check for appeal being active to distribution and associated slack message (#21902)

* prelim work on 48033

* refactored code a bit, working on data creation now

* created ama_affinity data

* fixing mispelt variable

* add back line that was removed

* updated users_spec to now pass

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: Calvin <Calvin.Costa@va.gov>

* fixed merge conflict

---------

Co-authored-by: alex-guanipatin <143651918+alex-guanipatin@users.noreply.github.com>
Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>
Co-authored-by: slwallerBAH <161883271+slwallerBAH@users.noreply.github.com>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Matt Roth <roth_matthew@bah.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: Calvin <Calvin.Costa@va.gov>

---------

Co-authored-by: Blake Manus <33578594+Blake-Manus@users.noreply.github.com>
Co-authored-by: sbashamoni <SampathKumar.Bashamoni@va.gov>
Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: Michael Beard <131783726+mbeardy@users.noreply.github.com>
Co-authored-by: cdetlefva <133903625+cdetlefva@users.noreply.github.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Michael Beard <michael.beard@va.gov>
Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
Co-authored-by: 631068 <rickybmanus@gmail.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: youfoundmanesh <maneshreddy.kommidi@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>
Co-authored-by: kristeja <112115264+kristeja@users.noreply.github.com>
Co-authored-by: Craig Reese <Reese_Craig@bah.com>
Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>
Co-authored-by: Matt Roth <roth_matthew@bah.com>
Co-authored-by: alex-guanipatin <143651918+alex-guanipatin@users.noreply.github.com>
Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>
Co-authored-by: slwallerBAH <161883271+slwallerBAH@users.noreply.github.com>
Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
amybids added a commit that referenced this pull request Jul 8, 2024
* APPEALS-36339 (#21436)

* Updated to remove obsolete levers of ACD Disable Legacy Distributions and ACD Disable Non-priority Distributions

* Fixed redundant linting issue

* Fixed empty line linting issue

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* mbeard/APPEALS-44379 (#21451)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44417 Seeds for Docket Lever Demo (#21534)

Co-authored-by: Christopher Detlef <>

* APPEALS-36345-updated (#21537)

* Refactored exclusion table

* Fixed ordering issue and testing

* mbeard/APPEALS-44379 (#21530)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

* first new commit with new args

* updates methods and test query

* updates age_of_oldest methods params

* cleans up method removes args and updates tests, fixes linting

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44346 Demo Docket Goal Lever Test Seed Data (#21524)

Co-authored-by: Christopher Detlef <>

* Chrisbdetlef/appeals 40705 (#21535)

* Chris backend Work

* APPEALS-44441. Added initial changes for individual seed

* WIP

* APPEALS-44441. Fixed the table css

* APPEALS-44441. Added Custom and Scenario Seed components and jest tests

* APPEALS-44441. Fix ScenarioSeeds jest test

* APPEALS-44441. Fix CustomeSeeds Jest test

* init commit

* fixes linting issues

* capybara test init

* APPEALS-44441. Backend Integration API changes

* APPEALS-44441_1. Matched the constant keys in the backend

* APPEALS-44441_1. Update the param to match the backend and fixed spec

* APPEALS-44441. lint fixes

* APPEALS-44441. linting fixes

* sharsha/APPEALS-44441. fixed the route and tests

* Change route

* Change variables to match front and back end

* CustomSeed Jest test fix

* Fix issues

* Fix rubocop issues

* Use existing method in the controller

---------

Co-authored-by: Christopher Detlef <>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Michael Beard <michael.beard@va.gov>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 (#21566)

* Fixed rspec failures on constants

* APPEALS-45531. Remove dead code

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Updated lever history to handle null unit values from docket levers (#21567)

Co-authored-by: 631966 <amy.detwiler@va.gov>

* Sharsha/appeals 45531_1 (#21573)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 1 (#21609)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

* TEST FOR FIX

* MORE TESTING

* Fixed rspec issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45502. Organize route and fix the controller (#21595)

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Ricky/APPEALS-36345.fixes (#21612)

* Updated lever history to handle null unit values from docket levers

* Updated member view of exclusion table with proper text display and fixed missing css

* Updated unit test and test data to test rendering of exclusionTable

---------

Co-authored-by: 631966 <amy.detwiler@va.gov>

* ricky/APPEALS-44053 (#21587)

* init commit, adds conditional to check for docket_type ama to method, fixes json constants to snakecase

* puts statements testing

* updates seeds for evidence_submission, adds method to hearing_request_docket.rb and dist_concern.rb

* updated appeals dsit

* final fix for PR

* updates spec to reflect changes in hearing_request_docket

* uncomments seeds

* Ricky/appeals 43523 (#21649)

* Added Assignment Queue link to Switch Users test page

* Updated controller to validate role and redirect

* Updated error information

* Updated rspec tests

---------

Co-authored-by: 631068 <rickybmanus@gmail.com>

* APPEALS-45898. Updated the lever_group_order values (#21639)

* APPEALS-45898. Updated the lever_group_order values

* APPEALS-45898. Updated order of the evidence submission priority and non-priority

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-40646 (#21645)

* Init commit

* adds methods and useffect first pass

* fixes isIdle warning

* removes important from scss

* refined handleToggleChange method

* updates font color for h4

* adds keys to the td and fixed proptype for loadAcdExcludeFromAffinity in casedistributionapp

* Chrisbdetlef/appeals 43117.cleanup (#21671)

* APPEALS-43421: Attorney Selection Sticking on Dropdown after Assignment (#21401)

* redo init commit

* updated imp. logic

* attorney widget fix

---------

Co-authored-by: Calvin <Calvin.Costa@va.gov>

* Add ruby CE API Gem

* remove correspondence changes from schema.rb (#21468)

* Revert "Add ruby CE API Gem" (#21479)

This reverts commit c78afe30620716d59d2ac31ad6eed71585d78a98.

* Override SCT Bulk Assign Page task limit (#21465)

* Override SCT Bulk Assign Queue 15 case limit & Adjust SCT attorney assign task action label

* feature/APPEALS-35707-29633-29632 (prodtest) (#21485)

* 🔀 Squash merge AlecK/APPEALS-35707 - Replace `database_cleaner` with `database_cleaner-active_record`

* 🔀 Squash merge jcroteau/APPEALS-29632-fix-deprecation-action-view-base-instances

* 🔀 Squash merge jcroteau/APPEALS-29633-fix-deprecation-warning-active_record-result-to_hash

* feature/APPEALS-44871 Steps for installing node in the Caseflow demo environment  (#21483) (#21484)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Revert "feature/APPEALS-44871 Steps for installing node in the Caseflow demo …" (#21489)

This reverts commit a6262001f9bedabca60598c82bfe1b803f0f16c7.

* Sbashamoni/appeals 44871 node14 demo fixes (#21490) (#21495)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* add error rules to demo builds (#21496) (#21498)

Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>

* APPEALS-43117 Add QA Users for testing

* Fix rspecs

* Fix issues with attorneys and judge teams

* Fix org count

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: youfoundmanesh <maneshreddy.kommidi@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>
Co-authored-by: Christopher Detlef <>

* Minor fixes (#21694)

* Minor fixes

* Fix rspec tests and properly check for judge css id

* Fix lint issue

---------

Co-authored-by: Christopher Detlef <>

* Fix Legacy Case issues (#21747)

Co-authored-by: Christopher Detlef <>

* APPEALS-46037. Fix padding in the lever history table (#21725)

* APPEALS-46037. Fix padding in the lever history table

* APPEALS-46037. Fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Fix Lauren Roth issue (#21813)

* Users with a VACOLS::Staff entry no longer get created with the default name of Lauren Roth

Co-authored-by: Christopher Detlef <>

* ricky/APPEALS-44044 (#21814)

* first pass at legacy_docket method and spec

* second iteration of legacy_docket and spec

* adds method to age_of_oldest methods and updates test scenarios

* Updated testing and expanded method missing logic

* Updated legacy_docket_spec file and tests

* Updated boolean logic, updated rspecs and factories

* Updated rspec tests to include factories

* updates docket_spec line 317 and factory for disable_ama_non_priority_direct_review

---------

Co-authored-by: Michael Beard <michael.beard@va.gov>

* updates ready_priority_nonpriority_appeals to public_send, updates test (#21844)

* APPEALS-36333 first iteration of docket time goal and prior to goal (#21523)

* APPEALS-36333 first iteration of docket time goal and prior to goal

* APPEALS-36333 address pr comments and moved the logic to docket model

* APPEALS-36333 Added specs for docket and hearing request docket models

* refactored code and moved it to distribution scopes

* APPEALS-36333 address pr comments and refactor code

* APPEALS-43996 updated lever name in all the required files to fix spec failures

* APPEALS-44000 revert hearing request docket model changes to keept it in sync with feature

* APPEALS-44000 updated hearing request docket model specs

* APPEALS-44000 fixed jest tests

* APPEALS-44000 fixed broken rspecs

* APPEALS-43996 fix rubocop warnings

* APPEALS-43996 fix push priority job spec failures

* APPEALS-43996 Updated case distribution lever and docker model and refactor specs

* APPEALS-43996 added rake task to update case distribution lever item in db

* APPEALS-43996 update docket model to handle the scenario when the lever being disabled by a user via the UI

* APPEALS-43996 update section title

* APPEALS-43996 revert rake task

* APPEALS-43996 add new factories to case distribution lever and fix spec failures

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks (#21834)

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks

* APPEALS-45191. Refactor and fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* refactor the logic and fix docket spec failures

* changed the call times to 3 times

* APPEALS-36333 fixed the docket time goal to check the existence of the item before using the public send to get the value

---------

Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: 631966 <amy.detwiler@va.gov>

* updated the seeds to align with the work completed

* Updated Toggle Switch behavior when clicked while idle (#21874)

* Csv research (#21892)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

* csv and etc

* CSS for buttons

* jest tests for the reducer and action types

* Jest test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-46057. CleanUP (#21914)

* more jest tests

* Disable scenario seeds

* Lint fixes

* APPEALS-46057. disable all scenario seeds

* APPEALS-46057. Refactor the TestSeed wrapper to be a functional component and fixed jest test

* APPEALS-46057. Jest job in GHA complaining on test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* updates line of test to correctly build lever item (#21918)

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45191. Updated the query to return the date based on the calculation (#21928)

* APPEALS-45191. Updated the query to return the date based on the calculation

* APPEALS-45191. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisharsha/appeals 43962 (#21929)

* Sharsha/appeals-44911_1 (#21784)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisbdetlef/appeals 44910 (#21838)

* Initial

* Add JSON parsing and multiple calls to rake tasks

* Pre-caby tets

* Add capybara tests and add IDs to buttons

---------

Co-authored-by: Christopher Detlef <>

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: cdetlefva <133903625+cdetlefva@users.noreply.github.com>

* APPEALS-43962. Lint fixes (#21932)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Ricky/APPEALS-47293 (#21925)

* First pass implementation of fixing seeding rspecs

* Second pass at fixing errors in rspecs

* Revert updates to test if rspec passes

* Fixed linting issues in test_docket_seeds_controller_spec

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-48292 updated the column to be a string (#21954)

* APPEALS-48292 updated the column to be a string

* APPEALS-48292 added comment to the control_group field in the migration

* APPEALS-48292 added column comment to the schema, changed migration so that it can be rolled back

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false (#21948)

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false

* APPEALS-49004 added spec to check when Start Distribution Prior to Docket Time Goal toggle is on

* APPEALS-49004 fixed lint issues in docket.rb

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query (#21949)

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query

* APPEALS-48898. Renamed the column and update the method

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-49100. getting value from the start_distribution_prior_to_goal (#21968)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-46257 (#21976)

* updates routes and frontend urls to namespace

* removes superfluous <a> tags

* Ensure that legacy appeals are being created (#21981)

* Ensure that legacy appeals are being created

* Remove puts

---------

Co-authored-by: Christopher Detlef <>

* APPEALS-49403. Added buttons Docket Lever Seed (#21989)

* APPEALS-49403. Added buttons Docket Lever Seed

* sharsha/APPEALS-49403. Updated the endpoint URL path

* APPEALS-49403. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-44000 added check to skip priority appeals in docket model (#21992)

* Feature/appeals 36234 masterupgrade (#22003)

* sbashamoni/APPEALS-43724 Node 16 version upgrade changes (#21966) (#21975)

* Update node verstion to 16 in git workflow

* Update node verstion to 16 in nvm and dockerfile for demo

* Update node version in yarn.lock and package.json and .nvmrc file

* Update node's version path to node16 in docker-bin/env.sh

* Update and upgrade to node16 in client

* More updates to yarn.lock and package.json

* Fix tests by Adam Shaw

* Upadate snapshot for ScheduleVeteran.test.js.snap

* Doing some code clean up

* Doiing some more clean up

* Add and remove spaces to match master

* One more space to take care of

* One more space to take care of again

* One more space to take care of again

---------

Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* init master merge branch

---------

Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* Remove AOD trait from non-priority legacy appeal creation (#22013)

Co-authored-by: Christopher Detlef <>

* Sharsha/appeals 49461 (#22018)

* sharsha/APPEALS-49461. initial commit

* sharsha/APPEALS-49461. fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49421 (#22014)

* init commit fixes ama_np_ capybara test to expect user as admin, and first attempt  test_docket_seeds test

* removes previous chane for TASKS_LOADED

* fixes capybara for test seeds controller button ids

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-49403. Updated the buttons label (#22025)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49585 (#22020)

* init commit for non member view input

* fixes css issue for docket-lever-right

* Added a hyphen between value and unit for member only view

* replaces hyphen with comma

* Init commit replaces th with div for 508 compliance (#22036)

* Chrisbdetlef/appeals 47008 1 (#22040)

* Allow judges to see legacy cases and attorneys to be assigned cases

* Remove testing function

* Update spec to reflect new user count in seed file

---------

Co-authored-by: Christopher Detlef <>

* got rid of extraneous file

* got rid of yarn lock orig

* Include bandwidth as part of timeout error metric data (#21946)

* Include bandwidth as part of timeout error metric data

* add NetworkUtil.js file

* fix code climate issues

* fix linting issue

* remove safari webdriver test

* fix CI/CD issue with chrome_driver

* add tests for NetworkUtil.js

* move bandwidth to metric_attributes

* requested changes* fix NetworkUtil-test

---------

Co-authored-by: mikefinneran <110622959+mikefinneran@users.noreply.github.com>

* APPEALS-50734. Remove Legacy appeals from the query (#22071)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-46087 fix css table width issues for case distribution lever history table (#22024)

* Feature/appeals 36234.merge master.20240701 (#22075)

* APPEALS-47277 remove Vegas office (#21876)

* APPEALS-47277 remove Vagas office

* Removed Texas ID from other files and updated tests

* Snapshot update

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* hotfix/APPEALS-22403 (#21942)

* add identifier for filenumber or ssn in filenumber search

* linting

* codeclimate linting

* update match call to return boolean

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* APPEALS-46907: Update to Determination of Gen Pop Legacy Cases (#21986)

* Isaiah/merge 46910 (#21983)

* removed BFHINES checks and modified tests

* removed lingering bfhines test

* modified test

* most recent updates on tests for passing status

* removed refs to cavc updates

* Skip flaky test ro_viewhearsched_spec

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* APPEALS-44916: Case Distribution Affinity Calculations (#21899)

* APPEALS-44956: Add AppealAffinity model and database table (#21526)

* add migration for appeal_affinities

* add AppealAffinity model and associations, update migration for new column

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

* add new job, update affinity model validation and after save hook

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

* add return in job if no query results, tests for no query results

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

* remove comment, fix hearing factory, disable some seeds for testing

* add more tests

* test refactor

* update appeals for dist query to add affinity start, add seed file, fix hearing factory, add stat to dist factory

* disable new seed on reset

* update seed file with vet names, add another seed category

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* APPEALS-44959: Modify affinity date checks to use appeal_affinity (#21611)

* swap distribution queries from distribution_task to appeal_affinities

* update seed files to use appeal affinities instead of distribution task

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

* fix user seed, fix date format in distribution task instructions

* fix tests for date format update

* Calvin/APPEALS-44957-rake-affinity (#21577)

* grabbed receipt dates from distributed cases

* refactored for functionality + added method to grab appeals that match

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

* if appeal affinity is nil, it will now be updated

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

* updated start date to receipt date instead of Time.now

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

* APPEALS-46016: Add Affinity Start Date to the Explain Page (#21660)

* add affinity start date to explain page

* add feature test to verify dates display

* update rake task and spec (#21731)

* APPEALS-46325: Add Seeds for AOD Appeals and Update Dates to Match CAVC (#21730)

* add aod hearing cases to ama affinity cases seed

* fix lever spec

* APPEALS-45148: Hook to clear saved affinity date (#21623)

* initial imp. idea

* AC1: check for affinity_start_date on assignment

* AC2/3: update affinity start date  w/ instr.

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

* add case dist lever to new tests (#21776)

* remove unnecessarily included module from job (#21827)

* APPEALS-47211: Improve Performance of Distribution Queries (#21840)

* rework ready_for_distribution scope

* fix non-hearing docket distribution bug

* restart tests

* added null checks for appeal affinity in distribution queries, update tests (#21893)

* add check for appeal being active to distribution and associated slack message (#21902)

* Update users_spec.rb

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* hotfix/APPEALS-45177: TaskTable Default Sorting Fix (#21772)

* Updated the TaskTable component to use the defaultSort property instead of the defaultSortIdx property for queue table since that property is not used anywhere. Added a default sorting hash to the UnassignedCasesPage component and now pass that down to TaskTable. Removed references to defaultSortIdx.

* Added the type column default sort to the AssignedCasesPage widget as well.

* Added a parenthesis for clarity around a boolean. Moved the defaultSortingHash out into a constants file.

---------

Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>

* APPEALS-47106 Caseflow Swagger (#21993)

* Add Rswag and convert existing API documentation (#21778)

* add rswag

* Update Gemfile.lock

* Setup yaml UI

* remove and reroute old swagger files

* update format and servers values

* Update route_docs_controller.rb

* Update cmp_controller.rb

* cmp endpoint yaml

* cmp endpoint to return 501

* CMP endpoint swagger flies

* update swagger files

* adjust server order, add auth token

* cmp parameter name change

* add comments

* Update users_controller.rb

* unit tests and linting

* lint fixes

* Update swagger_helper.rb

* APPEALS-48048 Swagger Updates (#21909)

* update servers to not include a host

* remove host for server

* remove generated swaggers from definitions

* remove internal API endpoints from having generated swagger

* IDT servers fixes

* disable CMP swagger in prod and prodtest

* set authorization correctly

* fix what is required for CMP upload

* fix linting issues, update lint rake task to autocorrect for rubocop, add rubocop make command

* Update decision_reviews.yaml

* Update ama_issues.yaml

* Update vacols_issues.yaml

* Update swagger.yaml

* fix check failures

* Update docs_controller_spec.rb

* fix unit tests

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update rswag_ui.rb

* Update lint.rake

* Update decision_reviews_spec.rb

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update veterans_controller_spec.rb

* feature/APPEALS-43597 RC1.5.1 (#21996)

* APPEALS-36759 Add sms_response_content and sms_response_time notifications table

* APPEALS-37003 First pass at job refactor

* APPEALS-37003 Add comments and update kwargs for va notify service

* APPEALS-37003 Update spec files

* APPEALS-37003 Update spec

* APPEALS-37003 Ensure user in job and create email_enabled method

* APPEALS-37003 Remove question mark

* Limit max retry attempts to 5

* Add ? to boolen return methods

* jcohen/APPEALS-43706 (#21444)

* APPEALS-43706 macros added to each model file for the polymorphic relationship to be setup.

* APPEALS-43706 migration made and yet to be run.

* APPEALS-43706 migrations ran and expected columns and indexes are in table.

* Fix some spec failures unrelated to this branch

* Limit schema diff

* Add a missing tab

* Fix more unrelated failures. Also prevent ACD lever seeds from overwriting spec output

* Fix last unrelated failure.

* APPEALS-43706 linting issues in va_notify_service fixed.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* [APPEALS-43598] Quarterly Notification Job refactoring (#21505)

* Quarterly Notification Job refactoring

* APPEALS-43598 Fix lint issues for QuarterlyNotificationsJob refactor

* APPEALS-43598 Fix db schema.rb file

* APPEALS-43598 Fix schema.rb file

* APPEALS-43598 Refactoring QuarterlyNotificationsJob for readability

* APPEALS-43598 Refactoring QuarterlyNotificationsJob and removing extra methods

* [APPEALS-43598] Update method name

---------

Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-44007: Eliminate Transmission of Notifications to Deceased Veterans (#21481)

* APPEALS-44007: Writing tests to ensure adding the 'failure due to deceased' information is properly set and added to the db

* updates to pr

* pushing changes for tonight

* updating spec file to handle enabling and disabling feature flags

* Update format_message_status

* Lint roll

* fixing conflicts

* Updates to send notification spec

* Fix one of the legacy test cases

* Remove accidental push

* Fix remaining test

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-45235: Remove Temporary PDF Files From tmp Directory After All eFolder Upload Attempts (#21557)

* Cleanup files after uploading to VBMS

* Only delete file if it exists

* Resolve linter issue

* Update specs

* Trigger CodeClimate

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Add appeal alias for notifiable

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications (#21575)

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications

* fixing some errors

* updating factory

* updating tests

* updating tests and factory

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-43596 Adding JobMessageDeletionMiddleware to delete SQS messages for certain jobs

* APPEALS-43596 Adding tests

* APPEALS-43596 Fix codeclimate

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables (#21596)

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables

* pushing changes

* updating tests

* rubocop

* rubocop'n

* deleting repeat constants

* removing file in favor of EVENT_TYPE_FILTERS.json

* removing instances of using VA_NOTIFY_TEMPLATE_NAMES and using EVENT_TYPE_FILTERS instead

* replacing all instances of strings with constants

* fixing bug

* rubocop'n

* rubocop'n

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Clean notification_events after notification report specs finish (#21662)

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-43725: Extract `notify_appellant` Call from `QuaterlyNotificationsJob` to Decrease Runtime (#21643)

* Group notification types as scopes

* Add new job

* Fix typo

* Add back batching

* Batch send messages

* Multithread job queueing

* Reconfigure bulk enqueueing to utilize send_notifications.fifo queue

* Update the comment on QuaterlyNotificationsJob#perform

to adhere to the RDoc standard

* Use constants for template name

* Provide a more descriptive var name

* Remove unused env var

* Fix linting issues

* Prevent error from being thrown early in init job

* Add RDoc comments to appeal_state

* Add rdoc comment to init job

* Add another rdoc comment to the init job

* Use a more specific error class whenever an appeal

cannot be located within the init job

* Add a more specific error to CaseflowJob#enqueue_batch_of_jobs

* Add test for SendNotificationJob.queue_name_suffix

* Update QuarterlyNotificationsJob tests

* Update appeal_state_spec.rb to cover new scopes

* Add spec file for NotificationInitializationJob

* Add CaseflowJob specs

* Add CaseflowJob specs

* Address rubocop issue (by ignoring it)

* Kicking off CodeClimate

* Fix some lint issues

* Freeze constant

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Move spec file to proper location

* APPEALS-43599 (#21696)

* APPEALS-43599 Refactoring SendNotificationJob

* APPEALS-43599 Remove comments

* APPEALS-43599 Suppress code smells from reek

* APPEALS-43599 Suppress code smells from reek

* jcohen/APPEALS-43727 (#21589)

* APPEALS-43727 Branch created. Extracted all the 'when' conditions in the case statement within appellant_notification.rb update_appeal_state method.

* APPEALS-43727 appellant_notification_service is created, logic from crowded method in appellant_notificaion.rb placed in newly created file, allowing redability.

* APPEALS-43727 added logic to appeal_state.rb, appellant_notification.rb updated with less logic, readable code through well named methods.

* APPEALS-43727 commit before merge from teammates work

* APPEALS-43727 removed freeze method on default status hash in appeal_state.rb. removed some rubocop disabling in appellant_notificaion.rb

* APPEALS-43727 extracted more logic from the appellant_notification module and placed it into the appeal_state class. Also got rid of rubocop declarations in app_notif and app_state as well. finally removed feature_toggle calls in appell_notif.

* APPEALS-43727 tests passing, code works

* APPEALS-43727 adding tests to appeal_state_spec to test functionality

* APPEALS-43727 rspec tests in appeal_state.

* APPEALS-43727 tests pass.

* Fixing code climate duplicate code issue

* fixing case statement

* code climate things

* rubocop

* APPEALS-43727 work completed.

* APPEALS-43727 PR comments applied. tests not in a working state.

* APPEALS-43727 PR comments applied. appeal_state_spec in working state.

* APPEALS-43727 PR comments applied. appellant_notification_spec.rb all green.

* Adjust spacing of comments in appeal_state.rb

* Utilize #external_id method over ternary

* Swap or conditional for blank?

* Fix another whitespace gap

* APPEALS-43727 PR comments applied. again after reset.

* APPEALS-43727 PR comments applied. flipped conditionals in appeal_state.rb

* Update app/models/concerns/appeal_concern.rb

* APPEALS-43727 code/test edits

* APPEALS-43727 bulk_task_reasssignment_spec reverted to orginal state, with the exception of an expectation that was on line 98

* APPEALS-43727 lint fix

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-46179 (#21712)

* APPEALS-46179 Create JobExecutionTimes table

* APPEALS-46179 Add comment

* APPEALS-46179 Update schema

* APPEALS-46193 (#21753)

* APPEALS-46193 Add record to JobExecutionTime table when job is performed

* APPEALS-46193 Updating JobExecutionTimes table with an upsert query

* APPEALS-46193 Ignore JobExecutionTimes for certain jobs

* APPEALS-46193 Update ignore_job_execution_time? method

* APPEALS-46193 Adding tests

* Fix lint issues

* Update AWS dependencies

* Rollback gem reduction due to UAT issue

* Alter queue priority

* Forward error in SendNotificationJob

* Allow for notification audit records to remain in ProdTest

* Fix spec

* Fix typo in test fixture's name

* Fix lint infraction related to re-raising exceptions

* Address duplication CC error

* Reenable-privacy-mail-notifications (#21859)

* Add conditional for FOIA and Privacy Act mail

task to receives 'Privacy Act Pending' notifications

* Update spec

* Adjust some specs

* Add missing param

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Remove byebug from spec

* Revert queue tweak

* Remove duplicate method

* APPEALS-47382: Refactor Job Behavior Filtering Boolean Methods (#21898)

* initial commit

* refactoring methods to have constants instead of methods

* adding comments back in

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* APPEALS-48342: Prevent Intentional Retries of SendNotificationJobs in ProdTest from Causing Duplicate Notification Table Entries (#21927)

* initial commit

* rubocop'n

* rubcop'n

* fixing tests

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Resolve missed conflict

* MattT/APPEALS-48514 (#21959)

* Prototype of privacy act fix

* Leave privacy act states intact upon decision mailed

* Remove unused param

* Attempt updating specs to cover new behavior

* Fix attr name typo

* Add missing bang

* Skip reek issue

The issue has been deemed to be minor enough to not warrant having to reinvent everything for now.

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix quarterly specs by add in necessary hearings

* Adjust spacing/ordering of gems (#21978)

* MattT/APPEALS-49085 (#21960)

* Filter out appeals whose hearings have been held from hearing_scheduled scope

* Fix whitespace issues

* Fix failing specs caused by an oversight on my part

* Fix lint issue

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-49212 (#21991)

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add step to NightlySyncsJob to sync hearing dispositions and appeal stateS

* Add comment to new method

* Use constant for disposition type

* Fix typo in accessor

* Add spec for new appeal state action

* Create user in top scope

* Expand nighlty syncs job to check all scheduled hearing disposition types.

No show was left off as we don't have a requirement around it yet.

* Add nightly sync job spec

* Add disp task spec

* Add specs targeting the hearings controller

* Add sync script

* Eager load constants

* Add distinct

* Remove appeal_docketed from being reset

* Add script to adjust ama hearing statuses

* Correct mistype

* Add appeal_type clause

* Fix specs

* Lint fixes

* Flip conditionals in specs

* Fix var name

* Fix var

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Backfill addition to script

* Add AppealState record for newly docketed LegacyAppeals (#21999)

* APPEALS-48966 Adding AppealState record for recently docketed appeals

* APPEALS-48966 Refactor code and add comments

* Delete extraneous files

* Revert to using constants value

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix typo

---------

Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Feature/appeals 43597 release candidate (#22004)

* APPEALS-36759 Add sms_response_content and sms_response_time notifications table

* APPEALS-37003 First pass at job refactor

* APPEALS-37003 Add comments and update kwargs for va notify service

* APPEALS-37003 Update spec files

* APPEALS-37003 Update spec

* APPEALS-37003 Ensure user in job and create email_enabled method

* APPEALS-37003 Remove question mark

* Limit max retry attempts to 5

* Add ? to boolen return methods

* jcohen/APPEALS-43706 (#21444)

* APPEALS-43706 macros added to each model file for the polymorphic relationship to be setup.

* APPEALS-43706 migration made and yet to be run.

* APPEALS-43706 migrations ran and expected columns and indexes are in table.

* Fix some spec failures unrelated to this branch

* Limit schema diff

* Add a missing tab

* Fix more unrelated failures. Also prevent ACD lever seeds from overwriting spec output

* Fix last unrelated failure.

* APPEALS-43706 linting issues in va_notify_service fixed.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* [APPEALS-43598] Quarterly Notification Job refactoring (#21505)

* Quarterly Notification Job refactoring

* APPEALS-43598 Fix lint issues for QuarterlyNotificationsJob refactor

* APPEALS-43598 Fix db schema.rb file

* APPEALS-43598 Fix schema.rb file

* APPEALS-43598 Refactoring QuarterlyNotificationsJob for readability

* APPEALS-43598 Refactoring QuarterlyNotificationsJob and removing extra methods

* [APPEALS-43598] Update method name

---------

Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-44007: Eliminate Transmission of Notifications to Deceased Veterans (#21481)

* APPEALS-44007: Writing tests to ensure adding the 'failure due to deceased' information is properly set and added to the db

* updates to pr

* pushing changes for tonight

* updating spec file to handle enabling and disabling feature flags

* Update format_message_status

* Lint roll

* fixing conflicts

* Updates to send notification spec

* Fix one of the legacy test cases

* Remove accidental push

* Fix remaining test

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-45235: Remove Temporary PDF Files From tmp Directory After All eFolder Upload Attempts (#21557)

* Cleanup files after uploading to VBMS

* Only delete file if it exists

* Resolve linter issue

* Update specs

* Trigger CodeClimate

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Add appeal alias for notifiable

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications (#21575)

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications

* fixing some errors

* updating factory

* updating tests

* updating tests and factory

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-43596 Adding JobMessageDeletionMiddleware to delete SQS messages for certain jobs

* APPEALS-43596 Adding tests

* APPEALS-43596 Fix codeclimate

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables (#21596)

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables

* pushing changes

* updating tests

* rubocop

* rubocop'n

* deleting repeat constants

* removing file in favor of EVENT_TYPE_FILTERS.json

* removing instances of using VA_NOTIFY_TEMPLATE_NAMES and using EVENT_TYPE_FILTERS instead

* replacing all instances of strings with constants

* fixing bug

* rubocop'n

* rubocop'n

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Clean notification_events after notification report specs finish (#21662)

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-43725: Extract `notify_appellant` Call from `QuaterlyNotificationsJob` to Decrease Runtime (#21643)

* Group notification types as scopes

* Add new job

* Fix typo

* Add back batching

* Batch send messages

* Multithread job queueing

* Reconfigure bulk enqueueing to utilize send_notifications.fifo queue

* Update the comment on QuaterlyNotificationsJob#perform

to adhere to the RDoc standard

* Use constants for template name

* Provide a more descriptive var name

* Remove unused env var

* Fix linting issues

* Prevent error from being thrown early in init job

* Add RDoc comments to appeal_state

* Add rdoc comment to init job

* Add another rdoc comment to the init job

* Use a more specific error class whenever an appeal

cannot be located within the init job

* Add a more specific error to CaseflowJob#enqueue_batch_of_jobs

* Add test for SendNotificationJob.queue_name_suffix

* Update QuarterlyNotificationsJob tests

* Update appeal_state_spec.rb to cover new scopes

* Add spec file for NotificationInitializationJob

* Add CaseflowJob specs

* Add CaseflowJob specs

* Address rubocop issue (by ignoring it)

* Kicking off CodeClimate

* Fix some lint issues

* Freeze constant

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Move spec file to proper location

* APPEALS-43599 (#21696)

* APPEALS-43599 Refactoring SendNotificationJob

* APPEALS-43599 Remove comments

* APPEALS-43599 Suppress code smells from reek

* APPEALS-43599 Suppress code smells from reek

* jcohen/APPEALS-43727 (#21589)

* APPEALS-43727 Branch created. Extracted all the 'when' conditions in the case statement within appellant_notification.rb update_appeal_state method.

* APPEALS-43727 appellant_notification_service is created, logic from crowded method in appellant_notificaion.rb placed in newly created file, allowing redability.

* APPEALS-43727 added logic to appeal_state.rb, appellant_notification.rb updated with less logic, readable code through well named methods.

* APPEALS-43727 commit before merge from teammates work

* APPEALS-43727 removed freeze method on default status hash in appeal_state.rb. removed some rubocop disabling in appellant_notificaion.rb

* APPEALS-43727 extracted more logic from the appellant_notification module and placed it into the appeal_state class. Also got rid of rubocop declarations in app_notif and app_state as well. finally removed feature_toggle calls in appell_notif.

* APPEALS-43727 tests passing, code works

* APPEALS-43727 adding tests to appeal_state_spec to test functionality

* APPEALS-43727 rspec tests in appeal_state.

* APPEALS-43727 tests pass.

* Fixing code climate duplicate code issue

* fixing case statement

* code climate things

* rubocop

* APPEALS-43727 work completed.

* APPEALS-43727 PR comments applied. tests not in a working state.

* APPEALS-43727 PR comments applied. appeal_state_spec in working state.

* APPEALS-43727 PR comments applied. appellant_notification_spec.rb all green.

* Adjust spacing of comments in appeal_state.rb

* Utilize #external_id method over ternary

* Swap or conditional for blank?

* Fix another whitespace gap

* APPEALS-43727 PR comments applied. again after reset.

* APPEALS-43727 PR comments applied. flipped conditionals in appeal_state.rb

* Update app/models/concerns/appeal_concern.rb

* APPEALS-43727 code/test edits

* APPEALS-43727 bulk_task_reasssignment_spec reverted to orginal state, with the exception of an expectation that was on line 98

* APPEALS-43727 lint fix

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-46179 (#21712)

* APPEALS-46179 Create JobExecutionTimes table

* APPEALS-46179 Add comment

* APPEALS-46179 Update schema

* APPEALS-46193 (#21753)

* APPEALS-46193 Add record to JobExecutionTime table when job is performed

* APPEALS-46193 Updating JobExecutionTimes table with an upsert query

* APPEALS-46193 Ignore JobExecutionTimes for certain jobs

* APPEALS-46193 Update ignore_job_execution_time? method

* APPEALS-46193 Adding tests

* Fix lint issues

* Update AWS dependencies

* Rollback gem reduction due to UAT issue

* Alter queue priority

* Forward error in SendNotificationJob

* Allow for notification audit records to remain in ProdTest

* Fix spec

* Fix typo in test fixture's name

* Fix lint infraction related to re-raising exceptions

* Address duplication CC error

* Reenable-privacy-mail-notifications (#21859)

* Add conditional for FOIA and Privacy Act mail

task to receives 'Privacy Act Pending' notifications

* Update spec

* Adjust some specs

* Add missing param

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Remove byebug from spec

* Revert queue tweak

* Remove duplicate method

* APPEALS-47382: Refactor Job Behavior Filtering Boolean Methods (#21898)

* initial commit

* refactoring methods to have constants instead of methods

* adding comments back in

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* APPEALS-48342: Prevent Intentional Retries of SendNotificationJobs in ProdTest from Causing Duplicate Notification Table Entries (#21927)

* initial commit

* rubocop'n

* rubcop'n

* fixing tests

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Resolve missed conflict

* MattT/APPEALS-48514 (#21959)

* Prototype of privacy act fix

* Leave privacy act states intact upon decision mailed

* Remove unused param

* Attempt updating specs to cover new behavior

* Fix attr name typo

* Add missing bang

* Skip reek issue

The issue has been deemed to be minor enough to not warrant having to reinvent everything for now.

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix quarterly specs by add in necessary hearings

* Adjust spacing/ordering of gems (#21978)

* MattT/APPEALS-49085 (#21960)

* Filter out appeals whose hearings have been held from hearing_scheduled scope

* Fix whitespace issues

* Fix failing specs caused by an oversight on my part

* Fix lint issue

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-49212 (#21991)

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add step to NightlySyncsJob to sync hearing dispositions and appeal stateS

* Add comment to new method

* Use constant for disposition type

* Fix typo in accessor

* Add spec for new appeal state action

* Create user in top scope

* Expand nighlty syncs job to check all scheduled hearing disposition types.

No show was left off as we don't have a requirement around it yet.

* Add nightly sync job spec

* Add disp task spec

* Add specs targeting the hearings controller

* Add sync script

* Eager load constants

* Add distinct

* Remove appeal_docketed from being reset

* Add script to adjust ama hearing statuses

* Correct mistype

* Add appeal_type clause

* Fix specs

* Lint fixes

* Flip conditionals in specs

* Fix var name

* Fix var

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Backfill addition to script

* Add AppealState record for newly docketed LegacyAppeals (#21999)

* APPEALS-48966 Adding AppealState record for recently docketed appeals

* APPEALS-48966 Refactor code and add comments

* Delete extraneous files

* Revert to using constants value

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix typo

* Fix typo

* Fix seed script

* Fix seed script

* Ensure cleanup

* Change copy for Appeal Docketed status (#22006)

* Change copy for Appeal Docketed status

* Change case

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Use status text value instead of key

---------

Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-44916 seed data update (#22008)

* APPEALS-44956: Add AppealAffinity model and database table (#21526)

* add migration for appeal_affinities

* add AppealAffinity model and associations, update migration for new column

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

* add new job, update affinity model validation and after save hook

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

* add return in job if no query results, tests for no query results

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

* remove comment, fix hearing factory, disable some seeds for testing

* add more tests

* test refactor

* update appeals for dist query to add affinity start, add seed file, fix hearing factory, add stat to dist factory

* disable new seed on reset

* update seed file with vet names, add another seed category

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* APPEALS-44959: Modify affinity date checks to use appeal_affinity (#21611)

* swap distribution queries from distribution_task to appeal_affinities

* update seed files to use appeal affinities instead of distribution task

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

* fix user seed, fix date format in distribution task instructions

* fix tests for date format update

* Calvin/APPEALS-44957-rake-affinity (#21577)

* grabbed receipt dates from distributed cases

* refactored for functionality + added method to grab appeals that match

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

* if appeal affinity is nil, it will now be updated

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

* updated start date to receipt date instead of Time.now

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

* APPEALS-46016: Add Affinity Start Date to the Explain Page (#21660)

* add affinity start date to explain page

* add feature test to verify dates display

* update rake task and spec (#21731)

* APPEALS-46325: Add Seeds for AOD Appeals and Update Dates to Match CAVC (#21730)

* add aod hearing cases to ama affinity cases seed

* fix lever spec

* APPEALS-45148: Hook to clear saved affinity date (#21623)

* initial imp. idea

* AC1: check for affinity_start_date on assignment

* AC2/3: update affinity start date  w/ instr.

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

* add case dist lever to new tests (#21776)

* remove unnecessarily included module from job (#21827)

* APPEALS-47211: Improve Performance of Distribution Queries (#21840)

* rework ready_for_distribution scope

* fix non-hearing docket distribution bug

* restart tests

* added null checks for appeal affinity in distribution queries, update tests (#21893)

* add check for appeal being active to distribution and associated slack message (#21902)

* prelim work on 48033

* refactored code a bit, working on data creation now

* created ama_affinity data

* fixing mispelt variable

* add back line that was removed

* updated users_spec to now pass

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: Calvin <Calvin.Costa@va.gov>

* fixed merge conflict

---------

Co-authored-by: alex-guanipatin <143651918+alex-guanipatin@users.noreply.github.com>
Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>
Co-authored-by: slwallerBAH <161883271+slwallerBAH@users.noreply.github.com>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Matt Roth <roth_matthew@bah.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: Calvin <Calvin.Costa@va.gov>

* Revert "APPEALS-46087 fix css table width issues for case distribution lever history table (#22024)"

This reverts commit 05896d32fa0510bf76101dff689ad05187dc7ccf.

* Removed Test Seeds link from dropdown menu (#22089)

* Resolve merge issues (#22103)

* resolve issues

* fix controller spec

* Include bandwidth as part of timeout error metric data (#21946) (#22105)

Co-authored-by: Daniel Mage <dmage20@gmail.com>

* fix hearing_request_docket_spec merge issue

* Hotfix/appeals 44031 (#22104) (#22111)

* Hotfix/appeals 44031 (#22104)

* Hotfix/appeals 44031 b (#22110)

---------

Co-authored-by: Daniel Mage <dmage20@gmail.com>

---------

Co-authored-by: Blake Manus <33578594+Blake-Manus@users.noreply.github.com>
Co-authored-by: 631966 <amy.detwiler@va.gov>
Co-authored-by: sbashamoni <SampathKumar.Bashamoni@va.gov>
Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: Michael Beard <131783726+mbeardy@users.noreply.github.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>
Co-authored-by: cdetlefva <133903625+cdetlefva@users.noreply.github.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Michael Beard <michael.beard@va.gov>
Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
Co-authored-by: 631068 <rickybmanus@gmail.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: youfoundmanesh <maneshreddy.kommidi@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>
Co-authored-by: kristeja <112115264+kristeja@users.noreply.github.com>
Co-authored-by: Craig Reese <Reese_Craig@bah.com>
Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>
Co-authored-by: Matt Roth <roth_matthew@bah.com>
Co-authored-by: Daniel Mage <dmage20@gmail.com>
Co-authored-by: alex-guanipatin <143651918+alex-guanipatin@users.noreply.github.com>
Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>
Co-authored-by: slwallerBAH <161883271+slwallerBAH@users.noreply.github.com>
Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noah…
sbashamoni added a commit that referenced this pull request Jul 11, 2024
* APPEALS-44148: Add ruby_claim_evidence_api gem (#22059)

* APPEALS-50758: Fix broken tests in spec/controllers/case_distribution_levers_controller_spec.rb (#22072)

* update test data to fix tests

* fix test data setup

* fix dates in test setup

* disable flaky jest test

* APPEALS-49845: Hearing CAVC Appeals are not respecting CAVC affinity (#22043)

* pass judge into base relation queries on hearing docket

* update scopes to distribute CAVC hearing to original judge when within hearing window

* APPEALS-49845: Add seed data (#22056)

* add seed data

* fix users seed spec

* APPEALS-49555: Some AOD appeals are not being selected as priority by the distribution algorithm (#22067)

* aod appeal with claimants person does not contain DOB

* Addressed comments

---------

Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>

* Merge feature/appeals-34320 into release branch (#22094)

* ClayS/APPEALS-39107 (#21458)

* add request issue modification button for non-admins

* add tests covering the request issue modification button

* appease rubocop overlord

* update feature tests

* change to inline style and absolute import

* update feature test

---------

Co-authored-by: Brandon Lee Dorner <Brandondorner@yahoo.com>

* JHoang/APPEALS-39445 (#21445)

* added new dropdown actions  for edit issues, restricted visibility to non vha admins

* fix failing tests

* update jest for new dropdown actions

* added placeholder modal for request additional issue button

* Replace relative import with absolute, rename variable to check for non vha admin

* render new dropdown actions and button only for in progress tasks

* revert previous changes, added new changes

* fix typo in issuelist

* typo again

* remove extra empty line

* fix jest tests and vha_hlr_sc rspec

* address styling issues

* more restrictions to dropdown/button visibility

* remove unused comments

---------

Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>

* Pending Request Issues seeds, factories and query update (#21437)

* migration and initial commit of the factory

* changing approve status to status

* Added active record associations on models, added factory attributes, added pending tasks on queue tab

* adding AC-2 condition to get pending record response from pending_request_issue table

* factory and seed for pending_request_issues

* Added pending request issues count alias for sorting and serialization to Task query

* adding issue_type_Count and task_type_count for pending tab

* Added spec tests for vha business line and business line spec files, cleaned up the controller, modified issue_type_count query

* fixing the spec failures and code climate issues

* removed byebug

* Fixing code climate issue and adding seed data

* fixing the schema error

* Revert "fixing the schema error"

This reverts commit 73070faa40a5615c45ae9e7ec5a0bef74f419e9e.

* skip association so that test passes

* renaming the table to - issue_modification_request and corresponding changes to the model, factories

* fixing spec failures and linter

* fixing spec failures and linter

* making sure pending tasks doesnt show up in in progress tab and modified the factory so that Claimant name appears

* fixing the spec failure

* removing coalesce and removing null: true

* more PR feedbacks

* adding fix to the PR comments

* removing distinct

* fixing the error in the query

* Apply suggestions from code review

Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>

* removing limit as suggested in the pr

* Adding evaluator to the factory and adding it to the seeds

* Adding PaperTrail for change history stuff

* adding schema

* adding new column to the table

* changed decider_decision_text to decider_note

---------

Co-authored-by: almorbah <al.mortada@va.gov>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>

* SeanC/APPEALS-40669 | Creation of ‘Pending admin review’ section on Edit Issues Page (#21604)

* Added fake data and rendering for it

* made the fake data better

* pending issues are being rendered

* passed up user admin of org from backend

* Added userIsOrgAdmin to the frontend

* created admin and non fake data

* determined fake data to use based on userIsOrgAdmin

* got the issues to render

* Created a new IssueModificationList component

* updated the issuemodification and row to work with the lists

* updated the fake data and the issues container

* removed some code for getting the user info

* updated IssueModificationRequest to make wireframe

* Updated row and list to work with the new request

* updated the fake data

* added propTypes to IssuesModificationList

* cleaned up some lint in addissues

* added Prop types to request

* added key to list

* improved row

* improved the row logic

* added some space to the list

* refactored the layout for the request

* added text to the COPY

* slight change to fake data

* refactored the row

* got sorting working

* added id to map of list

* updated formating functions for modificationIssueRequests

* updated the request to work with the formated data

* removed some console logs in row

* updated addIssues to format the fake data

* updated request to work with the serializer

* removed logs

* updated fake data and formatter

* removed unneed code

* removed unneed code

* removed unneed code

* Rename IssueModificationRow.jsx to issueModificationRow.jsx

* removed unneed code and renamed a couple things

* Slight change to request

* removed some comments

* added some data for the jest test

* got some of the jest tests working

* fixed a typo in request

* updated the prop for the tests

* fixed the broken test and added more for list

* Fixed the fake data and removed unneed code

* removed unneed coded

* changed the html in the request to better match the design

* added css rule for new class

* fixed an typo in COPY

* similified some logic in row

* added logic to not create the pending section if it is null

* cleaned up some lint in intake.scss

* updated the fake data to better match the wireframes

* added divider inbetween requests

* formatted the dates on the request

---------

Co-authored-by: Clay Sheppard <csheepy@gmail.com>

* TYLERB/APPEALS-39106: Creation of Pending tab (#21455)

* Initial commit to add the pending tab to the vha business line decision review queue.

* Updated existing tests and added new ones for the pending tab.

* Added tab task counts to the decision review queue.

* Adjusted variable names to match up with the feature branch. Made a column change to the create_issue_modification_request migration file. Added in methods to serialize the issue_modification_requests. Added pending_issue_modification_requests to the decision review serializer.

* Updated schema.

* Added a serialzer and related javascript and redux methods to place issue modification requests into the frontend.

* Updated tests to work with new issue modification request factories.

* Added a couple more test scenarios for the decision review controller spec file and changed the FactoryBot.create methods to create().

* Removed extra copies of the pending tab mappings and if statements from the decision reviews controller that happened due to the feature merge.

* Updated ReviewPage jest test snapshots. Updated and added more tests to the NonCompTabs jest test for the new pending tasks tab. Fixed an issue where the TaskTableTab was added an empty hash to the columns as a placeholder for the pending requests column instead of not adding any additional columns.

* Added a few constant variables to copy.json and queue config and removed todo statements.

* Fixed serializer tests and Fixed a constant name.

* Renamed some javascript variables to match the serializer.

* Fixed more broken tests.

* Updated the pending tasks query to show the correct amount of pending issues instead of an incorrect count. Added the pendingRequests column to the SORT_COLUMN_MAPPINGS in the decision reviews controller so that the user can sort by the new pending requests column via the controller. Added tests to cover these scenarios.

* Made some layout and css adjustments to the search bar and tab description for the decision review queue.

* Added padding to the bottom of the new search box and description div to create some space between ui elements. Changed the tab titles in the decision review queue to be title case for all words instead of only the first word.

---------

Co-authored-by: Brandon Lee Dorner <Brandondorner@yahoo.com>

* Appeals-40989 - Inclusion of required Decision Date Banner on Add Issues (#21588)

* APPEALS-40989: Adding functionality to check if user is vhaAdmin and task is in progress then display Banner and make decision date required.

* Fixing spec failures, adding new model spec, new task factory to support spec

* fixing linter issues in spec

* Adding storybook and fixing codeclimate complain

* fixing PR comments and adding banner to unidendified modal

* removing local font sizing

* fixing linter issue

* APPEALS-39446 - Modal creation – modification, removal, withdrawal, request additional issue [Non-Admin] (#21681)

* WIP components

TODO: validation/errors, redux

* add some error messages and the error schema for the addition modal

* add missing data error messages for the rest of the modals

* add test coverage for issue modification request frontend errors

* disable submit button until form is dirty

* remove currentIssue from request additional issue modal

* DRY out these modals

* clean up imports and some formatting

* WIP stuck the issue modification requests into redux

* add requested additional issues to the pending review section

* get benefit type from redux

* add test covering modal submission

* remove unnecessary expectation

* move a line to read better

* linting fixes and remove unneeded code

* update test

* really fix this test

* try to fix the add isues page

* fix ambiguous click in spec

* add storybook for modals

* update snapshot

* update capitalization in reviews spec

* destructure modal props

* more destructuring

* use full name and css id for requestor

* import less lodash

* fix some more capitalization

* remove old comment

* Update client/app/intakeEdit/components/RequestCommonComponents/RequestIssueFormWrapper.jsx

Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>

* Update client/app/intake/components/IssueModificationRequest.jsx

Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>

* prevent future dates in issue modification requests

* format decision date in current issue section

* Prior decision date -> Decision date

---------

Co-authored-by: Prajwal Amatya <122557351+pamatyatake2@users.noreply.github.com>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>

* TYLERB/APPEALS-39447: Display of banner on Edit Issues page – issues with pending requests (#21695)

* Initial commit. Added the PendingIssueModificationRequestsBanner. Added the connection between the serialized pending issue modification requests to the ui in the front end EditAddIssues page. Refactored the issueModificationRow, IssueModificationList, and IssueModificationRequest components. Changed the request_type enumeration to be lowercased to match the key value and changed the database schema, migration, and factory to match up with the new enumeration value.

* Added withdrawal_date to the serializer and redux store for issue modifications. Renamed a constant variable from body to message. Swapped a groupBy function to the lodash version since it was causing capyabara to fail for the feature test. Added a feature test for the banner. Also added a some helper functions and feature test checks for the issue modification requests when pulling data from the actual database objects instead of mocked data.

* Updated jest test.

* Added a backup description to the request issue in the IssueModificationRequest.jsx file so it will work for request issues being moved to the section via the ui.

* Changed an rspec matcher to fix code climate issue.

* Removed two junk console output files that were erroneously created.

* Made changes to the issue modification ui to match the feature branch changes and renamed the redux key to always use pendingIssueModificationRequests.

* Added a new redux store key for the originalPendingRequests in order to move them around. Reworked how the issues were being removed from the issues section when they are associated to an existing or new pending request.

* Cleaned up old issue modification request redux code.

* Reverted a change to the intake redux store since the objects are added via reference instead of an object clone.

* Fixed an issue where having empty pendingIssueModificationRequ
ests was causing a javascript error. Removed some todo comments and commented code.

* Removed another todo comment.

* Removed the pending requests banner from the cancel edit issues page.

* Changed the issue modification seeds file to use the correct values for the request_type attribute based on the enumeration value change to always use lowercase values. Updated a variable name in javascript to be more descriptive.

* Updated the RequestIssueFormWrapper component so that withdrawal and removal requests would behave in the same way as modification of existing issue requests. Fixed a bug where the decision date was being set to undefined or null for removal or withdrawal issue modification requests instead of taking the decision date from the original issue.

* Removed n+1 bullet warnings from the decision_review serialization process for pending_issue_modification_requests.

* APPEALS-45242 (partial) (#21759)

* add a doubleArrow option to SearchableDropdown

* overriden -> replaced

* JHoang/APPEALS-40672 (#21756)

* Initial commit. Added the PendingIssueModificationRequestsBanner. Added the connection between the serialized pending issue modification requests to the ui in the front end EditAddIssues page. Refactored the issueModificationRow, IssueModificationList, and IssueModificationRequest components. Changed the request_type enumeration to be lowercased to match the key value and changed the database schema, migration, and factory to match up with the new enumeration value.

* Added withdrawal_date to the serializer and redux store for issue modifications. Renamed a constant variable from body to message. Swapped a groupBy function to the lodash version since it was causing capyabara to fail for the feature test. Added a feature test for the banner. Also added a some helper functions and feature test checks for the issue modification requests when pulling data from the actual database objects instead of mocked data.

* Updated jest test.

* Added a backup description to the request issue in the IssueModificationRequest.jsx file so it will work for request issues being moved to the section via the ui.

* Changed an rspec matcher to fix code climate issue.

* Removed two junk console output files that were erroneously created.

* Made changes to the issue modification ui to match the feature branch changes and renamed the redux key to always use pendingIssueModificationRequests.

* Added a new redux store key for the originalPendingRequests in order to move them around. Reworked how the issues were being removed from the issues section when they are associated to an existing or new pending request.

* Cleaned up old issue modification request redux code.

* Reverted a change to the intake redux store since the objects are added via reference instead of an object clone.

* Fixed an issue where having empty pendingIssueModificationRequ
ests was causing a javascript error. Removed some todo comments and commented code.

* Removed another todo comment.

* Removed the pending requests banner from the cancel edit issues page.

* Changed the issue modification seeds file to use the correct values for the request_type attribute based on the enumeration value change to always use lowercase values. Updated a variable name in javascript to be more descriptive.

* Added modal to request cancellation of an existing request modification

* fix lint and failing jest

* conditional rendering in cancelpendingrequestissue modal

* fix decision date and withdrawal dates not showing correctly when requesting modification

* fix mocked props for CancelPendingRequestIssueModal.test.js

* revert date changes, fix issue description display

* Updated the RequestIssueFormWrapper component so that withdrawal and removal requests would behave in the same way as modification of existing issue requests. Fixed a bug where the decision date was being set to undefined or null for removal or withdrawal issue modification requests instead of taking the decision date from the original issue.

* added space between current issue and pending issue request

* refactor cancelpendingrequestissuemodal structure

* remove temp dropdown button

---------

Co-authored-by: = <tyler.broyles@va.gov>
Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>

* Al/appeals 45834 (#21641)

* Added non admin issue modification request logic

* added finial touches on NON::AdminModificationRequestsUpdater class

* Added logic to make sure that the user is an admin or non-admin who belongs to Vha organization

* Added some Rspec tests for `NonAdmin::IssueModificationRequestsUpdater` and cleaned up Class

* Added controller spec tests for SupplementalClaimsController#update HigherLevelReviewsController#update

* Code clean up

* Fixing lining errors

* code clean up

* Added code to fix some failing rspec tests

* fixed linting errors

* Ensure backend validation – only one request per issue
If an issue already has a request and another is submitted, an error is thrown

* rebased off latest feature branch and downcased request_type and status  params

* Added request_issue_id param to account for existing request_issues in situations when request_type is other than addition. Adjusted process_modification? method

* Added changes based on PR feedback

* added a shared example block to dry up code

* more feedback

* changed name file structure

* Needed to re-handle validation errors

* Pamatya/appeals 40671- adding Select action dropdown to the Admin section (#21788)

* Adding props and searchable dropdown to meet ac

* fixing linter, and adding test

* added storybook for issue modification row and issue section row

* fixing the values in the popup

* fixing the Removal and withdrawal modal to behave similar to modification modal

* making changes to the code to fix the bug

* fixing spec, linter and jest failures

* missing schema file

* changing the Onclick to take object instead of the index or identifier

* removing unused code

* code cleanup

* J hoang/appeals 40987 (#21889)

* move issue modification request actions to new file, created new confirm issue modification change modal

* fixed some code climate issues

* some changes from review

* fix jest

* added new action to update pending issue request

* maybe fix tests?

* revert pending admin review display

* change pending admin review display to active pending issues only

* fix pending admin display

* consistent parameter placement and added an extra check for requested issues display

* fix all failing tests

* fix movetopendingreview action call breaking rspec

* fix cancel buttons on confirm modal modification

---------

Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>

* APPEALS-46705: Addition of SearchableDropdown to IssueList (#21752)

* change issue action selector component and appearance

* fix padding

* fix linting error

* fix frontend tests

* fix list rendering bug

* wip fix one type of failure

* fix a couple more kinds of failure

* fix tests in ama_queue_workflow_spec

* fix a couple tests

* another one

* fix dropdown helpers to work if something was already selected

* fix test in edit_ep_claim_labels_spec

* fix issue modification request specs

* more tests

* update more tests

* whac a mole

* remove comment

* fix padding

* remove comment and whitespace

* make specs consistent

* SeanC/APPEALS-40670 | Update actions and pending request modal on Edit Issues Page – issues with pending requests [Non-Admin] (#21857)

* got the options actions working

* hooked up the cancel action

* added some styling for drop down

* changed the wording of the dropdown actions

* added new onClick action, added pending obj to state and cleared it

* passed the onClick to Row and List

* added onClick and useSelector to Request

* added new redux action

* removed comment

* added edit redux action

* fixed an issue from merge in addIssues

* updated the options to work with non admin actions and readOnly

* removed unneed styles

* removed comment

* changed modal title to change based on pendingIssueModificationRequests

* removed redundant code

* updated action and reducer to work with other code

* updated name of action on parent component

* updated form wrapper to work with new action

* fixed a failing spec test

* Added tests for action options for non and admin users

* refactored the props for the test for IssueModificationList

* slight change to the test

* add new test in issue_modification_request spec

* added logic in Request for the text to change slightly

* fixed a failing test

* fixed an error with the form wrapper

* fixed a few issues from the merge

* fixed failing test

* fixed an issue from the merge

* changed I back to i for issueModificationRow

* refactored options to a const in Request

* removed added comma in constants

* renamed const in FormWrapper

* removed no longer needed props in IssueModificationListProps

* removed setting the index when reviewing a modification request

* fixed a date formatting issue

* created const for pendingIssueModificationRequest

* Fixed issue with incorrectly changing admin modal title

* cleaned up some lint

* cleaned up more lint

* fixed an import issue

* removed conditional for the label text

* fixed a failing jest test

* fixed failing rspec

* removed comment in issue_modification_request_spec

* APPEALS-47866 (#21916)

* UX changes for modals

red buttons -> blue buttons
text wraps around icon
copy updates

* rspec updates

* update snapshots

* add a storybook for modals with icons

* refactor storybook

* remove class

* switch to constants

* remove unnecessary props

* fix the AddIssues storybook

* tinkering

* update snapshots again

* Pamatya/appeals 40997 v3 (#21926)

* move issue modification request actions to new file, created new confirm issue modification change modal

* fixed some code climate issues

* some changes from review

* fix jest

* added new action to update pending issue request

* maybe fix tests?

* revert pending admin review display

* change pending admin review display to active pending issues only

* fix pending admin display

* consistent parameter placement and added an extra check for requested issues display

* fix all failing tests

* fix movetopendingreview action call breaking rspec

* fix cancel buttons on confirm modal modification

* initial push

* renaming component and making the remove original issue button work

* fixing issues related with closing the modal and addissues page getting prerendered

* fixing spec failure

* fixing spec and linter issues

* adding spec test for approval and rejection

* new branch withdrawal date

* fixing bug and fixing the jest failure

* addressing comments

* fixing spec and linter failure

* code clean and consistency between two modals

* adding validation to the spec

* fixing the spec failure

* fixing spacing and spec

* fixing linter

---------

Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>

* Update schema.rb

Fix error in previous merge conflict attempt.

* Update seeds.rb

Fix error in conflict resolution

* TYLERB/APPEALS-40985: Frontend Submission of Requested Issues/Pending Admin Review Section (#21912)

* Initial commit. Altered an existing model validation for issue modification requests and added a new validation. Added a formatter to prepare the issue modification requests for form submission and altered the button text for vha to be save instead of establish if there are pending issue modificaiton requests in the redux store.

* Added the redirection code for claim reviews that have active pending issue modification requests. Also added the non admin issue modification success banner and refactored the existing flash banner code for other claim review types to make them easier to modify in the future.

* Fixed code climate issue.

* Renamed a function parameter in RequestIssueFormWrapper to make it more clear on what it is actually using. Updated logic to use a property insted of the form data.

* Refactored how the claim review controller was building flash messaging to make it easier to customize it for vha claim reviews.

* Added a new selectors file with a selector to only get openPendingModification requests which are pending modification requests that are assigned. Changed the selector in the PendingIssueModificationRequestBanner to the new selector.

* Moved the open pending issue modification requests selector to the intake selector. Imported it and used it in the add issues page.

* Fixed an issue where the decision date was not added as the correct string format to the issue modification redux store which was causing it to fail to save later after form submission. Expanded the feature test for non admin to include submitting the form and verifying the success banner and issue modification request data.

* Added one more additional check to the feature test.

* Added the open issue modification requests selector the save btton text for the edit issues page.

* Made changes to the CancelPendingRequests modal to work with a new reducer. Added edited and cancelled pending requests to the formatIssueModificationRequestSubmissionData function.

* Added an edited boolean attribute to the form data for modification type modals for pending requests for an easy way to determine if a issue modification request has been edited without changing the status.

* Removed max width from non comp description text.

* Fixed admin messaging when there are pending issue modification requests remaining on the claim review.

* Added all the remaining frontend code and logic to make the issue modification form submission work. Fixed an issue where withdrawal date was not working correctly with the existing withdrawal process.

* Refactored the claim review controller logic to work with the non admin and admin updates to issue modification requests. Added methods into issue modification request for admin updates. Updated validations. Refactored the non_admin_updater to work for both admin and non admin workflows. Added some fallback error handling for issue modification updates.

* Removed unused import.

* Updated the RequestIssueStatus component option value from rejected to denied to matchup with the enum field on the issue_modification_request model.

* Fixed two code climate issues. Rewrote the issue modification request factories to fix the seed data.

* Removed some lines from RequestIssueFormWrapper that I don't think were neccessary. Removed some todos.

* Fixed a couple of failing specs.

* Added a new feature test spec file that Praj created.

* Added code to make the associations for request issues to issue modification requests through the UI work correctly in the request_issues_update model for additions and modifications since it is creating brand new request issues instead of using existing records in the database.

* Renamed non_admin_updater_spec file and fixed tests.

* Code climate fix.

* Updated the mocked data controller tests.

* Renamed the NonAdminUpdater and all related files to Updater.

* Fixed a bug where the confirm pending request issue modal was not properly setting up the request issue by using the old request issue id that the modification request was associated to. Fixed a console warning in the RequestIssueStatus component.

* Fixed spec failures due to changing banner text for editing vha claims.

* Fixed an issue where the openPendingModificationRequests selector was causing a console error for legacy appeals due to different initialization of the redux store. Removed the no decision date banner for legacy appeals since it was never intended although it shouldn't happen.

* Fixed jest test for CancelPendingRequestIssueModal where the property name had changed.

* Added admin process testing to the updater_spec.rb service class for issue modification requests. Added errors to caseflow error.rb and added a constant to copy.json.

* Removed todo statements.

* Updated a modal snapshot.

* Fixed merge conflicts that didn't get resolved.

* Added an addition check for the wording to be correct for the issues update banner in add issues to properly reflect the wording of the save button at the bottom of the page depending on pending issue modification requests. Changed the wording on a success banner from established to edited that was incorrect. Added a different success banner for a vha claim review when it still has pending issue modification requests after an admin has only actioned some of them.

* Updated the NonRatingIssueRequestModal decision date logic to prevent a non vha user from adding an issue without a decision date to a claim that was already in progress.

* Fixed spec failures related to the banner text changes.

* Added a banner and block the save of the page if the user is about to close a claim via a removal or withdrawal while the claim still has a pending addition issue modification request on it. Added feature test for this and uncommented some feature test code that shouldn't have been commented out. Added a way to make the content column span two columns in the add issues page table for styling the banner.

* Moved the new banner check into the edit page block to fix tests.

* CSS text change for the alert banner.

* text change and text title change

* Removed the established vha text variable in the claim review controller since it isn't being used anymore. Fixed a linting error.

* test fix for alert title change

---------

Co-authored-by: almorbah <149511814+almorbah@users.noreply.github.com>
Co-authored-by: Prajwal Amatya <pamatya@take2it.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>

* Initial commit. Added a transaction wrapper around the update_admin_request updater service method to prevent partial processing of requests if an error occured during any of the processing. Added an if check to the claim review controller to make sure that the request issues update class can be processed before processing any of the approval issue modification requests to avoid processing the requests without modifying the request issues that are currently on the claim.

* Added in code climate change and seed data change to match master.

* Added a public method for request issues update to check for p
ossible errors before running the perform method. Refactored the controller logic to fix test failures.

* Added approval back it got accidently removed. Removed some spacing in addissues.jsx.

* Fixed a few flaky tests due to time errors.

* Pamatya/appeals 49849 (#22057)

* adding banner for both admin and non-admin and test

* typo correction

* removing commented out codes and adding a space between lines

* removing props from the syntax

* changing let to const

---------

Co-authored-by: Clay Sheppard <csheepy@gmail.com>
Co-authored-by: Brandon Lee Dorner <Brandondorner@yahoo.com>
Co-authored-by: jonathanh-va <111081469+jonathanh-va@users.noreply.github.com>
Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>
Co-authored-by: Prajwal Amatya <122557351+pamatyatake2@users.noreply.github.com>
Co-authored-by: almorbah <al.mortada@va.gov>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>
Co-authored-by: Brandon Dorner <brandonleedorner@gmail.com>
Co-authored-by: Sean Craig <110493538+seancva@users.noreply.github.com>
Co-authored-by: = <tyler.broyles@va.gov>
Co-authored-by: almorbah <149511814+almorbah@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <Pierce_Robert@ne.bah.com>
Co-authored-by: Prajwal Amatya <pamatya@take2it.com>

* updated dispatch mailer email address to Decisions instead of Hearings (#22095)

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>

* APPEALS-45631 Add and fix address (#21800)

* APPEALS-45631 Add and fix address

* empty commit

* empty commit

* fix/add RO id

* changed id from SS to GB

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>

* Prodtest/appeals-36234-appeals-44031 (#22109)

* APPEALS-36339 (#21436)

* Updated to remove obsolete levers of ACD Disable Legacy Distributions and ACD Disable Non-priority Distributions

* Fixed redundant linting issue

* Fixed empty line linting issue

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* mbeard/APPEALS-44379 (#21451)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44417 Seeds for Docket Lever Demo (#21534)

Co-authored-by: Christopher Detlef <>

* APPEALS-36345-updated (#21537)

* Refactored exclusion table

* Fixed ordering issue and testing

* mbeard/APPEALS-44379 (#21530)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

* first new commit with new args

* updates methods and test query

* updates age_of_oldest methods params

* cleans up method removes args and updates tests, fixes linting

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44346 Demo Docket Goal Lever Test Seed Data (#21524)

Co-authored-by: Christopher Detlef <>

* Chrisbdetlef/appeals 40705 (#21535)

* Chris backend Work

* APPEALS-44441. Added initial changes for individual seed

* WIP

* APPEALS-44441. Fixed the table css

* APPEALS-44441. Added Custom and Scenario Seed components and jest tests

* APPEALS-44441. Fix ScenarioSeeds jest test

* APPEALS-44441. Fix CustomeSeeds Jest test

* init commit

* fixes linting issues

* capybara test init

* APPEALS-44441. Backend Integration API changes

* APPEALS-44441_1. Matched the constant keys in the backend

* APPEALS-44441_1. Update the param to match the backend and fixed spec

* APPEALS-44441. lint fixes

* APPEALS-44441. linting fixes

* sharsha/APPEALS-44441. fixed the route and tests

* Change route

* Change variables to match front and back end

* CustomSeed Jest test fix

* Fix issues

* Fix rubocop issues

* Use existing method in the controller

---------

Co-authored-by: Christopher Detlef <>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Michael Beard <michael.beard@va.gov>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 (#21566)

* Fixed rspec failures on constants

* APPEALS-45531. Remove dead code

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Updated lever history to handle null unit values from docket levers (#21567)

Co-authored-by: 631966 <amy.detwiler@va.gov>

* Sharsha/appeals 45531_1 (#21573)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 1 (#21609)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

* TEST FOR FIX

* MORE TESTING

* Fixed rspec issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45502. Organize route and fix the controller (#21595)

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Ricky/APPEALS-36345.fixes (#21612)

* Updated lever history to handle null unit values from docket levers

* Updated member view of exclusion table with proper text display and fixed missing css

* Updated unit test and test data to test rendering of exclusionTable

---------

Co-authored-by: 631966 <amy.detwiler@va.gov>

* ricky/APPEALS-44053 (#21587)

* init commit, adds conditional to check for docket_type ama to method, fixes json constants to snakecase

* puts statements testing

* updates seeds for evidence_submission, adds method to hearing_request_docket.rb and dist_concern.rb

* updated appeals dsit

* final fix for PR

* updates spec to reflect changes in hearing_request_docket

* uncomments seeds

* Ricky/appeals 43523 (#21649)

* Added Assignment Queue link to Switch Users test page

* Updated controller to validate role and redirect

* Updated error information

* Updated rspec tests

---------

Co-authored-by: 631068 <rickybmanus@gmail.com>

* APPEALS-45898. Updated the lever_group_order values (#21639)

* APPEALS-45898. Updated the lever_group_order values

* APPEALS-45898. Updated order of the evidence submission priority and non-priority

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-40646 (#21645)

* Init commit

* adds methods and useffect first pass

* fixes isIdle warning

* removes important from scss

* refined handleToggleChange method

* updates font color for h4

* adds keys to the td and fixed proptype for loadAcdExcludeFromAffinity in casedistributionapp

* Chrisbdetlef/appeals 43117.cleanup (#21671)

* APPEALS-43421: Attorney Selection Sticking on Dropdown after Assignment (#21401)

* redo init commit

* updated imp. logic

* attorney widget fix

---------

Co-authored-by: Calvin <Calvin.Costa@va.gov>

* Add ruby CE API Gem

* remove correspondence changes from schema.rb (#21468)

* Revert "Add ruby CE API Gem" (#21479)

This reverts commit c78afe30620716d59d2ac31ad6eed71585d78a98.

* Override SCT Bulk Assign Page task limit (#21465)

* Override SCT Bulk Assign Queue 15 case limit & Adjust SCT attorney assign task action label

* feature/APPEALS-35707-29633-29632 (prodtest) (#21485)

* 🔀 Squash merge AlecK/APPEALS-35707 - Replace `database_cleaner` with `database_cleaner-active_record`

* 🔀 Squash merge jcroteau/APPEALS-29632-fix-deprecation-action-view-base-instances

* 🔀 Squash merge jcroteau/APPEALS-29633-fix-deprecation-warning-active_record-result-to_hash

* feature/APPEALS-44871 Steps for installing node in the Caseflow demo environment  (#21483) (#21484)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Revert "feature/APPEALS-44871 Steps for installing node in the Caseflow demo …" (#21489)

This reverts commit a6262001f9bedabca60598c82bfe1b803f0f16c7.

* Sbashamoni/appeals 44871 node14 demo fixes (#21490) (#21495)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* add error rules to demo builds (#21496) (#21498)

Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>

* APPEALS-43117 Add QA Users for testing

* Fix rspecs

* Fix issues with attorneys and judge teams

* Fix org count

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: youfoundmanesh <maneshreddy.kommidi@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>
Co-authored-by: Christopher Detlef <>

* Minor fixes (#21694)

* Minor fixes

* Fix rspec tests and properly check for judge css id

* Fix lint issue

---------

Co-authored-by: Christopher Detlef <>

* Fix Legacy Case issues (#21747)

Co-authored-by: Christopher Detlef <>

* APPEALS-46037. Fix padding in the lever history table (#21725)

* APPEALS-46037. Fix padding in the lever history table

* APPEALS-46037. Fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Fix Lauren Roth issue (#21813)

* Users with a VACOLS::Staff entry no longer get created with the default name of Lauren Roth

Co-authored-by: Christopher Detlef <>

* ricky/APPEALS-44044 (#21814)

* first pass at legacy_docket method and spec

* second iteration of legacy_docket and spec

* adds method to age_of_oldest methods and updates test scenarios

* Updated testing and expanded method missing logic

* Updated legacy_docket_spec file and tests

* Updated boolean logic, updated rspecs and factories

* Updated rspec tests to include factories

* updates docket_spec line 317 and factory for disable_ama_non_priority_direct_review

---------

Co-authored-by: Michael Beard <michael.beard@va.gov>

* updates ready_priority_nonpriority_appeals to public_send, updates test (#21844)

* APPEALS-36333 first iteration of docket time goal and prior to goal (#21523)

* APPEALS-36333 first iteration of docket time goal and prior to goal

* APPEALS-36333 address pr comments and moved the logic to docket model

* APPEALS-36333 Added specs for docket and hearing request docket models

* refactored code and moved it to distribution scopes

* APPEALS-36333 address pr comments and refactor code

* APPEALS-43996 updated lever name in all the required files to fix spec failures

* APPEALS-44000 revert hearing request docket model changes to keept it in sync with feature

* APPEALS-44000 updated hearing request docket model specs

* APPEALS-44000 fixed jest tests

* APPEALS-44000 fixed broken rspecs

* APPEALS-43996 fix rubocop warnings

* APPEALS-43996 fix push priority job spec failures

* APPEALS-43996 Updated case distribution lever and docker model and refactor specs

* APPEALS-43996 added rake task to update case distribution lever item in db

* APPEALS-43996 update docket model to handle the scenario when the lever being disabled by a user via the UI

* APPEALS-43996 update section title

* APPEALS-43996 revert rake task

* APPEALS-43996 add new factories to case distribution lever and fix spec failures

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks (#21834)

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks

* APPEALS-45191. Refactor and fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* refactor the logic and fix docket spec failures

* changed the call times to 3 times

* APPEALS-36333 fixed the docket time goal to check the existence of the item before using the public send to get the value

---------

Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: 631966 <amy.detwiler@va.gov>

* updated the seeds to align with the work completed

* Updated Toggle Switch behavior when clicked while idle (#21874)

* Csv research (#21892)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

* csv and etc

* CSS for buttons

* jest tests for the reducer and action types

* Jest test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-46057. CleanUP (#21914)

* more jest tests

* Disable scenario seeds

* Lint fixes

* APPEALS-46057. disable all scenario seeds

* APPEALS-46057. Refactor the TestSeed wrapper to be a functional component and fixed jest test

* APPEALS-46057. Jest job in GHA complaining on test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* updates line of test to correctly build lever item (#21918)

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45191. Updated the query to return the date based on the calculation (#21928)

* APPEALS-45191. Updated the query to return the date based on the calculation

* APPEALS-45191. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisharsha/appeals 43962 (#21929)

* Sharsha/appeals-44911_1 (#21784)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisbdetlef/appeals 44910 (#21838)

* Initial

* Add JSON parsing and multiple calls to rake tasks

* Pre-caby tets

* Add capybara tests and add IDs to buttons

---------

Co-authored-by: Christopher Detlef <>

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: cdetlefva <133903625+cdetlefva@users.noreply.github.com>

* APPEALS-43962. Lint fixes (#21932)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Ricky/APPEALS-47293 (#21925)

* First pass implementation of fixing seeding rspecs

* Second pass at fixing errors in rspecs

* Revert updates to test if rspec passes

* Fixed linting issues in test_docket_seeds_controller_spec

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-48292 updated the column to be a string (#21954)

* APPEALS-48292 updated the column to be a string

* APPEALS-48292 added comment to the control_group field in the migration

* APPEALS-48292 added column comment to the schema, changed migration so that it can be rolled back

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false (#21948)

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false

* APPEALS-49004 added spec to check when Start Distribution Prior to Docket Time Goal toggle is on

* APPEALS-49004 fixed lint issues in docket.rb

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query (#21949)

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query

* APPEALS-48898. Renamed the column and update the method

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-49100. getting value from the start_distribution_prior_to_goal (#21968)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-46257 (#21976)

* updates routes and frontend urls to namespace

* removes superfluous <a> tags

* Ensure that legacy appeals are being created (#21981)

* Ensure that legacy appeals are being created

* Remove puts

---------

Co-authored-by: Christopher Detlef <>

* APPEALS-49403. Added buttons Docket Lever Seed (#21989)

* APPEALS-49403. Added buttons Docket Lever Seed

* sharsha/APPEALS-49403. Updated the endpoint URL path

* APPEALS-49403. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-44000 added check to skip priority appeals in docket model (#21992)

* Feature/appeals 36234 masterupgrade (#22003)

* sbashamoni/APPEALS-43724 Node 16 version upgrade changes (#21966) (#21975)

* Update node verstion to 16 in git workflow

* Update node verstion to 16 in nvm and dockerfile for demo

* Update node version in yarn.lock and package.json and .nvmrc file

* Update node's version path to node16 in docker-bin/env.sh

* Update and upgrade to node16 in client

* More updates to yarn.lock and package.json

* Fix tests by Adam Shaw

* Upadate snapshot for ScheduleVeteran.test.js.snap

* Doing some code clean up

* Doiing some more clean up

* Add and remove spaces to match master

* One more space to take care of

* One more space to take care of again

* One more space to take care of again

---------

Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* init master merge branch

---------

Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* Remove AOD trait from non-priority legacy appeal creation (#22013)

Co-authored-by: Christopher Detlef <>

* Sharsha/appeals 49461 (#22018)

* sharsha/APPEALS-49461. initial commit

* sharsha/APPEALS-49461. fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49421 (#22014)

* init commit fixes ama_np_ capybara test to expect user as admin, and first attempt  test_docket_seeds test

* removes previous chane for TASKS_LOADED

* fixes capybara for test seeds controller button ids

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-49403. Updated the buttons label (#22025)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49585 (#22020)

* init commit for non member view input

* fixes css issue for docket-lever-right

* Added a hyphen between value and unit for member only view

* replaces hyphen with comma

* Init commit replaces th with div for 508 compliance (#22036)

* Chrisbdetlef/appeals 47008 1 (#22040)

* Allow judges to see legacy cases and attorneys to be assigned cases

* Remove testing function

* Update spec to reflect new user count in seed file

---------

Co-authored-by: Christopher Detlef <>

* got rid of extraneous file

* got rid of yarn lock orig

* Include bandwidth as part of timeout error metric data (#21946)

* Include bandwidth as part of timeout error metric data

* add NetworkUtil.js file

* fix code climate issues

* fix linting issue

* remove safari webdriver test

* fix CI/CD issue with chrome_driver

* add tests for NetworkUtil.js

* move bandwidth to metric_attributes

* requested changes* fix NetworkUtil-test

---------

Co-authored-by: mikefinneran <110622959+mikefinneran@users.noreply.github.com>

* APPEALS-50734. Remove Legacy appeals from the query (#22071)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-46087 fix css table width issues for case distribution lever history table (#22024)

* Feature/appeals 36234.merge master.20240701 (#22075)

* APPEALS-47277 remove Vegas office (#21876)

* APPEALS-47277 remove Vagas office

* Removed Texas ID from other files and updated tests

* Snapshot update

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* hotfix/APPEALS-22403 (#21942)

* add identifier for filenumber or ssn in filenumber search

* linting

* codeclimate linting

* update match call to return boolean

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* APPEALS-46907: Update to Determination of Gen Pop Legacy Cases (#21986)

* Isaiah/merge 46910 (#21983)

* removed BFHINES checks and modified tests

* removed lingering bfhines test

* modified test

* most recent updates on tests for passing status

* removed refs to cavc updates

* Skip flaky test ro_viewhearsched_spec

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* APPEALS-44916: Case Distribution Affinity Calculations (#21899)

* APPEALS-44956: Add AppealAffinity model and database table (#21526)

* add migration for appeal_affinities

* add AppealAffinity model and associations, update migration for new column

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

* add new job, update affinity model validation and after save hook

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

* add return in job if no query results, tests for no query results

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

* remove comment, fix hearing factory, disable some seeds for testing

* add more tests

* test refactor

* update appeals for dist query to add affinity start, add seed file, fix hearing factory, add stat to dist factory

* disable new seed on reset

* update seed file with vet names, add another seed category

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* APPEALS-44959: Modify affinity date checks to use appeal_affinity (#21611)

* swap distribution queries from distribution_task to appeal_affinities

* update seed files to use appeal affinities instead of distribution task

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

* fix user seed, fix date format in distribution task instructions

* fix tests for date format update

* Calvin/APPEALS-44957-rake-affinity (#21577)

* grabbed receipt dates from distributed cases

* refactored for functionality + added method to grab appeals that match

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

* if appeal affinity is nil, it will now be updated

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

* updated start date to receipt date instead of Time.now

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

* APPEALS-46016: Add Affinity Start Date to the Explain Page (#21660)

* add affinity start date to explain page

* add feature test to verify dates display

* update rake task and spec (#21731)

* APPEALS-46325: Add Seeds for AOD Appeals and Update Dates to Match CAVC (#21730)

* add aod hearing cases to ama affinity cases seed

* fix lever spec

* APPEALS-45148: Hook to clear saved affinity date (#21623)

* initial imp. idea

* AC1: check for affinity_start_date on assignment

* AC2/3: update affinity start date  w/ instr.

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

* add case dist lever to new tests (#21776)

* remove unnecessarily included module from job (#21827)

* APPEALS-47211: Improve Performance of Distribution Queries (#21840)

* rework ready_for_distribution scope

* fix non-hearing docket distribution bug

* restart tests

* added null checks for appeal affinity in distribution queries, update tests (#21893)

* add check for appeal being active to distribution and associated slack message (#21902)

* Update users_spec.rb

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* hotfix/APPEALS-45177: TaskTable Default Sorting Fix (#21772)

* Updated the TaskTable component to use the defaultSort property instead of the defaultSortIdx property for queue table since that property is not used anywhere. Added a default sorting hash to the UnassignedCasesPage component and now pass that down to TaskTable. Removed references to defaultSortIdx.

* Added the type column default sort to the AssignedCasesPage widget as well.

* Added a parenthesis for clarity around a boolean. Moved the defaultSortingHash out into a constants file.

---------

Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>

* APPEALS-47106 Caseflow Swagger (#21993)

* Add Rswag and convert existing API documentation (#21778)

* add rswag

* Update Gemfile.lock

* Setup yaml UI

* remove and reroute old swagger files

* update format and servers values

* Update route_docs_controller.rb

* Update cmp_controller.rb

* cmp endpoint yaml

* cmp endpoint to return 501

* CMP endpoint swagger flies

* update swagger files

* adjust server order, add auth token

* cmp parameter name change

* add comments

* Update users_controller.rb

* unit tests and linting

* lint fixes

* Update swagger_helper.rb

* APPEALS-48048 Swagger Updates (#21909)

* update servers to not include a host

* remove host for server

* remove generated swaggers from definitions

* remove internal API endpoints from having generated swagger

* IDT servers fixes

* disable CMP swagger in prod and prodtest

* set authorization correctly

* fix what is required for CMP upload

* fix linting issues, update lint rake task to autocorrect for rubocop, add rubocop make command

* Update decision_reviews.yaml

* Update ama_issues.yaml

* Update vacols_issues.yaml

* Update swagger.yaml

* fix check failures

* Update docs_controller_spec.rb

* fix unit tests

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update rswag_ui.rb

* Update lint.rake

* Update decision_reviews_spec.rb

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update veterans_controller_spec.rb

* feature/APPEALS-43597 RC1.5.1 (#21996)

* APPEALS-36759 Add sms_response_content and sms_response_time notifications table

* APPEALS-37003 First pass at job refactor

* APPEALS-37003 Add comments and update kwargs for va notify service

* APPEALS-37003 Update spec files

* APPEALS-37003 Update spec

* APPEALS-37003 Ensure user in job and create email_enabled method

* APPEALS-37003 Remove question mark

* Limit max retry attempts to 5

* Add ? to boolen return methods

* jcohen/APPEALS-43706 (#21444)

* APPEALS-43706 macros added to each model file for the polymorphic relationship to be setup.

* APPEALS-43706 migration made and yet to be run.

* APPEALS-43706 migrations ran and expected columns and indexes are in table.

* Fix some spec failures unrelated to this branch

* Limit schema diff

* Add a missing tab

* Fix more unrelated failures. Also prevent ACD lever seeds from overwriting spec output

* Fix last unrelated failure.

* APPEALS-43706 linting issues in va_notify_service fixed.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* [APPEALS-43598] Quarterly Notification Job refactoring (#21505)

* Quarterly Notification Job refactoring

* APPEALS-43598 Fix lint issues for QuarterlyNotificationsJob refactor

* APPEALS-43598 Fix db schema.rb file

* APPEALS-43598 Fix schema.rb file

* APPEALS-43598 Refactoring QuarterlyNotificationsJob for readability

* APPEALS-43598 Refactoring QuarterlyNotificationsJob and removing extra methods

* [APPEALS-43598] Update method name

---------

Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-44007: Eliminate Transmission of Notifications to Deceased Veterans (#21481)

* APPEALS-44007: Writing tests to ensure adding the 'failure due to deceased' information is properly set and added to the db

* updates to pr

* pushing changes for tonight

* updating spec file to handle enabling and disabling feature flags

* Update format_message_status

* Lint roll

* fixing conflicts

* Updates to send notification spec

* Fix one of the legacy test cases

* Remove accidental push

* Fix remaining test

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-45235: Remove Temporary PDF Files From tmp Directory After All eFolder Upload Attempts (#21557)

* Cleanup files after uploading to VBMS

* Only delete file if it exists

* Resolve linter issue

* Update specs

* Trigger CodeClimate

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Add appeal alias for notifiable

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications (#21575)

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications

* fixing some errors

* updating factory

* updating tests

* updating tests and factory

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-43596 Adding JobMessageDeletionMiddleware to delete SQS messages for certain jobs

* APPEALS-43596 Adding tests

* APPEALS-43596 Fix codeclimate

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables (#21596)

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables

* pushing changes

* updating…
almorbah added a commit that referenced this pull request Jul 24, 2024
* APPEALS-44148: Add ruby_claim_evidence_api gem (#22059)

* APPEALS-50758: Fix broken tests in spec/controllers/case_distribution_levers_controller_spec.rb (#22072)

* update test data to fix tests

* fix test data setup

* fix dates in test setup

* disable flaky jest test

* APPEALS-49845: Hearing CAVC Appeals are not respecting CAVC affinity (#22043)

* pass judge into base relation queries on hearing docket

* update scopes to distribute CAVC hearing to original judge when within hearing window

* APPEALS-49845: Add seed data (#22056)

* add seed data

* fix users seed spec

* APPEALS-49555: Some AOD appeals are not being selected as priority by the distribution algorithm (#22067)

* aod appeal with claimants person does not contain DOB

* Addressed comments

---------

Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>

* Merge feature/appeals-34320 into release branch (#22094)

* ClayS/APPEALS-39107 (#21458)

* add request issue modification button for non-admins

* add tests covering the request issue modification button

* appease rubocop overlord

* update feature tests

* change to inline style and absolute import

* update feature test

---------

Co-authored-by: Brandon Lee Dorner <Brandondorner@yahoo.com>

* JHoang/APPEALS-39445 (#21445)

* added new dropdown actions  for edit issues, restricted visibility to non vha admins

* fix failing tests

* update jest for new dropdown actions

* added placeholder modal for request additional issue button

* Replace relative import with absolute, rename variable to check for non vha admin

* render new dropdown actions and button only for in progress tasks

* revert previous changes, added new changes

* fix typo in issuelist

* typo again

* remove extra empty line

* fix jest tests and vha_hlr_sc rspec

* address styling issues

* more restrictions to dropdown/button visibility

* remove unused comments

---------

Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>

* Pending Request Issues seeds, factories and query update (#21437)

* migration and initial commit of the factory

* changing approve status to status

* Added active record associations on models, added factory attributes, added pending tasks on queue tab

* adding AC-2 condition to get pending record response from pending_request_issue table

* factory and seed for pending_request_issues

* Added pending request issues count alias for sorting and serialization to Task query

* adding issue_type_Count and task_type_count for pending tab

* Added spec tests for vha business line and business line spec files, cleaned up the controller, modified issue_type_count query

* fixing the spec failures and code climate issues

* removed byebug

* Fixing code climate issue and adding seed data

* fixing the schema error

* Revert "fixing the schema error"

This reverts commit 73070faa40a5615c45ae9e7ec5a0bef74f419e9e.

* skip association so that test passes

* renaming the table to - issue_modification_request and corresponding changes to the model, factories

* fixing spec failures and linter

* fixing spec failures and linter

* making sure pending tasks doesnt show up in in progress tab and modified the factory so that Claimant name appears

* fixing the spec failure

* removing coalesce and removing null: true

* more PR feedbacks

* adding fix to the PR comments

* removing distinct

* fixing the error in the query

* Apply suggestions from code review

Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>

* removing limit as suggested in the pr

* Adding evaluator to the factory and adding it to the seeds

* Adding PaperTrail for change history stuff

* adding schema

* adding new column to the table

* changed decider_decision_text to decider_note

---------

Co-authored-by: almorbah <al.mortada@va.gov>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>

* SeanC/APPEALS-40669 | Creation of ‘Pending admin review’ section on Edit Issues Page (#21604)

* Added fake data and rendering for it

* made the fake data better

* pending issues are being rendered

* passed up user admin of org from backend

* Added userIsOrgAdmin to the frontend

* created admin and non fake data

* determined fake data to use based on userIsOrgAdmin

* got the issues to render

* Created a new IssueModificationList component

* updated the issuemodification and row to work with the lists

* updated the fake data and the issues container

* removed some code for getting the user info

* updated IssueModificationRequest to make wireframe

* Updated row and list to work with the new request

* updated the fake data

* added propTypes to IssuesModificationList

* cleaned up some lint in addissues

* added Prop types to request

* added key to list

* improved row

* improved the row logic

* added some space to the list

* refactored the layout for the request

* added text to the COPY

* slight change to fake data

* refactored the row

* got sorting working

* added id to map of list

* updated formating functions for modificationIssueRequests

* updated the request to work with the formated data

* removed some console logs in row

* updated addIssues to format the fake data

* updated request to work with the serializer

* removed logs

* updated fake data and formatter

* removed unneed code

* removed unneed code

* removed unneed code

* Rename IssueModificationRow.jsx to issueModificationRow.jsx

* removed unneed code and renamed a couple things

* Slight change to request

* removed some comments

* added some data for the jest test

* got some of the jest tests working

* fixed a typo in request

* updated the prop for the tests

* fixed the broken test and added more for list

* Fixed the fake data and removed unneed code

* removed unneed coded

* changed the html in the request to better match the design

* added css rule for new class

* fixed an typo in COPY

* similified some logic in row

* added logic to not create the pending section if it is null

* cleaned up some lint in intake.scss

* updated the fake data to better match the wireframes

* added divider inbetween requests

* formatted the dates on the request

---------

Co-authored-by: Clay Sheppard <csheepy@gmail.com>

* TYLERB/APPEALS-39106: Creation of Pending tab (#21455)

* Initial commit to add the pending tab to the vha business line decision review queue.

* Updated existing tests and added new ones for the pending tab.

* Added tab task counts to the decision review queue.

* Adjusted variable names to match up with the feature branch. Made a column change to the create_issue_modification_request migration file. Added in methods to serialize the issue_modification_requests. Added pending_issue_modification_requests to the decision review serializer.

* Updated schema.

* Added a serialzer and related javascript and redux methods to place issue modification requests into the frontend.

* Updated tests to work with new issue modification request factories.

* Added a couple more test scenarios for the decision review controller spec file and changed the FactoryBot.create methods to create().

* Removed extra copies of the pending tab mappings and if statements from the decision reviews controller that happened due to the feature merge.

* Updated ReviewPage jest test snapshots. Updated and added more tests to the NonCompTabs jest test for the new pending tasks tab. Fixed an issue where the TaskTableTab was added an empty hash to the columns as a placeholder for the pending requests column instead of not adding any additional columns.

* Added a few constant variables to copy.json and queue config and removed todo statements.

* Fixed serializer tests and Fixed a constant name.

* Renamed some javascript variables to match the serializer.

* Fixed more broken tests.

* Updated the pending tasks query to show the correct amount of pending issues instead of an incorrect count. Added the pendingRequests column to the SORT_COLUMN_MAPPINGS in the decision reviews controller so that the user can sort by the new pending requests column via the controller. Added tests to cover these scenarios.

* Made some layout and css adjustments to the search bar and tab description for the decision review queue.

* Added padding to the bottom of the new search box and description div to create some space between ui elements. Changed the tab titles in the decision review queue to be title case for all words instead of only the first word.

---------

Co-authored-by: Brandon Lee Dorner <Brandondorner@yahoo.com>

* Appeals-40989 - Inclusion of required Decision Date Banner on Add Issues (#21588)

* APPEALS-40989: Adding functionality to check if user is vhaAdmin and task is in progress then display Banner and make decision date required.

* Fixing spec failures, adding new model spec, new task factory to support spec

* fixing linter issues in spec

* Adding storybook and fixing codeclimate complain

* fixing PR comments and adding banner to unidendified modal

* removing local font sizing

* fixing linter issue

* APPEALS-39446 - Modal creation – modification, removal, withdrawal, request additional issue [Non-Admin] (#21681)

* WIP components

TODO: validation/errors, redux

* add some error messages and the error schema for the addition modal

* add missing data error messages for the rest of the modals

* add test coverage for issue modification request frontend errors

* disable submit button until form is dirty

* remove currentIssue from request additional issue modal

* DRY out these modals

* clean up imports and some formatting

* WIP stuck the issue modification requests into redux

* add requested additional issues to the pending review section

* get benefit type from redux

* add test covering modal submission

* remove unnecessary expectation

* move a line to read better

* linting fixes and remove unneeded code

* update test

* really fix this test

* try to fix the add isues page

* fix ambiguous click in spec

* add storybook for modals

* update snapshot

* update capitalization in reviews spec

* destructure modal props

* more destructuring

* use full name and css id for requestor

* import less lodash

* fix some more capitalization

* remove old comment

* Update client/app/intakeEdit/components/RequestCommonComponents/RequestIssueFormWrapper.jsx

Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>

* Update client/app/intake/components/IssueModificationRequest.jsx

Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>

* prevent future dates in issue modification requests

* format decision date in current issue section

* Prior decision date -> Decision date

---------

Co-authored-by: Prajwal Amatya <122557351+pamatyatake2@users.noreply.github.com>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>

* TYLERB/APPEALS-39447: Display of banner on Edit Issues page – issues with pending requests (#21695)

* Initial commit. Added the PendingIssueModificationRequestsBanner. Added the connection between the serialized pending issue modification requests to the ui in the front end EditAddIssues page. Refactored the issueModificationRow, IssueModificationList, and IssueModificationRequest components. Changed the request_type enumeration to be lowercased to match the key value and changed the database schema, migration, and factory to match up with the new enumeration value.

* Added withdrawal_date to the serializer and redux store for issue modifications. Renamed a constant variable from body to message. Swapped a groupBy function to the lodash version since it was causing capyabara to fail for the feature test. Added a feature test for the banner. Also added a some helper functions and feature test checks for the issue modification requests when pulling data from the actual database objects instead of mocked data.

* Updated jest test.

* Added a backup description to the request issue in the IssueModificationRequest.jsx file so it will work for request issues being moved to the section via the ui.

* Changed an rspec matcher to fix code climate issue.

* Removed two junk console output files that were erroneously created.

* Made changes to the issue modification ui to match the feature branch changes and renamed the redux key to always use pendingIssueModificationRequests.

* Added a new redux store key for the originalPendingRequests in order to move them around. Reworked how the issues were being removed from the issues section when they are associated to an existing or new pending request.

* Cleaned up old issue modification request redux code.

* Reverted a change to the intake redux store since the objects are added via reference instead of an object clone.

* Fixed an issue where having empty pendingIssueModificationRequ
ests was causing a javascript error. Removed some todo comments and commented code.

* Removed another todo comment.

* Removed the pending requests banner from the cancel edit issues page.

* Changed the issue modification seeds file to use the correct values for the request_type attribute based on the enumeration value change to always use lowercase values. Updated a variable name in javascript to be more descriptive.

* Updated the RequestIssueFormWrapper component so that withdrawal and removal requests would behave in the same way as modification of existing issue requests. Fixed a bug where the decision date was being set to undefined or null for removal or withdrawal issue modification requests instead of taking the decision date from the original issue.

* Removed n+1 bullet warnings from the decision_review serialization process for pending_issue_modification_requests.

* APPEALS-45242 (partial) (#21759)

* add a doubleArrow option to SearchableDropdown

* overriden -> replaced

* JHoang/APPEALS-40672 (#21756)

* Initial commit. Added the PendingIssueModificationRequestsBanner. Added the connection between the serialized pending issue modification requests to the ui in the front end EditAddIssues page. Refactored the issueModificationRow, IssueModificationList, and IssueModificationRequest components. Changed the request_type enumeration to be lowercased to match the key value and changed the database schema, migration, and factory to match up with the new enumeration value.

* Added withdrawal_date to the serializer and redux store for issue modifications. Renamed a constant variable from body to message. Swapped a groupBy function to the lodash version since it was causing capyabara to fail for the feature test. Added a feature test for the banner. Also added a some helper functions and feature test checks for the issue modification requests when pulling data from the actual database objects instead of mocked data.

* Updated jest test.

* Added a backup description to the request issue in the IssueModificationRequest.jsx file so it will work for request issues being moved to the section via the ui.

* Changed an rspec matcher to fix code climate issue.

* Removed two junk console output files that were erroneously created.

* Made changes to the issue modification ui to match the feature branch changes and renamed the redux key to always use pendingIssueModificationRequests.

* Added a new redux store key for the originalPendingRequests in order to move them around. Reworked how the issues were being removed from the issues section when they are associated to an existing or new pending request.

* Cleaned up old issue modification request redux code.

* Reverted a change to the intake redux store since the objects are added via reference instead of an object clone.

* Fixed an issue where having empty pendingIssueModificationRequ
ests was causing a javascript error. Removed some todo comments and commented code.

* Removed another todo comment.

* Removed the pending requests banner from the cancel edit issues page.

* Changed the issue modification seeds file to use the correct values for the request_type attribute based on the enumeration value change to always use lowercase values. Updated a variable name in javascript to be more descriptive.

* Added modal to request cancellation of an existing request modification

* fix lint and failing jest

* conditional rendering in cancelpendingrequestissue modal

* fix decision date and withdrawal dates not showing correctly when requesting modification

* fix mocked props for CancelPendingRequestIssueModal.test.js

* revert date changes, fix issue description display

* Updated the RequestIssueFormWrapper component so that withdrawal and removal requests would behave in the same way as modification of existing issue requests. Fixed a bug where the decision date was being set to undefined or null for removal or withdrawal issue modification requests instead of taking the decision date from the original issue.

* added space between current issue and pending issue request

* refactor cancelpendingrequestissuemodal structure

* remove temp dropdown button

---------

Co-authored-by: = <tyler.broyles@va.gov>
Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>

* Al/appeals 45834 (#21641)

* Added non admin issue modification request logic

* added finial touches on NON::AdminModificationRequestsUpdater class

* Added logic to make sure that the user is an admin or non-admin who belongs to Vha organization

* Added some Rspec tests for `NonAdmin::IssueModificationRequestsUpdater` and cleaned up Class

* Added controller spec tests for SupplementalClaimsController#update HigherLevelReviewsController#update

* Code clean up

* Fixing lining errors

* code clean up

* Added code to fix some failing rspec tests

* fixed linting errors

* Ensure backend validation – only one request per issue
If an issue already has a request and another is submitted, an error is thrown

* rebased off latest feature branch and downcased request_type and status  params

* Added request_issue_id param to account for existing request_issues in situations when request_type is other than addition. Adjusted process_modification? method

* Added changes based on PR feedback

* added a shared example block to dry up code

* more feedback

* changed name file structure

* Needed to re-handle validation errors

* Pamatya/appeals 40671- adding Select action dropdown to the Admin section (#21788)

* Adding props and searchable dropdown to meet ac

* fixing linter, and adding test

* added storybook for issue modification row and issue section row

* fixing the values in the popup

* fixing the Removal and withdrawal modal to behave similar to modification modal

* making changes to the code to fix the bug

* fixing spec, linter and jest failures

* missing schema file

* changing the Onclick to take object instead of the index or identifier

* removing unused code

* code cleanup

* J hoang/appeals 40987 (#21889)

* move issue modification request actions to new file, created new confirm issue modification change modal

* fixed some code climate issues

* some changes from review

* fix jest

* added new action to update pending issue request

* maybe fix tests?

* revert pending admin review display

* change pending admin review display to active pending issues only

* fix pending admin display

* consistent parameter placement and added an extra check for requested issues display

* fix all failing tests

* fix movetopendingreview action call breaking rspec

* fix cancel buttons on confirm modal modification

---------

Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>

* APPEALS-46705: Addition of SearchableDropdown to IssueList (#21752)

* change issue action selector component and appearance

* fix padding

* fix linting error

* fix frontend tests

* fix list rendering bug

* wip fix one type of failure

* fix a couple more kinds of failure

* fix tests in ama_queue_workflow_spec

* fix a couple tests

* another one

* fix dropdown helpers to work if something was already selected

* fix test in edit_ep_claim_labels_spec

* fix issue modification request specs

* more tests

* update more tests

* whac a mole

* remove comment

* fix padding

* remove comment and whitespace

* make specs consistent

* SeanC/APPEALS-40670 | Update actions and pending request modal on Edit Issues Page – issues with pending requests [Non-Admin] (#21857)

* got the options actions working

* hooked up the cancel action

* added some styling for drop down

* changed the wording of the dropdown actions

* added new onClick action, added pending obj to state and cleared it

* passed the onClick to Row and List

* added onClick and useSelector to Request

* added new redux action

* removed comment

* added edit redux action

* fixed an issue from merge in addIssues

* updated the options to work with non admin actions and readOnly

* removed unneed styles

* removed comment

* changed modal title to change based on pendingIssueModificationRequests

* removed redundant code

* updated action and reducer to work with other code

* updated name of action on parent component

* updated form wrapper to work with new action

* fixed a failing spec test

* Added tests for action options for non and admin users

* refactored the props for the test for IssueModificationList

* slight change to the test

* add new test in issue_modification_request spec

* added logic in Request for the text to change slightly

* fixed a failing test

* fixed an error with the form wrapper

* fixed a few issues from the merge

* fixed failing test

* fixed an issue from the merge

* changed I back to i for issueModificationRow

* refactored options to a const in Request

* removed added comma in constants

* renamed const in FormWrapper

* removed no longer needed props in IssueModificationListProps

* removed setting the index when reviewing a modification request

* fixed a date formatting issue

* created const for pendingIssueModificationRequest

* Fixed issue with incorrectly changing admin modal title

* cleaned up some lint

* cleaned up more lint

* fixed an import issue

* removed conditional for the label text

* fixed a failing jest test

* fixed failing rspec

* removed comment in issue_modification_request_spec

* APPEALS-47866 (#21916)

* UX changes for modals

red buttons -> blue buttons
text wraps around icon
copy updates

* rspec updates

* update snapshots

* add a storybook for modals with icons

* refactor storybook

* remove class

* switch to constants

* remove unnecessary props

* fix the AddIssues storybook

* tinkering

* update snapshots again

* Pamatya/appeals 40997 v3 (#21926)

* move issue modification request actions to new file, created new confirm issue modification change modal

* fixed some code climate issues

* some changes from review

* fix jest

* added new action to update pending issue request

* maybe fix tests?

* revert pending admin review display

* change pending admin review display to active pending issues only

* fix pending admin display

* consistent parameter placement and added an extra check for requested issues display

* fix all failing tests

* fix movetopendingreview action call breaking rspec

* fix cancel buttons on confirm modal modification

* initial push

* renaming component and making the remove original issue button work

* fixing issues related with closing the modal and addissues page getting prerendered

* fixing spec failure

* fixing spec and linter issues

* adding spec test for approval and rejection

* new branch withdrawal date

* fixing bug and fixing the jest failure

* addressing comments

* fixing spec and linter failure

* code clean and consistency between two modals

* adding validation to the spec

* fixing the spec failure

* fixing spacing and spec

* fixing linter

---------

Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>

* Update schema.rb

Fix error in previous merge conflict attempt.

* Update seeds.rb

Fix error in conflict resolution

* TYLERB/APPEALS-40985: Frontend Submission of Requested Issues/Pending Admin Review Section (#21912)

* Initial commit. Altered an existing model validation for issue modification requests and added a new validation. Added a formatter to prepare the issue modification requests for form submission and altered the button text for vha to be save instead of establish if there are pending issue modificaiton requests in the redux store.

* Added the redirection code for claim reviews that have active pending issue modification requests. Also added the non admin issue modification success banner and refactored the existing flash banner code for other claim review types to make them easier to modify in the future.

* Fixed code climate issue.

* Renamed a function parameter in RequestIssueFormWrapper to make it more clear on what it is actually using. Updated logic to use a property insted of the form data.

* Refactored how the claim review controller was building flash messaging to make it easier to customize it for vha claim reviews.

* Added a new selectors file with a selector to only get openPendingModification requests which are pending modification requests that are assigned. Changed the selector in the PendingIssueModificationRequestBanner to the new selector.

* Moved the open pending issue modification requests selector to the intake selector. Imported it and used it in the add issues page.

* Fixed an issue where the decision date was not added as the correct string format to the issue modification redux store which was causing it to fail to save later after form submission. Expanded the feature test for non admin to include submitting the form and verifying the success banner and issue modification request data.

* Added one more additional check to the feature test.

* Added the open issue modification requests selector the save btton text for the edit issues page.

* Made changes to the CancelPendingRequests modal to work with a new reducer. Added edited and cancelled pending requests to the formatIssueModificationRequestSubmissionData function.

* Added an edited boolean attribute to the form data for modification type modals for pending requests for an easy way to determine if a issue modification request has been edited without changing the status.

* Removed max width from non comp description text.

* Fixed admin messaging when there are pending issue modification requests remaining on the claim review.

* Added all the remaining frontend code and logic to make the issue modification form submission work. Fixed an issue where withdrawal date was not working correctly with the existing withdrawal process.

* Refactored the claim review controller logic to work with the non admin and admin updates to issue modification requests. Added methods into issue modification request for admin updates. Updated validations. Refactored the non_admin_updater to work for both admin and non admin workflows. Added some fallback error handling for issue modification updates.

* Removed unused import.

* Updated the RequestIssueStatus component option value from rejected to denied to matchup with the enum field on the issue_modification_request model.

* Fixed two code climate issues. Rewrote the issue modification request factories to fix the seed data.

* Removed some lines from RequestIssueFormWrapper that I don't think were neccessary. Removed some todos.

* Fixed a couple of failing specs.

* Added a new feature test spec file that Praj created.

* Added code to make the associations for request issues to issue modification requests through the UI work correctly in the request_issues_update model for additions and modifications since it is creating brand new request issues instead of using existing records in the database.

* Renamed non_admin_updater_spec file and fixed tests.

* Code climate fix.

* Updated the mocked data controller tests.

* Renamed the NonAdminUpdater and all related files to Updater.

* Fixed a bug where the confirm pending request issue modal was not properly setting up the request issue by using the old request issue id that the modification request was associated to. Fixed a console warning in the RequestIssueStatus component.

* Fixed spec failures due to changing banner text for editing vha claims.

* Fixed an issue where the openPendingModificationRequests selector was causing a console error for legacy appeals due to different initialization of the redux store. Removed the no decision date banner for legacy appeals since it was never intended although it shouldn't happen.

* Fixed jest test for CancelPendingRequestIssueModal where the property name had changed.

* Added admin process testing to the updater_spec.rb service class for issue modification requests. Added errors to caseflow error.rb and added a constant to copy.json.

* Removed todo statements.

* Updated a modal snapshot.

* Fixed merge conflicts that didn't get resolved.

* Added an addition check for the wording to be correct for the issues update banner in add issues to properly reflect the wording of the save button at the bottom of the page depending on pending issue modification requests. Changed the wording on a success banner from established to edited that was incorrect. Added a different success banner for a vha claim review when it still has pending issue modification requests after an admin has only actioned some of them.

* Updated the NonRatingIssueRequestModal decision date logic to prevent a non vha user from adding an issue without a decision date to a claim that was already in progress.

* Fixed spec failures related to the banner text changes.

* Added a banner and block the save of the page if the user is about to close a claim via a removal or withdrawal while the claim still has a pending addition issue modification request on it. Added feature test for this and uncommented some feature test code that shouldn't have been commented out. Added a way to make the content column span two columns in the add issues page table for styling the banner.

* Moved the new banner check into the edit page block to fix tests.

* CSS text change for the alert banner.

* text change and text title change

* Removed the established vha text variable in the claim review controller since it isn't being used anymore. Fixed a linting error.

* test fix for alert title change

---------

Co-authored-by: almorbah <149511814+almorbah@users.noreply.github.com>
Co-authored-by: Prajwal Amatya <pamatya@take2it.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>

* Initial commit. Added a transaction wrapper around the update_admin_request updater service method to prevent partial processing of requests if an error occured during any of the processing. Added an if check to the claim review controller to make sure that the request issues update class can be processed before processing any of the approval issue modification requests to avoid processing the requests without modifying the request issues that are currently on the claim.

* Added in code climate change and seed data change to match master.

* Added a public method for request issues update to check for p
ossible errors before running the perform method. Refactored the controller logic to fix test failures.

* Added approval back it got accidently removed. Removed some spacing in addissues.jsx.

* Fixed a few flaky tests due to time errors.

* Pamatya/appeals 49849 (#22057)

* adding banner for both admin and non-admin and test

* typo correction

* removing commented out codes and adding a space between lines

* removing props from the syntax

* changing let to const

---------

Co-authored-by: Clay Sheppard <csheepy@gmail.com>
Co-authored-by: Brandon Lee Dorner <Brandondorner@yahoo.com>
Co-authored-by: jonathanh-va <111081469+jonathanh-va@users.noreply.github.com>
Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>
Co-authored-by: Prajwal Amatya <122557351+pamatyatake2@users.noreply.github.com>
Co-authored-by: almorbah <al.mortada@va.gov>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>
Co-authored-by: Brandon Dorner <brandonleedorner@gmail.com>
Co-authored-by: Sean Craig <110493538+seancva@users.noreply.github.com>
Co-authored-by: = <tyler.broyles@va.gov>
Co-authored-by: almorbah <149511814+almorbah@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <Pierce_Robert@ne.bah.com>
Co-authored-by: Prajwal Amatya <pamatya@take2it.com>

* updated dispatch mailer email address to Decisions instead of Hearings (#22095)

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>

* APPEALS-45631 Add and fix address (#21800)

* APPEALS-45631 Add and fix address

* empty commit

* empty commit

* fix/add RO id

* changed id from SS to GB

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>

* Prodtest/appeals-36234-appeals-44031 (#22109)

* APPEALS-36339 (#21436)

* Updated to remove obsolete levers of ACD Disable Legacy Distributions and ACD Disable Non-priority Distributions

* Fixed redundant linting issue

* Fixed empty line linting issue

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* mbeard/APPEALS-44379 (#21451)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44417 Seeds for Docket Lever Demo (#21534)

Co-authored-by: Christopher Detlef <>

* APPEALS-36345-updated (#21537)

* Refactored exclusion table

* Fixed ordering issue and testing

* mbeard/APPEALS-44379 (#21530)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

* first new commit with new args

* updates methods and test query

* updates age_of_oldest methods params

* cleans up method removes args and updates tests, fixes linting

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44346 Demo Docket Goal Lever Test Seed Data (#21524)

Co-authored-by: Christopher Detlef <>

* Chrisbdetlef/appeals 40705 (#21535)

* Chris backend Work

* APPEALS-44441. Added initial changes for individual seed

* WIP

* APPEALS-44441. Fixed the table css

* APPEALS-44441. Added Custom and Scenario Seed components and jest tests

* APPEALS-44441. Fix ScenarioSeeds jest test

* APPEALS-44441. Fix CustomeSeeds Jest test

* init commit

* fixes linting issues

* capybara test init

* APPEALS-44441. Backend Integration API changes

* APPEALS-44441_1. Matched the constant keys in the backend

* APPEALS-44441_1. Update the param to match the backend and fixed spec

* APPEALS-44441. lint fixes

* APPEALS-44441. linting fixes

* sharsha/APPEALS-44441. fixed the route and tests

* Change route

* Change variables to match front and back end

* CustomSeed Jest test fix

* Fix issues

* Fix rubocop issues

* Use existing method in the controller

---------

Co-authored-by: Christopher Detlef <>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Michael Beard <michael.beard@va.gov>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 (#21566)

* Fixed rspec failures on constants

* APPEALS-45531. Remove dead code

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Updated lever history to handle null unit values from docket levers (#21567)

Co-authored-by: 631966 <amy.detwiler@va.gov>

* Sharsha/appeals 45531_1 (#21573)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 1 (#21609)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

* TEST FOR FIX

* MORE TESTING

* Fixed rspec issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45502. Organize route and fix the controller (#21595)

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Ricky/APPEALS-36345.fixes (#21612)

* Updated lever history to handle null unit values from docket levers

* Updated member view of exclusion table with proper text display and fixed missing css

* Updated unit test and test data to test rendering of exclusionTable

---------

Co-authored-by: 631966 <amy.detwiler@va.gov>

* ricky/APPEALS-44053 (#21587)

* init commit, adds conditional to check for docket_type ama to method, fixes json constants to snakecase

* puts statements testing

* updates seeds for evidence_submission, adds method to hearing_request_docket.rb and dist_concern.rb

* updated appeals dsit

* final fix for PR

* updates spec to reflect changes in hearing_request_docket

* uncomments seeds

* Ricky/appeals 43523 (#21649)

* Added Assignment Queue link to Switch Users test page

* Updated controller to validate role and redirect

* Updated error information

* Updated rspec tests

---------

Co-authored-by: 631068 <rickybmanus@gmail.com>

* APPEALS-45898. Updated the lever_group_order values (#21639)

* APPEALS-45898. Updated the lever_group_order values

* APPEALS-45898. Updated order of the evidence submission priority and non-priority

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-40646 (#21645)

* Init commit

* adds methods and useffect first pass

* fixes isIdle warning

* removes important from scss

* refined handleToggleChange method

* updates font color for h4

* adds keys to the td and fixed proptype for loadAcdExcludeFromAffinity in casedistributionapp

* Chrisbdetlef/appeals 43117.cleanup (#21671)

* APPEALS-43421: Attorney Selection Sticking on Dropdown after Assignment (#21401)

* redo init commit

* updated imp. logic

* attorney widget fix

---------

Co-authored-by: Calvin <Calvin.Costa@va.gov>

* Add ruby CE API Gem

* remove correspondence changes from schema.rb (#21468)

* Revert "Add ruby CE API Gem" (#21479)

This reverts commit c78afe30620716d59d2ac31ad6eed71585d78a98.

* Override SCT Bulk Assign Page task limit (#21465)

* Override SCT Bulk Assign Queue 15 case limit & Adjust SCT attorney assign task action label

* feature/APPEALS-35707-29633-29632 (prodtest) (#21485)

* 🔀 Squash merge AlecK/APPEALS-35707 - Replace `database_cleaner` with `database_cleaner-active_record`

* 🔀 Squash merge jcroteau/APPEALS-29632-fix-deprecation-action-view-base-instances

* 🔀 Squash merge jcroteau/APPEALS-29633-fix-deprecation-warning-active_record-result-to_hash

* feature/APPEALS-44871 Steps for installing node in the Caseflow demo environment  (#21483) (#21484)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Revert "feature/APPEALS-44871 Steps for installing node in the Caseflow demo …" (#21489)

This reverts commit a6262001f9bedabca60598c82bfe1b803f0f16c7.

* Sbashamoni/appeals 44871 node14 demo fixes (#21490) (#21495)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* add error rules to demo builds (#21496) (#21498)

Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>

* APPEALS-43117 Add QA Users for testing

* Fix rspecs

* Fix issues with attorneys and judge teams

* Fix org count

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: youfoundmanesh <maneshreddy.kommidi@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>
Co-authored-by: Christopher Detlef <>

* Minor fixes (#21694)

* Minor fixes

* Fix rspec tests and properly check for judge css id

* Fix lint issue

---------

Co-authored-by: Christopher Detlef <>

* Fix Legacy Case issues (#21747)

Co-authored-by: Christopher Detlef <>

* APPEALS-46037. Fix padding in the lever history table (#21725)

* APPEALS-46037. Fix padding in the lever history table

* APPEALS-46037. Fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Fix Lauren Roth issue (#21813)

* Users with a VACOLS::Staff entry no longer get created with the default name of Lauren Roth

Co-authored-by: Christopher Detlef <>

* ricky/APPEALS-44044 (#21814)

* first pass at legacy_docket method and spec

* second iteration of legacy_docket and spec

* adds method to age_of_oldest methods and updates test scenarios

* Updated testing and expanded method missing logic

* Updated legacy_docket_spec file and tests

* Updated boolean logic, updated rspecs and factories

* Updated rspec tests to include factories

* updates docket_spec line 317 and factory for disable_ama_non_priority_direct_review

---------

Co-authored-by: Michael Beard <michael.beard@va.gov>

* updates ready_priority_nonpriority_appeals to public_send, updates test (#21844)

* APPEALS-36333 first iteration of docket time goal and prior to goal (#21523)

* APPEALS-36333 first iteration of docket time goal and prior to goal

* APPEALS-36333 address pr comments and moved the logic to docket model

* APPEALS-36333 Added specs for docket and hearing request docket models

* refactored code and moved it to distribution scopes

* APPEALS-36333 address pr comments and refactor code

* APPEALS-43996 updated lever name in all the required files to fix spec failures

* APPEALS-44000 revert hearing request docket model changes to keept it in sync with feature

* APPEALS-44000 updated hearing request docket model specs

* APPEALS-44000 fixed jest tests

* APPEALS-44000 fixed broken rspecs

* APPEALS-43996 fix rubocop warnings

* APPEALS-43996 fix push priority job spec failures

* APPEALS-43996 Updated case distribution lever and docker model and refactor specs

* APPEALS-43996 added rake task to update case distribution lever item in db

* APPEALS-43996 update docket model to handle the scenario when the lever being disabled by a user via the UI

* APPEALS-43996 update section title

* APPEALS-43996 revert rake task

* APPEALS-43996 add new factories to case distribution lever and fix spec failures

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks (#21834)

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks

* APPEALS-45191. Refactor and fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* refactor the logic and fix docket spec failures

* changed the call times to 3 times

* APPEALS-36333 fixed the docket time goal to check the existence of the item before using the public send to get the value

---------

Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: 631966 <amy.detwiler@va.gov>

* updated the seeds to align with the work completed

* Updated Toggle Switch behavior when clicked while idle (#21874)

* Csv research (#21892)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

* csv and etc

* CSS for buttons

* jest tests for the reducer and action types

* Jest test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-46057. CleanUP (#21914)

* more jest tests

* Disable scenario seeds

* Lint fixes

* APPEALS-46057. disable all scenario seeds

* APPEALS-46057. Refactor the TestSeed wrapper to be a functional component and fixed jest test

* APPEALS-46057. Jest job in GHA complaining on test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* updates line of test to correctly build lever item (#21918)

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45191. Updated the query to return the date based on the calculation (#21928)

* APPEALS-45191. Updated the query to return the date based on the calculation

* APPEALS-45191. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisharsha/appeals 43962 (#21929)

* Sharsha/appeals-44911_1 (#21784)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisbdetlef/appeals 44910 (#21838)

* Initial

* Add JSON parsing and multiple calls to rake tasks

* Pre-caby tets

* Add capybara tests and add IDs to buttons

---------

Co-authored-by: Christopher Detlef <>

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: cdetlefva <133903625+cdetlefva@users.noreply.github.com>

* APPEALS-43962. Lint fixes (#21932)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Ricky/APPEALS-47293 (#21925)

* First pass implementation of fixing seeding rspecs

* Second pass at fixing errors in rspecs

* Revert updates to test if rspec passes

* Fixed linting issues in test_docket_seeds_controller_spec

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-48292 updated the column to be a string (#21954)

* APPEALS-48292 updated the column to be a string

* APPEALS-48292 added comment to the control_group field in the migration

* APPEALS-48292 added column comment to the schema, changed migration so that it can be rolled back

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false (#21948)

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false

* APPEALS-49004 added spec to check when Start Distribution Prior to Docket Time Goal toggle is on

* APPEALS-49004 fixed lint issues in docket.rb

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query (#21949)

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query

* APPEALS-48898. Renamed the column and update the method

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-49100. getting value from the start_distribution_prior_to_goal (#21968)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-46257 (#21976)

* updates routes and frontend urls to namespace

* removes superfluous <a> tags

* Ensure that legacy appeals are being created (#21981)

* Ensure that legacy appeals are being created

* Remove puts

---------

Co-authored-by: Christopher Detlef <>

* APPEALS-49403. Added buttons Docket Lever Seed (#21989)

* APPEALS-49403. Added buttons Docket Lever Seed

* sharsha/APPEALS-49403. Updated the endpoint URL path

* APPEALS-49403. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-44000 added check to skip priority appeals in docket model (#21992)

* Feature/appeals 36234 masterupgrade (#22003)

* sbashamoni/APPEALS-43724 Node 16 version upgrade changes (#21966) (#21975)

* Update node verstion to 16 in git workflow

* Update node verstion to 16 in nvm and dockerfile for demo

* Update node version in yarn.lock and package.json and .nvmrc file

* Update node's version path to node16 in docker-bin/env.sh

* Update and upgrade to node16 in client

* More updates to yarn.lock and package.json

* Fix tests by Adam Shaw

* Upadate snapshot for ScheduleVeteran.test.js.snap

* Doing some code clean up

* Doiing some more clean up

* Add and remove spaces to match master

* One more space to take care of

* One more space to take care of again

* One more space to take care of again

---------

Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* init master merge branch

---------

Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* Remove AOD trait from non-priority legacy appeal creation (#22013)

Co-authored-by: Christopher Detlef <>

* Sharsha/appeals 49461 (#22018)

* sharsha/APPEALS-49461. initial commit

* sharsha/APPEALS-49461. fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49421 (#22014)

* init commit fixes ama_np_ capybara test to expect user as admin, and first attempt  test_docket_seeds test

* removes previous chane for TASKS_LOADED

* fixes capybara for test seeds controller button ids

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-49403. Updated the buttons label (#22025)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49585 (#22020)

* init commit for non member view input

* fixes css issue for docket-lever-right

* Added a hyphen between value and unit for member only view

* replaces hyphen with comma

* Init commit replaces th with div for 508 compliance (#22036)

* Chrisbdetlef/appeals 47008 1 (#22040)

* Allow judges to see legacy cases and attorneys to be assigned cases

* Remove testing function

* Update spec to reflect new user count in seed file

---------

Co-authored-by: Christopher Detlef <>

* got rid of extraneous file

* got rid of yarn lock orig

* Include bandwidth as part of timeout error metric data (#21946)

* Include bandwidth as part of timeout error metric data

* add NetworkUtil.js file

* fix code climate issues

* fix linting issue

* remove safari webdriver test

* fix CI/CD issue with chrome_driver

* add tests for NetworkUtil.js

* move bandwidth to metric_attributes

* requested changes* fix NetworkUtil-test

---------

Co-authored-by: mikefinneran <110622959+mikefinneran@users.noreply.github.com>

* APPEALS-50734. Remove Legacy appeals from the query (#22071)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-46087 fix css table width issues for case distribution lever history table (#22024)

* Feature/appeals 36234.merge master.20240701 (#22075)

* APPEALS-47277 remove Vegas office (#21876)

* APPEALS-47277 remove Vagas office

* Removed Texas ID from other files and updated tests

* Snapshot update

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* hotfix/APPEALS-22403 (#21942)

* add identifier for filenumber or ssn in filenumber search

* linting

* codeclimate linting

* update match call to return boolean

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* APPEALS-46907: Update to Determination of Gen Pop Legacy Cases (#21986)

* Isaiah/merge 46910 (#21983)

* removed BFHINES checks and modified tests

* removed lingering bfhines test

* modified test

* most recent updates on tests for passing status

* removed refs to cavc updates

* Skip flaky test ro_viewhearsched_spec

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* APPEALS-44916: Case Distribution Affinity Calculations (#21899)

* APPEALS-44956: Add AppealAffinity model and database table (#21526)

* add migration for appeal_affinities

* add AppealAffinity model and associations, update migration for new column

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

* add new job, update affinity model validation and after save hook

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

* add return in job if no query results, tests for no query results

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

* remove comment, fix hearing factory, disable some seeds for testing

* add more tests

* test refactor

* update appeals for dist query to add affinity start, add seed file, fix hearing factory, add stat to dist factory

* disable new seed on reset

* update seed file with vet names, add another seed category

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* APPEALS-44959: Modify affinity date checks to use appeal_affinity (#21611)

* swap distribution queries from distribution_task to appeal_affinities

* update seed files to use appeal affinities instead of distribution task

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

* fix user seed, fix date format in distribution task instructions

* fix tests for date format update

* Calvin/APPEALS-44957-rake-affinity (#21577)

* grabbed receipt dates from distributed cases

* refactored for functionality + added method to grab appeals that match

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

* if appeal affinity is nil, it will now be updated

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

* updated start date to receipt date instead of Time.now

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

* APPEALS-46016: Add Affinity Start Date to the Explain Page (#21660)

* add affinity start date to explain page

* add feature test to verify dates display

* update rake task and spec (#21731)

* APPEALS-46325: Add Seeds for AOD Appeals and Update Dates to Match CAVC (#21730)

* add aod hearing cases to ama affinity cases seed

* fix lever spec

* APPEALS-45148: Hook to clear saved affinity date (#21623)

* initial imp. idea

* AC1: check for affinity_start_date on assignment

* AC2/3: update affinity start date  w/ instr.

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

* add case dist lever to new tests (#21776)

* remove unnecessarily included module from job (#21827)

* APPEALS-47211: Improve Performance of Distribution Queries (#21840)

* rework ready_for_distribution scope

* fix non-hearing docket distribution bug

* restart tests

* added null checks for appeal affinity in distribution queries, update tests (#21893)

* add check for appeal being active to distribution and associated slack message (#21902)

* Update users_spec.rb

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* hotfix/APPEALS-45177: TaskTable Default Sorting Fix (#21772)

* Updated the TaskTable component to use the defaultSort property instead of the defaultSortIdx property for queue table since that property is not used anywhere. Added a default sorting hash to the UnassignedCasesPage component and now pass that down to TaskTable. Removed references to defaultSortIdx.

* Added the type column default sort to the AssignedCasesPage widget as well.

* Added a parenthesis for clarity around a boolean. Moved the defaultSortingHash out into a constants file.

---------

Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>

* APPEALS-47106 Caseflow Swagger (#21993)

* Add Rswag and convert existing API documentation (#21778)

* add rswag

* Update Gemfile.lock

* Setup yaml UI

* remove and reroute old swagger files

* update format and servers values

* Update route_docs_controller.rb

* Update cmp_controller.rb

* cmp endpoint yaml

* cmp endpoint to return 501

* CMP endpoint swagger flies

* update swagger files

* adjust server order, add auth token

* cmp parameter name change

* add comments

* Update users_controller.rb

* unit tests and linting

* lint fixes

* Update swagger_helper.rb

* APPEALS-48048 Swagger Updates (#21909)

* update servers to not include a host

* remove host for server

* remove generated swaggers from definitions

* remove internal API endpoints from having generated swagger

* IDT servers fixes

* disable CMP swagger in prod and prodtest

* set authorization correctly

* fix what is required for CMP upload

* fix linting issues, update lint rake task to autocorrect for rubocop, add rubocop make command

* Update decision_reviews.yaml

* Update ama_issues.yaml

* Update vacols_issues.yaml

* Update swagger.yaml

* fix check failures

* Update docs_controller_spec.rb

* fix unit tests

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update rswag_ui.rb

* Update lint.rake

* Update decision_reviews_spec.rb

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update veterans_controller_spec.rb

* feature/APPEALS-43597 RC1.5.1 (#21996)

* APPEALS-36759 Add sms_response_content and sms_response_time notifications table

* APPEALS-37003 First pass at job refactor

* APPEALS-37003 Add comments and update kwargs for va notify service

* APPEALS-37003 Update spec files

* APPEALS-37003 Update spec

* APPEALS-37003 Ensure user in job and create email_enabled method

* APPEALS-37003 Remove question mark

* Limit max retry attempts to 5

* Add ? to boolen return methods

* jcohen/APPEALS-43706 (#21444)

* APPEALS-43706 macros added to each model file for the polymorphic relationship to be setup.

* APPEALS-43706 migration made and yet to be run.

* APPEALS-43706 migrations ran and expected columns and indexes are in table.

* Fix some spec failures unrelated to this branch

* Limit schema diff

* Add a missing tab

* Fix more unrelated failures. Also prevent ACD lever seeds from overwriting spec output

* Fix last unrelated failure.

* APPEALS-43706 linting issues in va_notify_service fixed.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* [APPEALS-43598] Quarterly Notification Job refactoring (#21505)

* Quarterly Notification Job refactoring

* APPEALS-43598 Fix lint issues for QuarterlyNotificationsJob refactor

* APPEALS-43598 Fix db schema.rb file

* APPEALS-43598 Fix schema.rb file

* APPEALS-43598 Refactoring QuarterlyNotificationsJob for readability

* APPEALS-43598 Refactoring QuarterlyNotificationsJob and removing extra methods

* [APPEALS-43598] Update method name

---------

Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-44007: Eliminate Transmission of Notifications to Deceased Veterans (#21481)

* APPEALS-44007: Writing tests to ensure adding the 'failure due to deceased' information is properly set and added to the db

* updates to pr

* pushing changes for tonight

* updating spec file to handle enabling and disabling feature flags

* Update format_message_status

* Lint roll

* fixing conflicts

* Updates to send notification spec

* Fix one of the legacy test cases

* Remove accidental push

* Fix remaining test

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-45235: Remove Temporary PDF Files From tmp Directory After All eFolder Upload Attempts (#21557)

* Cleanup files after uploading to VBMS

* Only delete file if it exists

* Resolve linter issue

* Update specs

* Trigger CodeClimate

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Add appeal alias for notifiable

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications (#21575)

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications

* fixing some errors

* updating factory

* updating tests

* updating tests and factory

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-43596 Adding JobMessageDeletionMiddleware to delete SQS messages for certain jobs

* APPEALS-43596 Adding tests

* APPEALS-43596 Fix codeclimate

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables (#21596)

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables

* pushing changes

* updating…
amybids added a commit that referenced this pull request Jul 30, 2024
* APPEALS-36339 (#21436)

* Updated to remove obsolete levers of ACD Disable Legacy Distributions and ACD Disable Non-priority Distributions

* Fixed redundant linting issue

* Fixed empty line linting issue

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* mbeard/APPEALS-44379 (#21451)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44417 Seeds for Docket Lever Demo (#21534)

Co-authored-by: Christopher Detlef <>

* APPEALS-36345-updated (#21537)

* Refactored exclusion table

* Fixed ordering issue and testing

* mbeard/APPEALS-44379 (#21530)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

* first new commit with new args

* updates methods and test query

* updates age_of_oldest methods params

* cleans up method removes args and updates tests, fixes linting

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44346 Demo Docket Goal Lever Test Seed Data (#21524)

Co-authored-by: Christopher Detlef <>

* Chrisbdetlef/appeals 40705 (#21535)

* Chris backend Work

* APPEALS-44441. Added initial changes for individual seed

* WIP

* APPEALS-44441. Fixed the table css

* APPEALS-44441. Added Custom and Scenario Seed components and jest tests

* APPEALS-44441. Fix ScenarioSeeds jest test

* APPEALS-44441. Fix CustomeSeeds Jest test

* init commit

* fixes linting issues

* capybara test init

* APPEALS-44441. Backend Integration API changes

* APPEALS-44441_1. Matched the constant keys in the backend

* APPEALS-44441_1. Update the param to match the backend and fixed spec

* APPEALS-44441. lint fixes

* APPEALS-44441. linting fixes

* sharsha/APPEALS-44441. fixed the route and tests

* Change route

* Change variables to match front and back end

* CustomSeed Jest test fix

* Fix issues

* Fix rubocop issues

* Use existing method in the controller

---------

Co-authored-by: Christopher Detlef <>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Michael Beard <michael.beard@va.gov>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 (#21566)

* Fixed rspec failures on constants

* APPEALS-45531. Remove dead code

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Updated lever history to handle null unit values from docket levers (#21567)

Co-authored-by: 631966 <amy.detwiler@va.gov>

* Sharsha/appeals 45531_1 (#21573)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 1 (#21609)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

* TEST FOR FIX

* MORE TESTING

* Fixed rspec issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45502. Organize route and fix the controller (#21595)

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Ricky/APPEALS-36345.fixes (#21612)

* Updated lever history to handle null unit values from docket levers

* Updated member view of exclusion table with proper text display and fixed missing css

* Updated unit test and test data to test rendering of exclusionTable

---------

Co-authored-by: 631966 <amy.detwiler@va.gov>

* ricky/APPEALS-44053 (#21587)

* init commit, adds conditional to check for docket_type ama to method, fixes json constants to snakecase

* puts statements testing

* updates seeds for evidence_submission, adds method to hearing_request_docket.rb and dist_concern.rb

* updated appeals dsit

* final fix for PR

* updates spec to reflect changes in hearing_request_docket

* uncomments seeds

* Ricky/appeals 43523 (#21649)

* Added Assignment Queue link to Switch Users test page

* Updated controller to validate role and redirect

* Updated error information

* Updated rspec tests

---------

Co-authored-by: 631068 <rickybmanus@gmail.com>

* APPEALS-45898. Updated the lever_group_order values (#21639)

* APPEALS-45898. Updated the lever_group_order values

* APPEALS-45898. Updated order of the evidence submission priority and non-priority

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-40646 (#21645)

* Init commit

* adds methods and useffect first pass

* fixes isIdle warning

* removes important from scss

* refined handleToggleChange method

* updates font color for h4

* adds keys to the td and fixed proptype for loadAcdExcludeFromAffinity in casedistributionapp

* Chrisbdetlef/appeals 43117.cleanup (#21671)

* APPEALS-43421: Attorney Selection Sticking on Dropdown after Assignment (#21401)

* redo init commit

* updated imp. logic

* attorney widget fix

---------

Co-authored-by: Calvin <Calvin.Costa@va.gov>

* Add ruby CE API Gem

* remove correspondence changes from schema.rb (#21468)

* Revert "Add ruby CE API Gem" (#21479)

This reverts commit c78afe30620716d59d2ac31ad6eed71585d78a98.

* Override SCT Bulk Assign Page task limit (#21465)

* Override SCT Bulk Assign Queue 15 case limit & Adjust SCT attorney assign task action label

* feature/APPEALS-35707-29633-29632 (prodtest) (#21485)

* 🔀 Squash merge AlecK/APPEALS-35707 - Replace `database_cleaner` with `database_cleaner-active_record`

* 🔀 Squash merge jcroteau/APPEALS-29632-fix-deprecation-action-view-base-instances

* 🔀 Squash merge jcroteau/APPEALS-29633-fix-deprecation-warning-active_record-result-to_hash

* feature/APPEALS-44871 Steps for installing node in the Caseflow demo environment  (#21483) (#21484)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Revert "feature/APPEALS-44871 Steps for installing node in the Caseflow demo …" (#21489)

This reverts commit a6262001f9bedabca60598c82bfe1b803f0f16c7.

* Sbashamoni/appeals 44871 node14 demo fixes (#21490) (#21495)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* add error rules to demo builds (#21496) (#21498)

Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>

* APPEALS-43117 Add QA Users for testing

* Fix rspecs

* Fix issues with attorneys and judge teams

* Fix org count

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: youfoundmanesh <maneshreddy.kommidi@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>
Co-authored-by: Christopher Detlef <>

* Minor fixes (#21694)

* Minor fixes

* Fix rspec tests and properly check for judge css id

* Fix lint issue

---------

Co-authored-by: Christopher Detlef <>

* Fix Legacy Case issues (#21747)

Co-authored-by: Christopher Detlef <>

* APPEALS-46037. Fix padding in the lever history table (#21725)

* APPEALS-46037. Fix padding in the lever history table

* APPEALS-46037. Fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Fix Lauren Roth issue (#21813)

* Users with a VACOLS::Staff entry no longer get created with the default name of Lauren Roth

Co-authored-by: Christopher Detlef <>

* ricky/APPEALS-44044 (#21814)

* first pass at legacy_docket method and spec

* second iteration of legacy_docket and spec

* adds method to age_of_oldest methods and updates test scenarios

* Updated testing and expanded method missing logic

* Updated legacy_docket_spec file and tests

* Updated boolean logic, updated rspecs and factories

* Updated rspec tests to include factories

* updates docket_spec line 317 and factory for disable_ama_non_priority_direct_review

---------

Co-authored-by: Michael Beard <michael.beard@va.gov>

* updates ready_priority_nonpriority_appeals to public_send, updates test (#21844)

* APPEALS-36333 first iteration of docket time goal and prior to goal (#21523)

* APPEALS-36333 first iteration of docket time goal and prior to goal

* APPEALS-36333 address pr comments and moved the logic to docket model

* APPEALS-36333 Added specs for docket and hearing request docket models

* refactored code and moved it to distribution scopes

* APPEALS-36333 address pr comments and refactor code

* APPEALS-43996 updated lever name in all the required files to fix spec failures

* APPEALS-44000 revert hearing request docket model changes to keept it in sync with feature

* APPEALS-44000 updated hearing request docket model specs

* APPEALS-44000 fixed jest tests

* APPEALS-44000 fixed broken rspecs

* APPEALS-43996 fix rubocop warnings

* APPEALS-43996 fix push priority job spec failures

* APPEALS-43996 Updated case distribution lever and docker model and refactor specs

* APPEALS-43996 added rake task to update case distribution lever item in db

* APPEALS-43996 update docket model to handle the scenario when the lever being disabled by a user via the UI

* APPEALS-43996 update section title

* APPEALS-43996 revert rake task

* APPEALS-43996 add new factories to case distribution lever and fix spec failures

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks (#21834)

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks

* APPEALS-45191. Refactor and fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* refactor the logic and fix docket spec failures

* changed the call times to 3 times

* APPEALS-36333 fixed the docket time goal to check the existence of the item before using the public send to get the value

---------

Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: 631966 <amy.detwiler@va.gov>

* updated the seeds to align with the work completed

* Updated Toggle Switch behavior when clicked while idle (#21874)

* Csv research (#21892)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

* csv and etc

* CSS for buttons

* jest tests for the reducer and action types

* Jest test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-46057. CleanUP (#21914)

* more jest tests

* Disable scenario seeds

* Lint fixes

* APPEALS-46057. disable all scenario seeds

* APPEALS-46057. Refactor the TestSeed wrapper to be a functional component and fixed jest test

* APPEALS-46057. Jest job in GHA complaining on test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* updates line of test to correctly build lever item (#21918)

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45191. Updated the query to return the date based on the calculation (#21928)

* APPEALS-45191. Updated the query to return the date based on the calculation

* APPEALS-45191. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisharsha/appeals 43962 (#21929)

* Sharsha/appeals-44911_1 (#21784)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisbdetlef/appeals 44910 (#21838)

* Initial

* Add JSON parsing and multiple calls to rake tasks

* Pre-caby tets

* Add capybara tests and add IDs to buttons

---------

Co-authored-by: Christopher Detlef <>

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: cdetlefva <133903625+cdetlefva@users.noreply.github.com>

* APPEALS-43962. Lint fixes (#21932)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Ricky/APPEALS-47293 (#21925)

* First pass implementation of fixing seeding rspecs

* Second pass at fixing errors in rspecs

* Revert updates to test if rspec passes

* Fixed linting issues in test_docket_seeds_controller_spec

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-48292 updated the column to be a string (#21954)

* APPEALS-48292 updated the column to be a string

* APPEALS-48292 added comment to the control_group field in the migration

* APPEALS-48292 added column comment to the schema, changed migration so that it can be rolled back

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false (#21948)

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false

* APPEALS-49004 added spec to check when Start Distribution Prior to Docket Time Goal toggle is on

* APPEALS-49004 fixed lint issues in docket.rb

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query (#21949)

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query

* APPEALS-48898. Renamed the column and update the method

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-49100. getting value from the start_distribution_prior_to_goal (#21968)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-46257 (#21976)

* updates routes and frontend urls to namespace

* removes superfluous <a> tags

* Ensure that legacy appeals are being created (#21981)

* Ensure that legacy appeals are being created

* Remove puts

---------

Co-authored-by: Christopher Detlef <>

* APPEALS-49403. Added buttons Docket Lever Seed (#21989)

* APPEALS-49403. Added buttons Docket Lever Seed

* sharsha/APPEALS-49403. Updated the endpoint URL path

* APPEALS-49403. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-44000 added check to skip priority appeals in docket model (#21992)

* Feature/appeals 36234 masterupgrade (#22003)

* sbashamoni/APPEALS-43724 Node 16 version upgrade changes (#21966) (#21975)

* Update node verstion to 16 in git workflow

* Update node verstion to 16 in nvm and dockerfile for demo

* Update node version in yarn.lock and package.json and .nvmrc file

* Update node's version path to node16 in docker-bin/env.sh

* Update and upgrade to node16 in client

* More updates to yarn.lock and package.json

* Fix tests by Adam Shaw

* Upadate snapshot for ScheduleVeteran.test.js.snap

* Doing some code clean up

* Doiing some more clean up

* Add and remove spaces to match master

* One more space to take care of

* One more space to take care of again

* One more space to take care of again

---------

Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* init master merge branch

---------

Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* Remove AOD trait from non-priority legacy appeal creation (#22013)

Co-authored-by: Christopher Detlef <>

* Sharsha/appeals 49461 (#22018)

* sharsha/APPEALS-49461. initial commit

* sharsha/APPEALS-49461. fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49421 (#22014)

* init commit fixes ama_np_ capybara test to expect user as admin, and first attempt  test_docket_seeds test

* removes previous chane for TASKS_LOADED

* fixes capybara for test seeds controller button ids

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-49403. Updated the buttons label (#22025)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49585 (#22020)

* init commit for non member view input

* fixes css issue for docket-lever-right

* Added a hyphen between value and unit for member only view

* replaces hyphen with comma

* Init commit replaces th with div for 508 compliance (#22036)

* Chrisbdetlef/appeals 47008 1 (#22040)

* Allow judges to see legacy cases and attorneys to be assigned cases

* Remove testing function

* Update spec to reflect new user count in seed file

---------

Co-authored-by: Christopher Detlef <>

* got rid of extraneous file

* got rid of yarn lock orig

* APPEALS-50734. Remove Legacy appeals from the query (#22071)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-46087 fix css table width issues for case distribution lever history table (#22024)

* Feature/appeals 36234.merge master.20240701 (#22075)

* APPEALS-47277 remove Vegas office (#21876)

* APPEALS-47277 remove Vagas office

* Removed Texas ID from other files and updated tests

* Snapshot update

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* hotfix/APPEALS-22403 (#21942)

* add identifier for filenumber or ssn in filenumber search

* linting

* codeclimate linting

* update match call to return boolean

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* APPEALS-46907: Update to Determination of Gen Pop Legacy Cases (#21986)

* Isaiah/merge 46910 (#21983)

* removed BFHINES checks and modified tests

* removed lingering bfhines test

* modified test

* most recent updates on tests for passing status

* removed refs to cavc updates

* Skip flaky test ro_viewhearsched_spec

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* APPEALS-44916: Case Distribution Affinity Calculations (#21899)

* APPEALS-44956: Add AppealAffinity model and database table (#21526)

* add migration for appeal_affinities

* add AppealAffinity model and associations, update migration for new column

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

* add new job, update affinity model validation and after save hook

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

* add return in job if no query results, tests for no query results

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

* remove comment, fix hearing factory, disable some seeds for testing

* add more tests

* test refactor

* update appeals for dist query to add affinity start, add seed file, fix hearing factory, add stat to dist factory

* disable new seed on reset

* update seed file with vet names, add another seed category

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* APPEALS-44959: Modify affinity date checks to use appeal_affinity (#21611)

* swap distribution queries from distribution_task to appeal_affinities

* update seed files to use appeal affinities instead of distribution task

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

* fix user seed, fix date format in distribution task instructions

* fix tests for date format update

* Calvin/APPEALS-44957-rake-affinity (#21577)

* grabbed receipt dates from distributed cases

* refactored for functionality + added method to grab appeals that match

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

* if appeal affinity is nil, it will now be updated

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

* updated start date to receipt date instead of Time.now

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

* APPEALS-46016: Add Affinity Start Date to the Explain Page (#21660)

* add affinity start date to explain page

* add feature test to verify dates display

* update rake task and spec (#21731)

* APPEALS-46325: Add Seeds for AOD Appeals and Update Dates to Match CAVC (#21730)

* add aod hearing cases to ama affinity cases seed

* fix lever spec

* APPEALS-45148: Hook to clear saved affinity date (#21623)

* initial imp. idea

* AC1: check for affinity_start_date on assignment

* AC2/3: update affinity start date  w/ instr.

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

* add case dist lever to new tests (#21776)

* remove unnecessarily included module from job (#21827)

* APPEALS-47211: Improve Performance of Distribution Queries (#21840)

* rework ready_for_distribution scope

* fix non-hearing docket distribution bug

* restart tests

* added null checks for appeal affinity in distribution queries, update tests (#21893)

* add check for appeal being active to distribution and associated slack message (#21902)

* Update users_spec.rb

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* hotfix/APPEALS-45177: TaskTable Default Sorting Fix (#21772)

* Updated the TaskTable component to use the defaultSort property instead of the defaultSortIdx property for queue table since that property is not used anywhere. Added a default sorting hash to the UnassignedCasesPage component and now pass that down to TaskTable. Removed references to defaultSortIdx.

* Added the type column default sort to the AssignedCasesPage widget as well.

* Added a parenthesis for clarity around a boolean. Moved the defaultSortingHash out into a constants file.

---------

Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>

* APPEALS-47106 Caseflow Swagger (#21993)

* Add Rswag and convert existing API documentation (#21778)

* add rswag

* Update Gemfile.lock

* Setup yaml UI

* remove and reroute old swagger files

* update format and servers values

* Update route_docs_controller.rb

* Update cmp_controller.rb

* cmp endpoint yaml

* cmp endpoint to return 501

* CMP endpoint swagger flies

* update swagger files

* adjust server order, add auth token

* cmp parameter name change

* add comments

* Update users_controller.rb

* unit tests and linting

* lint fixes

* Update swagger_helper.rb

* APPEALS-48048 Swagger Updates (#21909)

* update servers to not include a host

* remove host for server

* remove generated swaggers from definitions

* remove internal API endpoints from having generated swagger

* IDT servers fixes

* disable CMP swagger in prod and prodtest

* set authorization correctly

* fix what is required for CMP upload

* fix linting issues, update lint rake task to autocorrect for rubocop, add rubocop make command

* Update decision_reviews.yaml

* Update ama_issues.yaml

* Update vacols_issues.yaml

* Update swagger.yaml

* fix check failures

* Update docs_controller_spec.rb

* fix unit tests

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update rswag_ui.rb

* Update lint.rake

* Update decision_reviews_spec.rb

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update veterans_controller_spec.rb

* feature/APPEALS-43597 RC1.5.1 (#21996)

* APPEALS-36759 Add sms_response_content and sms_response_time notifications table

* APPEALS-37003 First pass at job refactor

* APPEALS-37003 Add comments and update kwargs for va notify service

* APPEALS-37003 Update spec files

* APPEALS-37003 Update spec

* APPEALS-37003 Ensure user in job and create email_enabled method

* APPEALS-37003 Remove question mark

* Limit max retry attempts to 5

* Add ? to boolen return methods

* jcohen/APPEALS-43706 (#21444)

* APPEALS-43706 macros added to each model file for the polymorphic relationship to be setup.

* APPEALS-43706 migration made and yet to be run.

* APPEALS-43706 migrations ran and expected columns and indexes are in table.

* Fix some spec failures unrelated to this branch

* Limit schema diff

* Add a missing tab

* Fix more unrelated failures. Also prevent ACD lever seeds from overwriting spec output

* Fix last unrelated failure.

* APPEALS-43706 linting issues in va_notify_service fixed.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* [APPEALS-43598] Quarterly Notification Job refactoring (#21505)

* Quarterly Notification Job refactoring

* APPEALS-43598 Fix lint issues for QuarterlyNotificationsJob refactor

* APPEALS-43598 Fix db schema.rb file

* APPEALS-43598 Fix schema.rb file

* APPEALS-43598 Refactoring QuarterlyNotificationsJob for readability

* APPEALS-43598 Refactoring QuarterlyNotificationsJob and removing extra methods

* [APPEALS-43598] Update method name

---------

Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-44007: Eliminate Transmission of Notifications to Deceased Veterans (#21481)

* APPEALS-44007: Writing tests to ensure adding the 'failure due to deceased' information is properly set and added to the db

* updates to pr

* pushing changes for tonight

* updating spec file to handle enabling and disabling feature flags

* Update format_message_status

* Lint roll

* fixing conflicts

* Updates to send notification spec

* Fix one of the legacy test cases

* Remove accidental push

* Fix remaining test

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-45235: Remove Temporary PDF Files From tmp Directory After All eFolder Upload Attempts (#21557)

* Cleanup files after uploading to VBMS

* Only delete file if it exists

* Resolve linter issue

* Update specs

* Trigger CodeClimate

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Add appeal alias for notifiable

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications (#21575)

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications

* fixing some errors

* updating factory

* updating tests

* updating tests and factory

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-43596 Adding JobMessageDeletionMiddleware to delete SQS messages for certain jobs

* APPEALS-43596 Adding tests

* APPEALS-43596 Fix codeclimate

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables (#21596)

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables

* pushing changes

* updating tests

* rubocop

* rubocop'n

* deleting repeat constants

* removing file in favor of EVENT_TYPE_FILTERS.json

* removing instances of using VA_NOTIFY_TEMPLATE_NAMES and using EVENT_TYPE_FILTERS instead

* replacing all instances of strings with constants

* fixing bug

* rubocop'n

* rubocop'n

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Clean notification_events after notification report specs finish (#21662)

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-43725: Extract `notify_appellant` Call from `QuaterlyNotificationsJob` to Decrease Runtime (#21643)

* Group notification types as scopes

* Add new job

* Fix typo

* Add back batching

* Batch send messages

* Multithread job queueing

* Reconfigure bulk enqueueing to utilize send_notifications.fifo queue

* Update the comment on QuaterlyNotificationsJob#perform

to adhere to the RDoc standard

* Use constants for template name

* Provide a more descriptive var name

* Remove unused env var

* Fix linting issues

* Prevent error from being thrown early in init job

* Add RDoc comments to appeal_state

* Add rdoc comment to init job

* Add another rdoc comment to the init job

* Use a more specific error class whenever an appeal

cannot be located within the init job

* Add a more specific error to CaseflowJob#enqueue_batch_of_jobs

* Add test for SendNotificationJob.queue_name_suffix

* Update QuarterlyNotificationsJob tests

* Update appeal_state_spec.rb to cover new scopes

* Add spec file for NotificationInitializationJob

* Add CaseflowJob specs

* Add CaseflowJob specs

* Address rubocop issue (by ignoring it)

* Kicking off CodeClimate

* Fix some lint issues

* Freeze constant

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Move spec file to proper location

* APPEALS-43599 (#21696)

* APPEALS-43599 Refactoring SendNotificationJob

* APPEALS-43599 Remove comments

* APPEALS-43599 Suppress code smells from reek

* APPEALS-43599 Suppress code smells from reek

* jcohen/APPEALS-43727 (#21589)

* APPEALS-43727 Branch created. Extracted all the 'when' conditions in the case statement within appellant_notification.rb update_appeal_state method.

* APPEALS-43727 appellant_notification_service is created, logic from crowded method in appellant_notificaion.rb placed in newly created file, allowing redability.

* APPEALS-43727 added logic to appeal_state.rb, appellant_notification.rb updated with less logic, readable code through well named methods.

* APPEALS-43727 commit before merge from teammates work

* APPEALS-43727 removed freeze method on default status hash in appeal_state.rb. removed some rubocop disabling in appellant_notificaion.rb

* APPEALS-43727 extracted more logic from the appellant_notification module and placed it into the appeal_state class. Also got rid of rubocop declarations in app_notif and app_state as well. finally removed feature_toggle calls in appell_notif.

* APPEALS-43727 tests passing, code works

* APPEALS-43727 adding tests to appeal_state_spec to test functionality

* APPEALS-43727 rspec tests in appeal_state.

* APPEALS-43727 tests pass.

* Fixing code climate duplicate code issue

* fixing case statement

* code climate things

* rubocop

* APPEALS-43727 work completed.

* APPEALS-43727 PR comments applied. tests not in a working state.

* APPEALS-43727 PR comments applied. appeal_state_spec in working state.

* APPEALS-43727 PR comments applied. appellant_notification_spec.rb all green.

* Adjust spacing of comments in appeal_state.rb

* Utilize #external_id method over ternary

* Swap or conditional for blank?

* Fix another whitespace gap

* APPEALS-43727 PR comments applied. again after reset.

* APPEALS-43727 PR comments applied. flipped conditionals in appeal_state.rb

* Update app/models/concerns/appeal_concern.rb

* APPEALS-43727 code/test edits

* APPEALS-43727 bulk_task_reasssignment_spec reverted to orginal state, with the exception of an expectation that was on line 98

* APPEALS-43727 lint fix

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-46179 (#21712)

* APPEALS-46179 Create JobExecutionTimes table

* APPEALS-46179 Add comment

* APPEALS-46179 Update schema

* APPEALS-46193 (#21753)

* APPEALS-46193 Add record to JobExecutionTime table when job is performed

* APPEALS-46193 Updating JobExecutionTimes table with an upsert query

* APPEALS-46193 Ignore JobExecutionTimes for certain jobs

* APPEALS-46193 Update ignore_job_execution_time? method

* APPEALS-46193 Adding tests

* Fix lint issues

* Update AWS dependencies

* Rollback gem reduction due to UAT issue

* Alter queue priority

* Forward error in SendNotificationJob

* Allow for notification audit records to remain in ProdTest

* Fix spec

* Fix typo in test fixture's name

* Fix lint infraction related to re-raising exceptions

* Address duplication CC error

* Reenable-privacy-mail-notifications (#21859)

* Add conditional for FOIA and Privacy Act mail

task to receives 'Privacy Act Pending' notifications

* Update spec

* Adjust some specs

* Add missing param

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Remove byebug from spec

* Revert queue tweak

* Remove duplicate method

* APPEALS-47382: Refactor Job Behavior Filtering Boolean Methods (#21898)

* initial commit

* refactoring methods to have constants instead of methods

* adding comments back in

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* APPEALS-48342: Prevent Intentional Retries of SendNotificationJobs in ProdTest from Causing Duplicate Notification Table Entries (#21927)

* initial commit

* rubocop'n

* rubcop'n

* fixing tests

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Resolve missed conflict

* MattT/APPEALS-48514 (#21959)

* Prototype of privacy act fix

* Leave privacy act states intact upon decision mailed

* Remove unused param

* Attempt updating specs to cover new behavior

* Fix attr name typo

* Add missing bang

* Skip reek issue

The issue has been deemed to be minor enough to not warrant having to reinvent everything for now.

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix quarterly specs by add in necessary hearings

* Adjust spacing/ordering of gems (#21978)

* MattT/APPEALS-49085 (#21960)

* Filter out appeals whose hearings have been held from hearing_scheduled scope

* Fix whitespace issues

* Fix failing specs caused by an oversight on my part

* Fix lint issue

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-49212 (#21991)

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add step to NightlySyncsJob to sync hearing dispositions and appeal stateS

* Add comment to new method

* Use constant for disposition type

* Fix typo in accessor

* Add spec for new appeal state action

* Create user in top scope

* Expand nighlty syncs job to check all scheduled hearing disposition types.

No show was left off as we don't have a requirement around it yet.

* Add nightly sync job spec

* Add disp task spec

* Add specs targeting the hearings controller

* Add sync script

* Eager load constants

* Add distinct

* Remove appeal_docketed from being reset

* Add script to adjust ama hearing statuses

* Correct mistype

* Add appeal_type clause

* Fix specs

* Lint fixes

* Flip conditionals in specs

* Fix var name

* Fix var

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Backfill addition to script

* Add AppealState record for newly docketed LegacyAppeals (#21999)

* APPEALS-48966 Adding AppealState record for recently docketed appeals

* APPEALS-48966 Refactor code and add comments

* Delete extraneous files

* Revert to using constants value

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix typo

---------

Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Feature/appeals 43597 release candidate (#22004)

* APPEALS-36759 Add sms_response_content and sms_response_time notifications table

* APPEALS-37003 First pass at job refactor

* APPEALS-37003 Add comments and update kwargs for va notify service

* APPEALS-37003 Update spec files

* APPEALS-37003 Update spec

* APPEALS-37003 Ensure user in job and create email_enabled method

* APPEALS-37003 Remove question mark

* Limit max retry attempts to 5

* Add ? to boolen return methods

* jcohen/APPEALS-43706 (#21444)

* APPEALS-43706 macros added to each model file for the polymorphic relationship to be setup.

* APPEALS-43706 migration made and yet to be run.

* APPEALS-43706 migrations ran and expected columns and indexes are in table.

* Fix some spec failures unrelated to this branch

* Limit schema diff

* Add a missing tab

* Fix more unrelated failures. Also prevent ACD lever seeds from overwriting spec output

* Fix last unrelated failure.

* APPEALS-43706 linting issues in va_notify_service fixed.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* [APPEALS-43598] Quarterly Notification Job refactoring (#21505)

* Quarterly Notification Job refactoring

* APPEALS-43598 Fix lint issues for QuarterlyNotificationsJob refactor

* APPEALS-43598 Fix db schema.rb file

* APPEALS-43598 Fix schema.rb file

* APPEALS-43598 Refactoring QuarterlyNotificationsJob for readability

* APPEALS-43598 Refactoring QuarterlyNotificationsJob and removing extra methods

* [APPEALS-43598] Update method name

---------

Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-44007: Eliminate Transmission of Notifications to Deceased Veterans (#21481)

* APPEALS-44007: Writing tests to ensure adding the 'failure due to deceased' information is properly set and added to the db

* updates to pr

* pushing changes for tonight

* updating spec file to handle enabling and disabling feature flags

* Update format_message_status

* Lint roll

* fixing conflicts

* Updates to send notification spec

* Fix one of the legacy test cases

* Remove accidental push

* Fix remaining test

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-45235: Remove Temporary PDF Files From tmp Directory After All eFolder Upload Attempts (#21557)

* Cleanup files after uploading to VBMS

* Only delete file if it exists

* Resolve linter issue

* Update specs

* Trigger CodeClimate

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Add appeal alias for notifiable

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications (#21575)

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications

* fixing some errors

* updating factory

* updating tests

* updating tests and factory

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-43596 Adding JobMessageDeletionMiddleware to delete SQS messages for certain jobs

* APPEALS-43596 Adding tests

* APPEALS-43596 Fix codeclimate

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables (#21596)

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables

* pushing changes

* updating tests

* rubocop

* rubocop'n

* deleting repeat constants

* removing file in favor of EVENT_TYPE_FILTERS.json

* removing instances of using VA_NOTIFY_TEMPLATE_NAMES and using EVENT_TYPE_FILTERS instead

* replacing all instances of strings with constants

* fixing bug

* rubocop'n

* rubocop'n

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Clean notification_events after notification report specs finish (#21662)

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-43725: Extract `notify_appellant` Call from `QuaterlyNotificationsJob` to Decrease Runtime (#21643)

* Group notification types as scopes

* Add new job

* Fix typo

* Add back batching

* Batch send messages

* Multithread job queueing

* Reconfigure bulk enqueueing to utilize send_notifications.fifo queue

* Update the comment on QuaterlyNotificationsJob#perform

to adhere to the RDoc standard

* Use constants for template name

* Provide a more descriptive var name

* Remove unused env var

* Fix linting issues

* Prevent error from being thrown early in init job

* Add RDoc comments to appeal_state

* Add rdoc comment to init job

* Add another rdoc comment to the init job

* Use a more specific error class whenever an appeal

cannot be located within the init job

* Add a more specific error to CaseflowJob#enqueue_batch_of_jobs

* Add test for SendNotificationJob.queue_name_suffix

* Update QuarterlyNotificationsJob tests

* Update appeal_state_spec.rb to cover new scopes

* Add spec file for NotificationInitializationJob

* Add CaseflowJob specs

* Add CaseflowJob specs

* Address rubocop issue (by ignoring it)

* Kicking off CodeClimate

* Fix some lint issues

* Freeze constant

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Move spec file to proper location

* APPEALS-43599 (#21696)

* APPEALS-43599 Refactoring SendNotificationJob

* APPEALS-43599 Remove comments

* APPEALS-43599 Suppress code smells from reek

* APPEALS-43599 Suppress code smells from reek

* jcohen/APPEALS-43727 (#21589)

* APPEALS-43727 Branch created. Extracted all the 'when' conditions in the case statement within appellant_notification.rb update_appeal_state method.

* APPEALS-43727 appellant_notification_service is created, logic from crowded method in appellant_notificaion.rb placed in newly created file, allowing redability.

* APPEALS-43727 added logic to appeal_state.rb, appellant_notification.rb updated with less logic, readable code through well named methods.

* APPEALS-43727 commit before merge from teammates work

* APPEALS-43727 removed freeze method on default status hash in appeal_state.rb. removed some rubocop disabling in appellant_notificaion.rb

* APPEALS-43727 extracted more logic from the appellant_notification module and placed it into the appeal_state class. Also got rid of rubocop declarations in app_notif and app_state as well. finally removed feature_toggle calls in appell_notif.

* APPEALS-43727 tests passing, code works

* APPEALS-43727 adding tests to appeal_state_spec to test functionality

* APPEALS-43727 rspec tests in appeal_state.

* APPEALS-43727 tests pass.

* Fixing code climate duplicate code issue

* fixing case statement

* code climate things

* rubocop

* APPEALS-43727 work completed.

* APPEALS-43727 PR comments applied. tests not in a working state.

* APPEALS-43727 PR comments applied. appeal_state_spec in working state.

* APPEALS-43727 PR comments applied. appellant_notification_spec.rb all green.

* Adjust spacing of comments in appeal_state.rb

* Utilize #external_id method over ternary

* Swap or conditional for blank?

* Fix another whitespace gap

* APPEALS-43727 PR comments applied. again after reset.

* APPEALS-43727 PR comments applied. flipped conditionals in appeal_state.rb

* Update app/models/concerns/appeal_concern.rb

* APPEALS-43727 code/test edits

* APPEALS-43727 bulk_task_reasssignment_spec reverted to orginal state, with the exception of an expectation that was on line 98

* APPEALS-43727 lint fix

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-46179 (#21712)

* APPEALS-46179 Create JobExecutionTimes table

* APPEALS-46179 Add comment

* APPEALS-46179 Update schema

* APPEALS-46193 (#21753)

* APPEALS-46193 Add record to JobExecutionTime table when job is performed

* APPEALS-46193 Updating JobExecutionTimes table with an upsert query

* APPEALS-46193 Ignore JobExecutionTimes for certain jobs

* APPEALS-46193 Update ignore_job_execution_time? method

* APPEALS-46193 Adding tests

* Fix lint issues

* Update AWS dependencies

* Rollback gem reduction due to UAT issue

* Alter queue priority

* Forward error in SendNotificationJob

* Allow for notification audit records to remain in ProdTest

* Fix spec

* Fix typo in test fixture's name

* Fix lint infraction related to re-raising exceptions

* Address duplication CC error

* Reenable-privacy-mail-notifications (#21859)

* Add conditional for FOIA and Privacy Act mail

task to receives 'Privacy Act Pending' notifications

* Update spec

* Adjust some specs

* Add missing param

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Remove byebug from spec

* Revert queue tweak

* Remove duplicate method

* APPEALS-47382: Refactor Job Behavior Filtering Boolean Methods (#21898)

* initial commit

* refactoring methods to have constants instead of methods

* adding comments back in

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* APPEALS-48342: Prevent Intentional Retries of SendNotificationJobs in ProdTest from Causing Duplicate Notification Table Entries (#21927)

* initial commit

* rubocop'n

* rubcop'n

* fixing tests

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Resolve missed conflict

* MattT/APPEALS-48514 (#21959)

* Prototype of privacy act fix

* Leave privacy act states intact upon decision mailed

* Remove unused param

* Attempt updating specs to cover new behavior

* Fix attr name typo

* Add missing bang

* Skip reek issue

The issue has been deemed to be minor enough to not warrant having to reinvent everything for now.

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix quarterly specs by add in necessary hearings

* Adjust spacing/ordering of gems (#21978)

* MattT/APPEALS-49085 (#21960)

* Filter out appeals whose hearings have been held from hearing_scheduled scope

* Fix whitespace issues

* Fix failing specs caused by an oversight on my part

* Fix lint issue

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-49212 (#21991)

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add step to NightlySyncsJob to sync hearing dispositions and appeal stateS

* Add comment to new method

* Use constant for disposition type

* Fix typo in accessor

* Add spec for new appeal state action

* Create user in top scope

* Expand nighlty syncs job to check all scheduled hearing disposition types.

No show was left off as we don't have a requirement around it yet.

* Add nightly sync job spec

* Add disp task spec

* Add specs targeting the hearings controller

* Add sync script

* Eager load constants

* Add distinct

* Remove appeal_docketed from being reset

* Add script to adjust ama hearing statuses

* Correct mistype

* Add appeal_type clause

* Fix specs

* Lint fixes

* Flip conditionals in specs

* Fix var name

* Fix var

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Backfill addition to script

* Add AppealState record for newly docketed LegacyAppeals (#21999)

* APPEALS-48966 Adding AppealState record for recently docketed appeals

* APPEALS-48966 Refactor code and add comments

* Delete extraneous files

* Revert to using constants value

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix typo

* Fix typo

* Fix seed script

* Fix seed script

* Ensure cleanup

* Change copy for Appeal Docketed status (#22006)

* Change copy for Appeal Docketed status

* Change case

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Use status text value instead of key

---------

Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-44916 seed data update (#22008)

* APPEALS-44956: Add AppealAffinity model and database table (#21526)

* add migration for appeal_affinities

* add AppealAffinity model and associations, update migration for new column

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

* add new job, update affinity model validation and after save hook

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

* add return in job if no query results, tests for no query results

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

* remove comment, fix hearing factory, disable some seeds for testing

* add more tests

* test refactor

* update appeals for dist query to add affinity start, add seed file, fix hearing factory, add stat to dist factory

* disable new seed on reset

* update seed file with vet names, add another seed category

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* APPEALS-44959: Modify affinity date checks to use appeal_affinity (#21611)

* swap distribution queries from distribution_task to appeal_affinities

* update seed files to use appeal affinities instead of distribution task

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

* fix user seed, fix date format in distribution task instructions

* fix tests for date format update

* Calvin/APPEALS-44957-rake-affinity (#21577)

* grabbed receipt dates from distributed cases

* refactored for functionality + added method to grab appeals that match

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

* if appeal affinity is nil, it will now be updated

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

* updated start date to receipt date instead of Time.now

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

* APPEALS-46016: Add Affinity Start Date to the Explain Page (#21660)

* add affinity start date to explain page

* add feature test to verify dates display

* update rake task and spec (#21731)

* APPEALS-46325: Add Seeds for AOD Appeals and Update Dates to Match CAVC (#21730)

* add aod hearing cases to ama affinity cases seed

* fix lever spec

* APPEALS-45148: Hook to clear saved affinity date (#21623)

* initial imp. idea

* AC1: check for affinity_start_date on assignment

* AC2/3: update affinity start date  w/ instr.

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

* add case dist lever to new tests (#21776)

* remove unnecessarily included module from job (#21827)

* APPEALS-47211: Improve Performance of Distribution Queries (#21840)

* rework ready_for_distribution scope

* fix non-hearing docket distribution bug

* restart tests

* added null checks for appeal affinity in distribution queries, update tests (#21893)

* add check for appeal being active to distribution and associated slack message (#21902)

* prelim work on 48033

* refactored code a bit, working on data creation now

* created ama_affinity data

* fixing mispelt variable

* add back line that was removed

* updated users_spec to now pass

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: Calvin <Calvin.Costa@va.gov>

* fixed merge conflict

---------

Co-authored-by: alex-guanipatin <143651918+alex-guanipatin@users.noreply.github.com>
Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>
Co-authored-by: slwallerBAH <161883271+slwallerBAH@users.noreply.github.com>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Matt Roth <roth_matthew@bah.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: Calvin <Calvin.Costa@va.gov>

* Revert "APPEALS-46087 fix css table width issues for case distribution lever history table (#22024)"

This reverts commit 05896d32fa0510bf76101dff689ad05187dc7ccf.

* Add unit testing around push priority distributions with Docket Levers (#22078)

Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-50756: Fix for Appeals Ready to Distribute Query includes dates that are NA (#22090)

* APPEALS-50756 fix appeals ready for distribution csv report to exclude place holder dates for non priority appeals

* fix linting issues of feature branch

* fix rubocop offenses from feature branch

* APPEALS-50756 updated login in ama rows method

* APPEALS-50756 fix lint issues

* APPEALS-50756 The Appeals Ready to Distribute Query includes dates that are NA (#22183)

* APPEALS-50756 fix appeals ready for distribution csv report to exclude place holder dates for non priority appeals

* fix linting issues of feature branch

* fix rubocop offenses from feature branch

* APPEALS-50756 updated login in ama rows method

* APPEALS-50756 fix lint issues

* APPEALS-50756 fix argument error

* APPEALS-49839. improve the test coverage in test docket seeds controller (#22060)

* APPEALS-49839. improve the test coverage in test docket seeds controller

* APPEALS-49839. Improve legacy_tasks_controller test coverage

* APPEALS-49839. Lint fixes

* APPEALS-49839. seedReducer test coverage

* APPEALS-49839. Improve CustomSeed test coverage

* APPEALS-49839. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-52535. Fix PG::UniqueViolation: ERROR in the seed (#22296)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* reverted the invalid role error change

* reverted the invalid role out of the legacy tasks controller too

---------

Co-authored-by: Blake Manus <33578594+Blake-Manus@users.noreply.github.com>
Co-authored-by: sbashamoni <SampathKumar.Bashamoni@va.gov>
Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: Michael Beard <131783726+mbeardy@users.noreply.github.com>
Co-authored-by: cdetlefva <133903625+cdetlefva@users.noreply.github.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Michael Beard <michael.beard@va.gov>
Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
Co-authored-by: 631068 <rickybmanus@gmail.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: youfoundmanesh <maneshreddy.kommidi@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>
Co-authored-by: kristeja <112115264+kristeja@users.noreply.github.com>
Co-authored-by: Craig Reese <Reese_Craig@bah.com>
Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>
Co-authored-by: Matt Roth <roth_matthew@bah.com>
Co-authored-by: alex-guanipatin <143651918+alex-guanipatin@users.noreply.github.com>
Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>
Co-authored-by: slwallerBAH <161883271+slwallerBAH@users.noreply.github.com>
Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.nore…
AdamShawBAH pushed a commit that referenced this pull request Aug 8, 2024
* APPEALS-44148: Add ruby_claim_evidence_api gem (#22059)

* APPEALS-50758: Fix broken tests in spec/controllers/case_distribution_levers_controller_spec.rb (#22072)

* update test data to fix tests

* fix test data setup

* fix dates in test setup

* disable flaky jest test

* APPEALS-49845: Hearing CAVC Appeals are not respecting CAVC affinity (#22043)

* pass judge into base relation queries on hearing docket

* update scopes to distribute CAVC hearing to original judge when within hearing window

* APPEALS-49845: Add seed data (#22056)

* add seed data

* fix users seed spec

* APPEALS-49555: Some AOD appeals are not being selected as priority by the distribution algorithm (#22067)

* aod appeal with claimants person does not contain DOB

* Addressed comments

---------

Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>

* Merge feature/appeals-34320 into release branch (#22094)

* ClayS/APPEALS-39107 (#21458)

* add request issue modification button for non-admins

* add tests covering the request issue modification button

* appease rubocop overlord

* update feature tests

* change to inline style and absolute import

* update feature test

---------

Co-authored-by: Brandon Lee Dorner <Brandondorner@yahoo.com>

* JHoang/APPEALS-39445 (#21445)

* added new dropdown actions  for edit issues, restricted visibility to non vha admins

* fix failing tests

* update jest for new dropdown actions

* added placeholder modal for request additional issue button

* Replace relative import with absolute, rename variable to check for non vha admin

* render new dropdown actions and button only for in progress tasks

* revert previous changes, added new changes

* fix typo in issuelist

* typo again

* remove extra empty line

* fix jest tests and vha_hlr_sc rspec

* address styling issues

* more restrictions to dropdown/button visibility

* remove unused comments

---------

Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>

* Pending Request Issues seeds, factories and query update (#21437)

* migration and initial commit of the factory

* changing approve status to status

* Added active record associations on models, added factory attributes, added pending tasks on queue tab

* adding AC-2 condition to get pending record response from pending_request_issue table

* factory and seed for pending_request_issues

* Added pending request issues count alias for sorting and serialization to Task query

* adding issue_type_Count and task_type_count for pending tab

* Added spec tests for vha business line and business line spec files, cleaned up the controller, modified issue_type_count query

* fixing the spec failures and code climate issues

* removed byebug

* Fixing code climate issue and adding seed data

* fixing the schema error

* Revert "fixing the schema error"

This reverts commit 73070faa40a5615c45ae9e7ec5a0bef74f419e9e.

* skip association so that test passes

* renaming the table to - issue_modification_request and corresponding changes to the model, factories

* fixing spec failures and linter

* fixing spec failures and linter

* making sure pending tasks doesnt show up in in progress tab and modified the factory so that Claimant name appears

* fixing the spec failure

* removing coalesce and removing null: true

* more PR feedbacks

* adding fix to the PR comments

* removing distinct

* fixing the error in the query

* Apply suggestions from code review

Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>

* removing limit as suggested in the pr

* Adding evaluator to the factory and adding it to the seeds

* Adding PaperTrail for change history stuff

* adding schema

* adding new column to the table

* changed decider_decision_text to decider_note

---------

Co-authored-by: almorbah <al.mortada@va.gov>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>

* SeanC/APPEALS-40669 | Creation of ‘Pending admin review’ section on Edit Issues Page (#21604)

* Added fake data and rendering for it

* made the fake data better

* pending issues are being rendered

* passed up user admin of org from backend

* Added userIsOrgAdmin to the frontend

* created admin and non fake data

* determined fake data to use based on userIsOrgAdmin

* got the issues to render

* Created a new IssueModificationList component

* updated the issuemodification and row to work with the lists

* updated the fake data and the issues container

* removed some code for getting the user info

* updated IssueModificationRequest to make wireframe

* Updated row and list to work with the new request

* updated the fake data

* added propTypes to IssuesModificationList

* cleaned up some lint in addissues

* added Prop types to request

* added key to list

* improved row

* improved the row logic

* added some space to the list

* refactored the layout for the request

* added text to the COPY

* slight change to fake data

* refactored the row

* got sorting working

* added id to map of list

* updated formating functions for modificationIssueRequests

* updated the request to work with the formated data

* removed some console logs in row

* updated addIssues to format the fake data

* updated request to work with the serializer

* removed logs

* updated fake data and formatter

* removed unneed code

* removed unneed code

* removed unneed code

* Rename IssueModificationRow.jsx to issueModificationRow.jsx

* removed unneed code and renamed a couple things

* Slight change to request

* removed some comments

* added some data for the jest test

* got some of the jest tests working

* fixed a typo in request

* updated the prop for the tests

* fixed the broken test and added more for list

* Fixed the fake data and removed unneed code

* removed unneed coded

* changed the html in the request to better match the design

* added css rule for new class

* fixed an typo in COPY

* similified some logic in row

* added logic to not create the pending section if it is null

* cleaned up some lint in intake.scss

* updated the fake data to better match the wireframes

* added divider inbetween requests

* formatted the dates on the request

---------

Co-authored-by: Clay Sheppard <csheepy@gmail.com>

* TYLERB/APPEALS-39106: Creation of Pending tab (#21455)

* Initial commit to add the pending tab to the vha business line decision review queue.

* Updated existing tests and added new ones for the pending tab.

* Added tab task counts to the decision review queue.

* Adjusted variable names to match up with the feature branch. Made a column change to the create_issue_modification_request migration file. Added in methods to serialize the issue_modification_requests. Added pending_issue_modification_requests to the decision review serializer.

* Updated schema.

* Added a serialzer and related javascript and redux methods to place issue modification requests into the frontend.

* Updated tests to work with new issue modification request factories.

* Added a couple more test scenarios for the decision review controller spec file and changed the FactoryBot.create methods to create().

* Removed extra copies of the pending tab mappings and if statements from the decision reviews controller that happened due to the feature merge.

* Updated ReviewPage jest test snapshots. Updated and added more tests to the NonCompTabs jest test for the new pending tasks tab. Fixed an issue where the TaskTableTab was added an empty hash to the columns as a placeholder for the pending requests column instead of not adding any additional columns.

* Added a few constant variables to copy.json and queue config and removed todo statements.

* Fixed serializer tests and Fixed a constant name.

* Renamed some javascript variables to match the serializer.

* Fixed more broken tests.

* Updated the pending tasks query to show the correct amount of pending issues instead of an incorrect count. Added the pendingRequests column to the SORT_COLUMN_MAPPINGS in the decision reviews controller so that the user can sort by the new pending requests column via the controller. Added tests to cover these scenarios.

* Made some layout and css adjustments to the search bar and tab description for the decision review queue.

* Added padding to the bottom of the new search box and description div to create some space between ui elements. Changed the tab titles in the decision review queue to be title case for all words instead of only the first word.

---------

Co-authored-by: Brandon Lee Dorner <Brandondorner@yahoo.com>

* Appeals-40989 - Inclusion of required Decision Date Banner on Add Issues (#21588)

* APPEALS-40989: Adding functionality to check if user is vhaAdmin and task is in progress then display Banner and make decision date required.

* Fixing spec failures, adding new model spec, new task factory to support spec

* fixing linter issues in spec

* Adding storybook and fixing codeclimate complain

* fixing PR comments and adding banner to unidendified modal

* removing local font sizing

* fixing linter issue

* APPEALS-39446 - Modal creation – modification, removal, withdrawal, request additional issue [Non-Admin] (#21681)

* WIP components

TODO: validation/errors, redux

* add some error messages and the error schema for the addition modal

* add missing data error messages for the rest of the modals

* add test coverage for issue modification request frontend errors

* disable submit button until form is dirty

* remove currentIssue from request additional issue modal

* DRY out these modals

* clean up imports and some formatting

* WIP stuck the issue modification requests into redux

* add requested additional issues to the pending review section

* get benefit type from redux

* add test covering modal submission

* remove unnecessary expectation

* move a line to read better

* linting fixes and remove unneeded code

* update test

* really fix this test

* try to fix the add isues page

* fix ambiguous click in spec

* add storybook for modals

* update snapshot

* update capitalization in reviews spec

* destructure modal props

* more destructuring

* use full name and css id for requestor

* import less lodash

* fix some more capitalization

* remove old comment

* Update client/app/intakeEdit/components/RequestCommonComponents/RequestIssueFormWrapper.jsx

Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>

* Update client/app/intake/components/IssueModificationRequest.jsx

Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>

* prevent future dates in issue modification requests

* format decision date in current issue section

* Prior decision date -> Decision date

---------

Co-authored-by: Prajwal Amatya <122557351+pamatyatake2@users.noreply.github.com>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>

* TYLERB/APPEALS-39447: Display of banner on Edit Issues page – issues with pending requests (#21695)

* Initial commit. Added the PendingIssueModificationRequestsBanner. Added the connection between the serialized pending issue modification requests to the ui in the front end EditAddIssues page. Refactored the issueModificationRow, IssueModificationList, and IssueModificationRequest components. Changed the request_type enumeration to be lowercased to match the key value and changed the database schema, migration, and factory to match up with the new enumeration value.

* Added withdrawal_date to the serializer and redux store for issue modifications. Renamed a constant variable from body to message. Swapped a groupBy function to the lodash version since it was causing capyabara to fail for the feature test. Added a feature test for the banner. Also added a some helper functions and feature test checks for the issue modification requests when pulling data from the actual database objects instead of mocked data.

* Updated jest test.

* Added a backup description to the request issue in the IssueModificationRequest.jsx file so it will work for request issues being moved to the section via the ui.

* Changed an rspec matcher to fix code climate issue.

* Removed two junk console output files that were erroneously created.

* Made changes to the issue modification ui to match the feature branch changes and renamed the redux key to always use pendingIssueModificationRequests.

* Added a new redux store key for the originalPendingRequests in order to move them around. Reworked how the issues were being removed from the issues section when they are associated to an existing or new pending request.

* Cleaned up old issue modification request redux code.

* Reverted a change to the intake redux store since the objects are added via reference instead of an object clone.

* Fixed an issue where having empty pendingIssueModificationRequ
ests was causing a javascript error. Removed some todo comments and commented code.

* Removed another todo comment.

* Removed the pending requests banner from the cancel edit issues page.

* Changed the issue modification seeds file to use the correct values for the request_type attribute based on the enumeration value change to always use lowercase values. Updated a variable name in javascript to be more descriptive.

* Updated the RequestIssueFormWrapper component so that withdrawal and removal requests would behave in the same way as modification of existing issue requests. Fixed a bug where the decision date was being set to undefined or null for removal or withdrawal issue modification requests instead of taking the decision date from the original issue.

* Removed n+1 bullet warnings from the decision_review serialization process for pending_issue_modification_requests.

* APPEALS-45242 (partial) (#21759)

* add a doubleArrow option to SearchableDropdown

* overriden -> replaced

* JHoang/APPEALS-40672 (#21756)

* Initial commit. Added the PendingIssueModificationRequestsBanner. Added the connection between the serialized pending issue modification requests to the ui in the front end EditAddIssues page. Refactored the issueModificationRow, IssueModificationList, and IssueModificationRequest components. Changed the request_type enumeration to be lowercased to match the key value and changed the database schema, migration, and factory to match up with the new enumeration value.

* Added withdrawal_date to the serializer and redux store for issue modifications. Renamed a constant variable from body to message. Swapped a groupBy function to the lodash version since it was causing capyabara to fail for the feature test. Added a feature test for the banner. Also added a some helper functions and feature test checks for the issue modification requests when pulling data from the actual database objects instead of mocked data.

* Updated jest test.

* Added a backup description to the request issue in the IssueModificationRequest.jsx file so it will work for request issues being moved to the section via the ui.

* Changed an rspec matcher to fix code climate issue.

* Removed two junk console output files that were erroneously created.

* Made changes to the issue modification ui to match the feature branch changes and renamed the redux key to always use pendingIssueModificationRequests.

* Added a new redux store key for the originalPendingRequests in order to move them around. Reworked how the issues were being removed from the issues section when they are associated to an existing or new pending request.

* Cleaned up old issue modification request redux code.

* Reverted a change to the intake redux store since the objects are added via reference instead of an object clone.

* Fixed an issue where having empty pendingIssueModificationRequ
ests was causing a javascript error. Removed some todo comments and commented code.

* Removed another todo comment.

* Removed the pending requests banner from the cancel edit issues page.

* Changed the issue modification seeds file to use the correct values for the request_type attribute based on the enumeration value change to always use lowercase values. Updated a variable name in javascript to be more descriptive.

* Added modal to request cancellation of an existing request modification

* fix lint and failing jest

* conditional rendering in cancelpendingrequestissue modal

* fix decision date and withdrawal dates not showing correctly when requesting modification

* fix mocked props for CancelPendingRequestIssueModal.test.js

* revert date changes, fix issue description display

* Updated the RequestIssueFormWrapper component so that withdrawal and removal requests would behave in the same way as modification of existing issue requests. Fixed a bug where the decision date was being set to undefined or null for removal or withdrawal issue modification requests instead of taking the decision date from the original issue.

* added space between current issue and pending issue request

* refactor cancelpendingrequestissuemodal structure

* remove temp dropdown button

---------

Co-authored-by: = <tyler.broyles@va.gov>
Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>

* Al/appeals 45834 (#21641)

* Added non admin issue modification request logic

* added finial touches on NON::AdminModificationRequestsUpdater class

* Added logic to make sure that the user is an admin or non-admin who belongs to Vha organization

* Added some Rspec tests for `NonAdmin::IssueModificationRequestsUpdater` and cleaned up Class

* Added controller spec tests for SupplementalClaimsController#update HigherLevelReviewsController#update

* Code clean up

* Fixing lining errors

* code clean up

* Added code to fix some failing rspec tests

* fixed linting errors

* Ensure backend validation – only one request per issue
If an issue already has a request and another is submitted, an error is thrown

* rebased off latest feature branch and downcased request_type and status  params

* Added request_issue_id param to account for existing request_issues in situations when request_type is other than addition. Adjusted process_modification? method

* Added changes based on PR feedback

* added a shared example block to dry up code

* more feedback

* changed name file structure

* Needed to re-handle validation errors

* Pamatya/appeals 40671- adding Select action dropdown to the Admin section (#21788)

* Adding props and searchable dropdown to meet ac

* fixing linter, and adding test

* added storybook for issue modification row and issue section row

* fixing the values in the popup

* fixing the Removal and withdrawal modal to behave similar to modification modal

* making changes to the code to fix the bug

* fixing spec, linter and jest failures

* missing schema file

* changing the Onclick to take object instead of the index or identifier

* removing unused code

* code cleanup

* J hoang/appeals 40987 (#21889)

* move issue modification request actions to new file, created new confirm issue modification change modal

* fixed some code climate issues

* some changes from review

* fix jest

* added new action to update pending issue request

* maybe fix tests?

* revert pending admin review display

* change pending admin review display to active pending issues only

* fix pending admin display

* consistent parameter placement and added an extra check for requested issues display

* fix all failing tests

* fix movetopendingreview action call breaking rspec

* fix cancel buttons on confirm modal modification

---------

Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>

* APPEALS-46705: Addition of SearchableDropdown to IssueList (#21752)

* change issue action selector component and appearance

* fix padding

* fix linting error

* fix frontend tests

* fix list rendering bug

* wip fix one type of failure

* fix a couple more kinds of failure

* fix tests in ama_queue_workflow_spec

* fix a couple tests

* another one

* fix dropdown helpers to work if something was already selected

* fix test in edit_ep_claim_labels_spec

* fix issue modification request specs

* more tests

* update more tests

* whac a mole

* remove comment

* fix padding

* remove comment and whitespace

* make specs consistent

* SeanC/APPEALS-40670 | Update actions and pending request modal on Edit Issues Page – issues with pending requests [Non-Admin] (#21857)

* got the options actions working

* hooked up the cancel action

* added some styling for drop down

* changed the wording of the dropdown actions

* added new onClick action, added pending obj to state and cleared it

* passed the onClick to Row and List

* added onClick and useSelector to Request

* added new redux action

* removed comment

* added edit redux action

* fixed an issue from merge in addIssues

* updated the options to work with non admin actions and readOnly

* removed unneed styles

* removed comment

* changed modal title to change based on pendingIssueModificationRequests

* removed redundant code

* updated action and reducer to work with other code

* updated name of action on parent component

* updated form wrapper to work with new action

* fixed a failing spec test

* Added tests for action options for non and admin users

* refactored the props for the test for IssueModificationList

* slight change to the test

* add new test in issue_modification_request spec

* added logic in Request for the text to change slightly

* fixed a failing test

* fixed an error with the form wrapper

* fixed a few issues from the merge

* fixed failing test

* fixed an issue from the merge

* changed I back to i for issueModificationRow

* refactored options to a const in Request

* removed added comma in constants

* renamed const in FormWrapper

* removed no longer needed props in IssueModificationListProps

* removed setting the index when reviewing a modification request

* fixed a date formatting issue

* created const for pendingIssueModificationRequest

* Fixed issue with incorrectly changing admin modal title

* cleaned up some lint

* cleaned up more lint

* fixed an import issue

* removed conditional for the label text

* fixed a failing jest test

* fixed failing rspec

* removed comment in issue_modification_request_spec

* APPEALS-47866 (#21916)

* UX changes for modals

red buttons -> blue buttons
text wraps around icon
copy updates

* rspec updates

* update snapshots

* add a storybook for modals with icons

* refactor storybook

* remove class

* switch to constants

* remove unnecessary props

* fix the AddIssues storybook

* tinkering

* update snapshots again

* Pamatya/appeals 40997 v3 (#21926)

* move issue modification request actions to new file, created new confirm issue modification change modal

* fixed some code climate issues

* some changes from review

* fix jest

* added new action to update pending issue request

* maybe fix tests?

* revert pending admin review display

* change pending admin review display to active pending issues only

* fix pending admin display

* consistent parameter placement and added an extra check for requested issues display

* fix all failing tests

* fix movetopendingreview action call breaking rspec

* fix cancel buttons on confirm modal modification

* initial push

* renaming component and making the remove original issue button work

* fixing issues related with closing the modal and addissues page getting prerendered

* fixing spec failure

* fixing spec and linter issues

* adding spec test for approval and rejection

* new branch withdrawal date

* fixing bug and fixing the jest failure

* addressing comments

* fixing spec and linter failure

* code clean and consistency between two modals

* adding validation to the spec

* fixing the spec failure

* fixing spacing and spec

* fixing linter

---------

Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>

* Update schema.rb

Fix error in previous merge conflict attempt.

* Update seeds.rb

Fix error in conflict resolution

* TYLERB/APPEALS-40985: Frontend Submission of Requested Issues/Pending Admin Review Section (#21912)

* Initial commit. Altered an existing model validation for issue modification requests and added a new validation. Added a formatter to prepare the issue modification requests for form submission and altered the button text for vha to be save instead of establish if there are pending issue modificaiton requests in the redux store.

* Added the redirection code for claim reviews that have active pending issue modification requests. Also added the non admin issue modification success banner and refactored the existing flash banner code for other claim review types to make them easier to modify in the future.

* Fixed code climate issue.

* Renamed a function parameter in RequestIssueFormWrapper to make it more clear on what it is actually using. Updated logic to use a property insted of the form data.

* Refactored how the claim review controller was building flash messaging to make it easier to customize it for vha claim reviews.

* Added a new selectors file with a selector to only get openPendingModification requests which are pending modification requests that are assigned. Changed the selector in the PendingIssueModificationRequestBanner to the new selector.

* Moved the open pending issue modification requests selector to the intake selector. Imported it and used it in the add issues page.

* Fixed an issue where the decision date was not added as the correct string format to the issue modification redux store which was causing it to fail to save later after form submission. Expanded the feature test for non admin to include submitting the form and verifying the success banner and issue modification request data.

* Added one more additional check to the feature test.

* Added the open issue modification requests selector the save btton text for the edit issues page.

* Made changes to the CancelPendingRequests modal to work with a new reducer. Added edited and cancelled pending requests to the formatIssueModificationRequestSubmissionData function.

* Added an edited boolean attribute to the form data for modification type modals for pending requests for an easy way to determine if a issue modification request has been edited without changing the status.

* Removed max width from non comp description text.

* Fixed admin messaging when there are pending issue modification requests remaining on the claim review.

* Added all the remaining frontend code and logic to make the issue modification form submission work. Fixed an issue where withdrawal date was not working correctly with the existing withdrawal process.

* Refactored the claim review controller logic to work with the non admin and admin updates to issue modification requests. Added methods into issue modification request for admin updates. Updated validations. Refactored the non_admin_updater to work for both admin and non admin workflows. Added some fallback error handling for issue modification updates.

* Removed unused import.

* Updated the RequestIssueStatus component option value from rejected to denied to matchup with the enum field on the issue_modification_request model.

* Fixed two code climate issues. Rewrote the issue modification request factories to fix the seed data.

* Removed some lines from RequestIssueFormWrapper that I don't think were neccessary. Removed some todos.

* Fixed a couple of failing specs.

* Added a new feature test spec file that Praj created.

* Added code to make the associations for request issues to issue modification requests through the UI work correctly in the request_issues_update model for additions and modifications since it is creating brand new request issues instead of using existing records in the database.

* Renamed non_admin_updater_spec file and fixed tests.

* Code climate fix.

* Updated the mocked data controller tests.

* Renamed the NonAdminUpdater and all related files to Updater.

* Fixed a bug where the confirm pending request issue modal was not properly setting up the request issue by using the old request issue id that the modification request was associated to. Fixed a console warning in the RequestIssueStatus component.

* Fixed spec failures due to changing banner text for editing vha claims.

* Fixed an issue where the openPendingModificationRequests selector was causing a console error for legacy appeals due to different initialization of the redux store. Removed the no decision date banner for legacy appeals since it was never intended although it shouldn't happen.

* Fixed jest test for CancelPendingRequestIssueModal where the property name had changed.

* Added admin process testing to the updater_spec.rb service class for issue modification requests. Added errors to caseflow error.rb and added a constant to copy.json.

* Removed todo statements.

* Updated a modal snapshot.

* Fixed merge conflicts that didn't get resolved.

* Added an addition check for the wording to be correct for the issues update banner in add issues to properly reflect the wording of the save button at the bottom of the page depending on pending issue modification requests. Changed the wording on a success banner from established to edited that was incorrect. Added a different success banner for a vha claim review when it still has pending issue modification requests after an admin has only actioned some of them.

* Updated the NonRatingIssueRequestModal decision date logic to prevent a non vha user from adding an issue without a decision date to a claim that was already in progress.

* Fixed spec failures related to the banner text changes.

* Added a banner and block the save of the page if the user is about to close a claim via a removal or withdrawal while the claim still has a pending addition issue modification request on it. Added feature test for this and uncommented some feature test code that shouldn't have been commented out. Added a way to make the content column span two columns in the add issues page table for styling the banner.

* Moved the new banner check into the edit page block to fix tests.

* CSS text change for the alert banner.

* text change and text title change

* Removed the established vha text variable in the claim review controller since it isn't being used anymore. Fixed a linting error.

* test fix for alert title change

---------

Co-authored-by: almorbah <149511814+almorbah@users.noreply.github.com>
Co-authored-by: Prajwal Amatya <pamatya@take2it.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>

* Initial commit. Added a transaction wrapper around the update_admin_request updater service method to prevent partial processing of requests if an error occured during any of the processing. Added an if check to the claim review controller to make sure that the request issues update class can be processed before processing any of the approval issue modification requests to avoid processing the requests without modifying the request issues that are currently on the claim.

* Added in code climate change and seed data change to match master.

* Added a public method for request issues update to check for p
ossible errors before running the perform method. Refactored the controller logic to fix test failures.

* Added approval back it got accidently removed. Removed some spacing in addissues.jsx.

* Fixed a few flaky tests due to time errors.

* Pamatya/appeals 49849 (#22057)

* adding banner for both admin and non-admin and test

* typo correction

* removing commented out codes and adding a space between lines

* removing props from the syntax

* changing let to const

---------

Co-authored-by: Clay Sheppard <csheepy@gmail.com>
Co-authored-by: Brandon Lee Dorner <Brandondorner@yahoo.com>
Co-authored-by: jonathanh-va <111081469+jonathanh-va@users.noreply.github.com>
Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>
Co-authored-by: Prajwal Amatya <122557351+pamatyatake2@users.noreply.github.com>
Co-authored-by: almorbah <al.mortada@va.gov>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>
Co-authored-by: Brandon Dorner <brandonleedorner@gmail.com>
Co-authored-by: Sean Craig <110493538+seancva@users.noreply.github.com>
Co-authored-by: = <tyler.broyles@va.gov>
Co-authored-by: almorbah <149511814+almorbah@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <Pierce_Robert@ne.bah.com>
Co-authored-by: Prajwal Amatya <pamatya@take2it.com>

* updated dispatch mailer email address to Decisions instead of Hearings (#22095)

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>

* APPEALS-45631 Add and fix address (#21800)

* APPEALS-45631 Add and fix address

* empty commit

* empty commit

* fix/add RO id

* changed id from SS to GB

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>

* Prodtest/appeals-36234-appeals-44031 (#22109)

* APPEALS-36339 (#21436)

* Updated to remove obsolete levers of ACD Disable Legacy Distributions and ACD Disable Non-priority Distributions

* Fixed redundant linting issue

* Fixed empty line linting issue

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* mbeard/APPEALS-44379 (#21451)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44417 Seeds for Docket Lever Demo (#21534)

Co-authored-by: Christopher Detlef <>

* APPEALS-36345-updated (#21537)

* Refactored exclusion table

* Fixed ordering issue and testing

* mbeard/APPEALS-44379 (#21530)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

* first new commit with new args

* updates methods and test query

* updates age_of_oldest methods params

* cleans up method removes args and updates tests, fixes linting

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44346 Demo Docket Goal Lever Test Seed Data (#21524)

Co-authored-by: Christopher Detlef <>

* Chrisbdetlef/appeals 40705 (#21535)

* Chris backend Work

* APPEALS-44441. Added initial changes for individual seed

* WIP

* APPEALS-44441. Fixed the table css

* APPEALS-44441. Added Custom and Scenario Seed components and jest tests

* APPEALS-44441. Fix ScenarioSeeds jest test

* APPEALS-44441. Fix CustomeSeeds Jest test

* init commit

* fixes linting issues

* capybara test init

* APPEALS-44441. Backend Integration API changes

* APPEALS-44441_1. Matched the constant keys in the backend

* APPEALS-44441_1. Update the param to match the backend and fixed spec

* APPEALS-44441. lint fixes

* APPEALS-44441. linting fixes

* sharsha/APPEALS-44441. fixed the route and tests

* Change route

* Change variables to match front and back end

* CustomSeed Jest test fix

* Fix issues

* Fix rubocop issues

* Use existing method in the controller

---------

Co-authored-by: Christopher Detlef <>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Michael Beard <michael.beard@va.gov>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 (#21566)

* Fixed rspec failures on constants

* APPEALS-45531. Remove dead code

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Updated lever history to handle null unit values from docket levers (#21567)

Co-authored-by: 631966 <amy.detwiler@va.gov>

* Sharsha/appeals 45531_1 (#21573)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 1 (#21609)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

* TEST FOR FIX

* MORE TESTING

* Fixed rspec issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45502. Organize route and fix the controller (#21595)

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Ricky/APPEALS-36345.fixes (#21612)

* Updated lever history to handle null unit values from docket levers

* Updated member view of exclusion table with proper text display and fixed missing css

* Updated unit test and test data to test rendering of exclusionTable

---------

Co-authored-by: 631966 <amy.detwiler@va.gov>

* ricky/APPEALS-44053 (#21587)

* init commit, adds conditional to check for docket_type ama to method, fixes json constants to snakecase

* puts statements testing

* updates seeds for evidence_submission, adds method to hearing_request_docket.rb and dist_concern.rb

* updated appeals dsit

* final fix for PR

* updates spec to reflect changes in hearing_request_docket

* uncomments seeds

* Ricky/appeals 43523 (#21649)

* Added Assignment Queue link to Switch Users test page

* Updated controller to validate role and redirect

* Updated error information

* Updated rspec tests

---------

Co-authored-by: 631068 <rickybmanus@gmail.com>

* APPEALS-45898. Updated the lever_group_order values (#21639)

* APPEALS-45898. Updated the lever_group_order values

* APPEALS-45898. Updated order of the evidence submission priority and non-priority

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-40646 (#21645)

* Init commit

* adds methods and useffect first pass

* fixes isIdle warning

* removes important from scss

* refined handleToggleChange method

* updates font color for h4

* adds keys to the td and fixed proptype for loadAcdExcludeFromAffinity in casedistributionapp

* Chrisbdetlef/appeals 43117.cleanup (#21671)

* APPEALS-43421: Attorney Selection Sticking on Dropdown after Assignment (#21401)

* redo init commit

* updated imp. logic

* attorney widget fix

---------

Co-authored-by: Calvin <Calvin.Costa@va.gov>

* Add ruby CE API Gem

* remove correspondence changes from schema.rb (#21468)

* Revert "Add ruby CE API Gem" (#21479)

This reverts commit c78afe30620716d59d2ac31ad6eed71585d78a98.

* Override SCT Bulk Assign Page task limit (#21465)

* Override SCT Bulk Assign Queue 15 case limit & Adjust SCT attorney assign task action label

* feature/APPEALS-35707-29633-29632 (prodtest) (#21485)

* 🔀 Squash merge AlecK/APPEALS-35707 - Replace `database_cleaner` with `database_cleaner-active_record`

* 🔀 Squash merge jcroteau/APPEALS-29632-fix-deprecation-action-view-base-instances

* 🔀 Squash merge jcroteau/APPEALS-29633-fix-deprecation-warning-active_record-result-to_hash

* feature/APPEALS-44871 Steps for installing node in the Caseflow demo environment  (#21483) (#21484)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Revert "feature/APPEALS-44871 Steps for installing node in the Caseflow demo …" (#21489)

This reverts commit a6262001f9bedabca60598c82bfe1b803f0f16c7.

* Sbashamoni/appeals 44871 node14 demo fixes (#21490) (#21495)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* add error rules to demo builds (#21496) (#21498)

Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>

* APPEALS-43117 Add QA Users for testing

* Fix rspecs

* Fix issues with attorneys and judge teams

* Fix org count

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: youfoundmanesh <maneshreddy.kommidi@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>
Co-authored-by: Christopher Detlef <>

* Minor fixes (#21694)

* Minor fixes

* Fix rspec tests and properly check for judge css id

* Fix lint issue

---------

Co-authored-by: Christopher Detlef <>

* Fix Legacy Case issues (#21747)

Co-authored-by: Christopher Detlef <>

* APPEALS-46037. Fix padding in the lever history table (#21725)

* APPEALS-46037. Fix padding in the lever history table

* APPEALS-46037. Fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Fix Lauren Roth issue (#21813)

* Users with a VACOLS::Staff entry no longer get created with the default name of Lauren Roth

Co-authored-by: Christopher Detlef <>

* ricky/APPEALS-44044 (#21814)

* first pass at legacy_docket method and spec

* second iteration of legacy_docket and spec

* adds method to age_of_oldest methods and updates test scenarios

* Updated testing and expanded method missing logic

* Updated legacy_docket_spec file and tests

* Updated boolean logic, updated rspecs and factories

* Updated rspec tests to include factories

* updates docket_spec line 317 and factory for disable_ama_non_priority_direct_review

---------

Co-authored-by: Michael Beard <michael.beard@va.gov>

* updates ready_priority_nonpriority_appeals to public_send, updates test (#21844)

* APPEALS-36333 first iteration of docket time goal and prior to goal (#21523)

* APPEALS-36333 first iteration of docket time goal and prior to goal

* APPEALS-36333 address pr comments and moved the logic to docket model

* APPEALS-36333 Added specs for docket and hearing request docket models

* refactored code and moved it to distribution scopes

* APPEALS-36333 address pr comments and refactor code

* APPEALS-43996 updated lever name in all the required files to fix spec failures

* APPEALS-44000 revert hearing request docket model changes to keept it in sync with feature

* APPEALS-44000 updated hearing request docket model specs

* APPEALS-44000 fixed jest tests

* APPEALS-44000 fixed broken rspecs

* APPEALS-43996 fix rubocop warnings

* APPEALS-43996 fix push priority job spec failures

* APPEALS-43996 Updated case distribution lever and docker model and refactor specs

* APPEALS-43996 added rake task to update case distribution lever item in db

* APPEALS-43996 update docket model to handle the scenario when the lever being disabled by a user via the UI

* APPEALS-43996 update section title

* APPEALS-43996 revert rake task

* APPEALS-43996 add new factories to case distribution lever and fix spec failures

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks (#21834)

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks

* APPEALS-45191. Refactor and fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* refactor the logic and fix docket spec failures

* changed the call times to 3 times

* APPEALS-36333 fixed the docket time goal to check the existence of the item before using the public send to get the value

---------

Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: 631966 <amy.detwiler@va.gov>

* updated the seeds to align with the work completed

* Updated Toggle Switch behavior when clicked while idle (#21874)

* Csv research (#21892)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

* csv and etc

* CSS for buttons

* jest tests for the reducer and action types

* Jest test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-46057. CleanUP (#21914)

* more jest tests

* Disable scenario seeds

* Lint fixes

* APPEALS-46057. disable all scenario seeds

* APPEALS-46057. Refactor the TestSeed wrapper to be a functional component and fixed jest test

* APPEALS-46057. Jest job in GHA complaining on test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* updates line of test to correctly build lever item (#21918)

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45191. Updated the query to return the date based on the calculation (#21928)

* APPEALS-45191. Updated the query to return the date based on the calculation

* APPEALS-45191. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisharsha/appeals 43962 (#21929)

* Sharsha/appeals-44911_1 (#21784)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisbdetlef/appeals 44910 (#21838)

* Initial

* Add JSON parsing and multiple calls to rake tasks

* Pre-caby tets

* Add capybara tests and add IDs to buttons

---------

Co-authored-by: Christopher Detlef <>

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: cdetlefva <133903625+cdetlefva@users.noreply.github.com>

* APPEALS-43962. Lint fixes (#21932)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Ricky/APPEALS-47293 (#21925)

* First pass implementation of fixing seeding rspecs

* Second pass at fixing errors in rspecs

* Revert updates to test if rspec passes

* Fixed linting issues in test_docket_seeds_controller_spec

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-48292 updated the column to be a string (#21954)

* APPEALS-48292 updated the column to be a string

* APPEALS-48292 added comment to the control_group field in the migration

* APPEALS-48292 added column comment to the schema, changed migration so that it can be rolled back

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false (#21948)

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false

* APPEALS-49004 added spec to check when Start Distribution Prior to Docket Time Goal toggle is on

* APPEALS-49004 fixed lint issues in docket.rb

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query (#21949)

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query

* APPEALS-48898. Renamed the column and update the method

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-49100. getting value from the start_distribution_prior_to_goal (#21968)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-46257 (#21976)

* updates routes and frontend urls to namespace

* removes superfluous <a> tags

* Ensure that legacy appeals are being created (#21981)

* Ensure that legacy appeals are being created

* Remove puts

---------

Co-authored-by: Christopher Detlef <>

* APPEALS-49403. Added buttons Docket Lever Seed (#21989)

* APPEALS-49403. Added buttons Docket Lever Seed

* sharsha/APPEALS-49403. Updated the endpoint URL path

* APPEALS-49403. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-44000 added check to skip priority appeals in docket model (#21992)

* Feature/appeals 36234 masterupgrade (#22003)

* sbashamoni/APPEALS-43724 Node 16 version upgrade changes (#21966) (#21975)

* Update node verstion to 16 in git workflow

* Update node verstion to 16 in nvm and dockerfile for demo

* Update node version in yarn.lock and package.json and .nvmrc file

* Update node's version path to node16 in docker-bin/env.sh

* Update and upgrade to node16 in client

* More updates to yarn.lock and package.json

* Fix tests by Adam Shaw

* Upadate snapshot for ScheduleVeteran.test.js.snap

* Doing some code clean up

* Doiing some more clean up

* Add and remove spaces to match master

* One more space to take care of

* One more space to take care of again

* One more space to take care of again

---------

Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* init master merge branch

---------

Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* Remove AOD trait from non-priority legacy appeal creation (#22013)

Co-authored-by: Christopher Detlef <>

* Sharsha/appeals 49461 (#22018)

* sharsha/APPEALS-49461. initial commit

* sharsha/APPEALS-49461. fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49421 (#22014)

* init commit fixes ama_np_ capybara test to expect user as admin, and first attempt  test_docket_seeds test

* removes previous chane for TASKS_LOADED

* fixes capybara for test seeds controller button ids

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-49403. Updated the buttons label (#22025)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49585 (#22020)

* init commit for non member view input

* fixes css issue for docket-lever-right

* Added a hyphen between value and unit for member only view

* replaces hyphen with comma

* Init commit replaces th with div for 508 compliance (#22036)

* Chrisbdetlef/appeals 47008 1 (#22040)

* Allow judges to see legacy cases and attorneys to be assigned cases

* Remove testing function

* Update spec to reflect new user count in seed file

---------

Co-authored-by: Christopher Detlef <>

* got rid of extraneous file

* got rid of yarn lock orig

* Include bandwidth as part of timeout error metric data (#21946)

* Include bandwidth as part of timeout error metric data

* add NetworkUtil.js file

* fix code climate issues

* fix linting issue

* remove safari webdriver test

* fix CI/CD issue with chrome_driver

* add tests for NetworkUtil.js

* move bandwidth to metric_attributes

* requested changes* fix NetworkUtil-test

---------

Co-authored-by: mikefinneran <110622959+mikefinneran@users.noreply.github.com>

* APPEALS-50734. Remove Legacy appeals from the query (#22071)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-46087 fix css table width issues for case distribution lever history table (#22024)

* Feature/appeals 36234.merge master.20240701 (#22075)

* APPEALS-47277 remove Vegas office (#21876)

* APPEALS-47277 remove Vagas office

* Removed Texas ID from other files and updated tests

* Snapshot update

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* hotfix/APPEALS-22403 (#21942)

* add identifier for filenumber or ssn in filenumber search

* linting

* codeclimate linting

* update match call to return boolean

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* APPEALS-46907: Update to Determination of Gen Pop Legacy Cases (#21986)

* Isaiah/merge 46910 (#21983)

* removed BFHINES checks and modified tests

* removed lingering bfhines test

* modified test

* most recent updates on tests for passing status

* removed refs to cavc updates

* Skip flaky test ro_viewhearsched_spec

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* APPEALS-44916: Case Distribution Affinity Calculations (#21899)

* APPEALS-44956: Add AppealAffinity model and database table (#21526)

* add migration for appeal_affinities

* add AppealAffinity model and associations, update migration for new column

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

* add new job, update affinity model validation and after save hook

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

* add return in job if no query results, tests for no query results

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

* remove comment, fix hearing factory, disable some seeds for testing

* add more tests

* test refactor

* update appeals for dist query to add affinity start, add seed file, fix hearing factory, add stat to dist factory

* disable new seed on reset

* update seed file with vet names, add another seed category

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* APPEALS-44959: Modify affinity date checks to use appeal_affinity (#21611)

* swap distribution queries from distribution_task to appeal_affinities

* update seed files to use appeal affinities instead of distribution task

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

* fix user seed, fix date format in distribution task instructions

* fix tests for date format update

* Calvin/APPEALS-44957-rake-affinity (#21577)

* grabbed receipt dates from distributed cases

* refactored for functionality + added method to grab appeals that match

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

* if appeal affinity is nil, it will now be updated

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

* updated start date to receipt date instead of Time.now

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

* APPEALS-46016: Add Affinity Start Date to the Explain Page (#21660)

* add affinity start date to explain page

* add feature test to verify dates display

* update rake task and spec (#21731)

* APPEALS-46325: Add Seeds for AOD Appeals and Update Dates to Match CAVC (#21730)

* add aod hearing cases to ama affinity cases seed

* fix lever spec

* APPEALS-45148: Hook to clear saved affinity date (#21623)

* initial imp. idea

* AC1: check for affinity_start_date on assignment

* AC2/3: update affinity start date  w/ instr.

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

* add case dist lever to new tests (#21776)

* remove unnecessarily included module from job (#21827)

* APPEALS-47211: Improve Performance of Distribution Queries (#21840)

* rework ready_for_distribution scope

* fix non-hearing docket distribution bug

* restart tests

* added null checks for appeal affinity in distribution queries, update tests (#21893)

* add check for appeal being active to distribution and associated slack message (#21902)

* Update users_spec.rb

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* hotfix/APPEALS-45177: TaskTable Default Sorting Fix (#21772)

* Updated the TaskTable component to use the defaultSort property instead of the defaultSortIdx property for queue table since that property is not used anywhere. Added a default sorting hash to the UnassignedCasesPage component and now pass that down to TaskTable. Removed references to defaultSortIdx.

* Added the type column default sort to the AssignedCasesPage widget as well.

* Added a parenthesis for clarity around a boolean. Moved the defaultSortingHash out into a constants file.

---------

Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>

* APPEALS-47106 Caseflow Swagger (#21993)

* Add Rswag and convert existing API documentation (#21778)

* add rswag

* Update Gemfile.lock

* Setup yaml UI

* remove and reroute old swagger files

* update format and servers values

* Update route_docs_controller.rb

* Update cmp_controller.rb

* cmp endpoint yaml

* cmp endpoint to return 501

* CMP endpoint swagger flies

* update swagger files

* adjust server order, add auth token

* cmp parameter name change

* add comments

* Update users_controller.rb

* unit tests and linting

* lint fixes

* Update swagger_helper.rb

* APPEALS-48048 Swagger Updates (#21909)

* update servers to not include a host

* remove host for server

* remove generated swaggers from definitions

* remove internal API endpoints from having generated swagger

* IDT servers fixes

* disable CMP swagger in prod and prodtest

* set authorization correctly

* fix what is required for CMP upload

* fix linting issues, update lint rake task to autocorrect for rubocop, add rubocop make command

* Update decision_reviews.yaml

* Update ama_issues.yaml

* Update vacols_issues.yaml

* Update swagger.yaml

* fix check failures

* Update docs_controller_spec.rb

* fix unit tests

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update rswag_ui.rb

* Update lint.rake

* Update decision_reviews_spec.rb

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update veterans_controller_spec.rb

* feature/APPEALS-43597 RC1.5.1 (#21996)

* APPEALS-36759 Add sms_response_content and sms_response_time notifications table

* APPEALS-37003 First pass at job refactor

* APPEALS-37003 Add comments and update kwargs for va notify service

* APPEALS-37003 Update spec files

* APPEALS-37003 Update spec

* APPEALS-37003 Ensure user in job and create email_enabled method

* APPEALS-37003 Remove question mark

* Limit max retry attempts to 5

* Add ? to boolen return methods

* jcohen/APPEALS-43706 (#21444)

* APPEALS-43706 macros added to each model file for the polymorphic relationship to be setup.

* APPEALS-43706 migration made and yet to be run.

* APPEALS-43706 migrations ran and expected columns and indexes are in table.

* Fix some spec failures unrelated to this branch

* Limit schema diff

* Add a missing tab

* Fix more unrelated failures. Also prevent ACD lever seeds from overwriting spec output

* Fix last unrelated failure.

* APPEALS-43706 linting issues in va_notify_service fixed.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* [APPEALS-43598] Quarterly Notification Job refactoring (#21505)

* Quarterly Notification Job refactoring

* APPEALS-43598 Fix lint issues for QuarterlyNotificationsJob refactor

* APPEALS-43598 Fix db schema.rb file

* APPEALS-43598 Fix schema.rb file

* APPEALS-43598 Refactoring QuarterlyNotificationsJob for readability

* APPEALS-43598 Refactoring QuarterlyNotificationsJob and removing extra methods

* [APPEALS-43598] Update method name

---------

Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-44007: Eliminate Transmission of Notifications to Deceased Veterans (#21481)

* APPEALS-44007: Writing tests to ensure adding the 'failure due to deceased' information is properly set and added to the db

* updates to pr

* pushing changes for tonight

* updating spec file to handle enabling and disabling feature flags

* Update format_message_status

* Lint roll

* fixing conflicts

* Updates to send notification spec

* Fix one of the legacy test cases

* Remove accidental push

* Fix remaining test

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-45235: Remove Temporary PDF Files From tmp Directory After All eFolder Upload Attempts (#21557)

* Cleanup files after uploading to VBMS

* Only delete file if it exists

* Resolve linter issue

* Update specs

* Trigger CodeClimate

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Add appeal alias for notifiable

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications (#21575)

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications

* fixing some errors

* updating factory

* updating tests

* updating tests and factory

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-43596 Adding JobMessageDeletionMiddleware to delete SQS messages for certain jobs

* APPEALS-43596 Adding tests

* APPEALS-43596 Fix codeclimate

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables (#21596)

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables

* pushing changes

* updating tests

* rubocop

* rubocop'n

* deleting repeat constants

* removing file in favor of EVENT_TYPE_FILTERS.json

* removing instances of using VA_NOTIFY_TEMPLATE_NAMES and using EVENT_TYPE_FILTERS instead

* replacing all instances of strings with constants

* fixing bug

* rubocop'n

* rubocop'n

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Clean notification_events after notification report specs finish (#21662)

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-43725: Extract `notify_appellant` Call from `QuaterlyNotificationsJob` to Decrease Runtime (#21643)

* Group notification types as scopes

* Add new job

* Fix typo

* Add back batching

* Batch send messages

* Multithread job queueing

* Reconfigure bulk enqueueing to utilize send_notifications.fifo queue

* Update the comment on QuaterlyNotificationsJob#perform

to adhere to the RDoc standard

* Use constants for template name

* Provide a more descriptive var name

* Remove unused env var

* Fix linting issues

* Prevent error from being thrown early in init job

* Add RDoc comments to appeal_state

* Add rdoc comment to init job

* Add another rdoc comment to the init job

* Use a more specific error class whenever an appeal

cannot be located within the init job

* Add a more specific error to CaseflowJob#enqueue_batch_of_jobs

* Add test for SendNotificationJob.queue_name_suffix

* Update QuarterlyNotificationsJob tests

* Update appeal_state_spec.rb to cover new scopes

* Add spec file for NotificationInitializationJob

* Add CaseflowJob specs

* Add CaseflowJob specs

* Address rubocop issue (by ignoring it)

* Kicking off CodeClimate

* Fix some lint issues

* Freeze constant

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Move spec file to proper location

* APPEALS-43599 (#21696)

* APPEALS-43599 Refactoring SendNotificationJob

* APPEALS-43599 Remove comments

* APPEALS-43599 Suppress code smells from reek

* APPEALS-43599 Suppress code smells from reek

* jcohen/APPEALS-43727 (#21589)

* APPEALS-43727 Branch created. Extracted all the 'when' conditions in the case state…
amybids added a commit that referenced this pull request Aug 13, 2024
* APPEALS-36339 (#21436)

* Updated to remove obsolete levers of ACD Disable Legacy Distributions and ACD Disable Non-priority Distributions

* Fixed redundant linting issue

* Fixed empty line linting issue

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* mbeard/APPEALS-44379 (#21451)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44417 Seeds for Docket Lever Demo (#21534)

Co-authored-by: Christopher Detlef <>

* APPEALS-36345-updated (#21537)

* Refactored exclusion table

* Fixed ordering issue and testing

* mbeard/APPEALS-44379 (#21530)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

* first new commit with new args

* updates methods and test query

* updates age_of_oldest methods params

* cleans up method removes args and updates tests, fixes linting

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44346 Demo Docket Goal Lever Test Seed Data (#21524)

Co-authored-by: Christopher Detlef <>

* Chrisbdetlef/appeals 40705 (#21535)

* Chris backend Work

* APPEALS-44441. Added initial changes for individual seed

* WIP

* APPEALS-44441. Fixed the table css

* APPEALS-44441. Added Custom and Scenario Seed components and jest tests

* APPEALS-44441. Fix ScenarioSeeds jest test

* APPEALS-44441. Fix CustomeSeeds Jest test

* init commit

* fixes linting issues

* capybara test init

* APPEALS-44441. Backend Integration API changes

* APPEALS-44441_1. Matched the constant keys in the backend

* APPEALS-44441_1. Update the param to match the backend and fixed spec

* APPEALS-44441. lint fixes

* APPEALS-44441. linting fixes

* sharsha/APPEALS-44441. fixed the route and tests

* Change route

* Change variables to match front and back end

* CustomSeed Jest test fix

* Fix issues

* Fix rubocop issues

* Use existing method in the controller

---------

Co-authored-by: Christopher Detlef <>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Michael Beard <michael.beard@va.gov>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 (#21566)

* Fixed rspec failures on constants

* APPEALS-45531. Remove dead code

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Updated lever history to handle null unit values from docket levers (#21567)

Co-authored-by: 631966 <amy.detwiler@va.gov>

* Sharsha/appeals 45531_1 (#21573)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 1 (#21609)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

* TEST FOR FIX

* MORE TESTING

* Fixed rspec issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45502. Organize route and fix the controller (#21595)

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Ricky/APPEALS-36345.fixes (#21612)

* Updated lever history to handle null unit values from docket levers

* Updated member view of exclusion table with proper text display and fixed missing css

* Updated unit test and test data to test rendering of exclusionTable

---------

Co-authored-by: 631966 <amy.detwiler@va.gov>

* ricky/APPEALS-44053 (#21587)

* init commit, adds conditional to check for docket_type ama to method, fixes json constants to snakecase

* puts statements testing

* updates seeds for evidence_submission, adds method to hearing_request_docket.rb and dist_concern.rb

* updated appeals dsit

* final fix for PR

* updates spec to reflect changes in hearing_request_docket

* uncomments seeds

* Ricky/appeals 43523 (#21649)

* Added Assignment Queue link to Switch Users test page

* Updated controller to validate role and redirect

* Updated error information

* Updated rspec tests

---------

Co-authored-by: 631068 <rickybmanus@gmail.com>

* APPEALS-45898. Updated the lever_group_order values (#21639)

* APPEALS-45898. Updated the lever_group_order values

* APPEALS-45898. Updated order of the evidence submission priority and non-priority

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-40646 (#21645)

* Init commit

* adds methods and useffect first pass

* fixes isIdle warning

* removes important from scss

* refined handleToggleChange method

* updates font color for h4

* adds keys to the td and fixed proptype for loadAcdExcludeFromAffinity in casedistributionapp

* Chrisbdetlef/appeals 43117.cleanup (#21671)

* APPEALS-43421: Attorney Selection Sticking on Dropdown after Assignment (#21401)

* redo init commit

* updated imp. logic

* attorney widget fix

---------

Co-authored-by: Calvin <Calvin.Costa@va.gov>

* Add ruby CE API Gem

* remove correspondence changes from schema.rb (#21468)

* Revert "Add ruby CE API Gem" (#21479)

This reverts commit c78afe30620716d59d2ac31ad6eed71585d78a98.

* Override SCT Bulk Assign Page task limit (#21465)

* Override SCT Bulk Assign Queue 15 case limit & Adjust SCT attorney assign task action label

* feature/APPEALS-35707-29633-29632 (prodtest) (#21485)

* 🔀 Squash merge AlecK/APPEALS-35707 - Replace `database_cleaner` with `database_cleaner-active_record`

* 🔀 Squash merge jcroteau/APPEALS-29632-fix-deprecation-action-view-base-instances

* 🔀 Squash merge jcroteau/APPEALS-29633-fix-deprecation-warning-active_record-result-to_hash

* feature/APPEALS-44871 Steps for installing node in the Caseflow demo environment  (#21483) (#21484)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Revert "feature/APPEALS-44871 Steps for installing node in the Caseflow demo …" (#21489)

This reverts commit a6262001f9bedabca60598c82bfe1b803f0f16c7.

* Sbashamoni/appeals 44871 node14 demo fixes (#21490) (#21495)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* add error rules to demo builds (#21496) (#21498)

Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>

* APPEALS-43117 Add QA Users for testing

* Fix rspecs

* Fix issues with attorneys and judge teams

* Fix org count

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: youfoundmanesh <maneshreddy.kommidi@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>
Co-authored-by: Christopher Detlef <>

* Minor fixes (#21694)

* Minor fixes

* Fix rspec tests and properly check for judge css id

* Fix lint issue

---------

Co-authored-by: Christopher Detlef <>

* Fix Legacy Case issues (#21747)

Co-authored-by: Christopher Detlef <>

* APPEALS-46037. Fix padding in the lever history table (#21725)

* APPEALS-46037. Fix padding in the lever history table

* APPEALS-46037. Fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Fix Lauren Roth issue (#21813)

* Users with a VACOLS::Staff entry no longer get created with the default name of Lauren Roth

Co-authored-by: Christopher Detlef <>

* ricky/APPEALS-44044 (#21814)

* first pass at legacy_docket method and spec

* second iteration of legacy_docket and spec

* adds method to age_of_oldest methods and updates test scenarios

* Updated testing and expanded method missing logic

* Updated legacy_docket_spec file and tests

* Updated boolean logic, updated rspecs and factories

* Updated rspec tests to include factories

* updates docket_spec line 317 and factory for disable_ama_non_priority_direct_review

---------

Co-authored-by: Michael Beard <michael.beard@va.gov>

* updates ready_priority_nonpriority_appeals to public_send, updates test (#21844)

* APPEALS-36333 first iteration of docket time goal and prior to goal (#21523)

* APPEALS-36333 first iteration of docket time goal and prior to goal

* APPEALS-36333 address pr comments and moved the logic to docket model

* APPEALS-36333 Added specs for docket and hearing request docket models

* refactored code and moved it to distribution scopes

* APPEALS-36333 address pr comments and refactor code

* APPEALS-43996 updated lever name in all the required files to fix spec failures

* APPEALS-44000 revert hearing request docket model changes to keept it in sync with feature

* APPEALS-44000 updated hearing request docket model specs

* APPEALS-44000 fixed jest tests

* APPEALS-44000 fixed broken rspecs

* APPEALS-43996 fix rubocop warnings

* APPEALS-43996 fix push priority job spec failures

* APPEALS-43996 Updated case distribution lever and docker model and refactor specs

* APPEALS-43996 added rake task to update case distribution lever item in db

* APPEALS-43996 update docket model to handle the scenario when the lever being disabled by a user via the UI

* APPEALS-43996 update section title

* APPEALS-43996 revert rake task

* APPEALS-43996 add new factories to case distribution lever and fix spec failures

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks (#21834)

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks

* APPEALS-45191. Refactor and fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* refactor the logic and fix docket spec failures

* changed the call times to 3 times

* APPEALS-36333 fixed the docket time goal to check the existence of the item before using the public send to get the value

---------

Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: 631966 <amy.detwiler@va.gov>

* updated the seeds to align with the work completed

* Updated Toggle Switch behavior when clicked while idle (#21874)

* Csv research (#21892)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

* csv and etc

* CSS for buttons

* jest tests for the reducer and action types

* Jest test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-46057. CleanUP (#21914)

* more jest tests

* Disable scenario seeds

* Lint fixes

* APPEALS-46057. disable all scenario seeds

* APPEALS-46057. Refactor the TestSeed wrapper to be a functional component and fixed jest test

* APPEALS-46057. Jest job in GHA complaining on test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* updates line of test to correctly build lever item (#21918)

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45191. Updated the query to return the date based on the calculation (#21928)

* APPEALS-45191. Updated the query to return the date based on the calculation

* APPEALS-45191. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisharsha/appeals 43962 (#21929)

* Sharsha/appeals-44911_1 (#21784)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisbdetlef/appeals 44910 (#21838)

* Initial

* Add JSON parsing and multiple calls to rake tasks

* Pre-caby tets

* Add capybara tests and add IDs to buttons

---------

Co-authored-by: Christopher Detlef <>

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: cdetlefva <133903625+cdetlefva@users.noreply.github.com>

* APPEALS-43962. Lint fixes (#21932)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Ricky/APPEALS-47293 (#21925)

* First pass implementation of fixing seeding rspecs

* Second pass at fixing errors in rspecs

* Revert updates to test if rspec passes

* Fixed linting issues in test_docket_seeds_controller_spec

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-48292 updated the column to be a string (#21954)

* APPEALS-48292 updated the column to be a string

* APPEALS-48292 added comment to the control_group field in the migration

* APPEALS-48292 added column comment to the schema, changed migration so that it can be rolled back

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false (#21948)

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false

* APPEALS-49004 added spec to check when Start Distribution Prior to Docket Time Goal toggle is on

* APPEALS-49004 fixed lint issues in docket.rb

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query (#21949)

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query

* APPEALS-48898. Renamed the column and update the method

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-49100. getting value from the start_distribution_prior_to_goal (#21968)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-46257 (#21976)

* updates routes and frontend urls to namespace

* removes superfluous <a> tags

* Ensure that legacy appeals are being created (#21981)

* Ensure that legacy appeals are being created

* Remove puts

---------

Co-authored-by: Christopher Detlef <>

* APPEALS-49403. Added buttons Docket Lever Seed (#21989)

* APPEALS-49403. Added buttons Docket Lever Seed

* sharsha/APPEALS-49403. Updated the endpoint URL path

* APPEALS-49403. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-44000 added check to skip priority appeals in docket model (#21992)

* Feature/appeals 36234 masterupgrade (#22003)

* sbashamoni/APPEALS-43724 Node 16 version upgrade changes (#21966) (#21975)

* Update node verstion to 16 in git workflow

* Update node verstion to 16 in nvm and dockerfile for demo

* Update node version in yarn.lock and package.json and .nvmrc file

* Update node's version path to node16 in docker-bin/env.sh

* Update and upgrade to node16 in client

* More updates to yarn.lock and package.json

* Fix tests by Adam Shaw

* Upadate snapshot for ScheduleVeteran.test.js.snap

* Doing some code clean up

* Doiing some more clean up

* Add and remove spaces to match master

* One more space to take care of

* One more space to take care of again

* One more space to take care of again

---------

Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* init master merge branch

---------

Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* Remove AOD trait from non-priority legacy appeal creation (#22013)

Co-authored-by: Christopher Detlef <>

* Sharsha/appeals 49461 (#22018)

* sharsha/APPEALS-49461. initial commit

* sharsha/APPEALS-49461. fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49421 (#22014)

* init commit fixes ama_np_ capybara test to expect user as admin, and first attempt  test_docket_seeds test

* removes previous chane for TASKS_LOADED

* fixes capybara for test seeds controller button ids

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-49403. Updated the buttons label (#22025)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49585 (#22020)

* init commit for non member view input

* fixes css issue for docket-lever-right

* Added a hyphen between value and unit for member only view

* replaces hyphen with comma

* Init commit replaces th with div for 508 compliance (#22036)

* Chrisbdetlef/appeals 47008 1 (#22040)

* Allow judges to see legacy cases and attorneys to be assigned cases

* Remove testing function

* Update spec to reflect new user count in seed file

---------

Co-authored-by: Christopher Detlef <>

* got rid of extraneous file

* got rid of yarn lock orig

* APPEALS-50734. Remove Legacy appeals from the query (#22071)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-46087 fix css table width issues for case distribution lever history table (#22024)

* Feature/appeals 36234.merge master.20240701 (#22075)

* APPEALS-47277 remove Vegas office (#21876)

* APPEALS-47277 remove Vagas office

* Removed Texas ID from other files and updated tests

* Snapshot update

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* hotfix/APPEALS-22403 (#21942)

* add identifier for filenumber or ssn in filenumber search

* linting

* codeclimate linting

* update match call to return boolean

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* APPEALS-46907: Update to Determination of Gen Pop Legacy Cases (#21986)

* Isaiah/merge 46910 (#21983)

* removed BFHINES checks and modified tests

* removed lingering bfhines test

* modified test

* most recent updates on tests for passing status

* removed refs to cavc updates

* Skip flaky test ro_viewhearsched_spec

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* APPEALS-44916: Case Distribution Affinity Calculations (#21899)

* APPEALS-44956: Add AppealAffinity model and database table (#21526)

* add migration for appeal_affinities

* add AppealAffinity model and associations, update migration for new column

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

* add new job, update affinity model validation and after save hook

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

* add return in job if no query results, tests for no query results

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

* remove comment, fix hearing factory, disable some seeds for testing

* add more tests

* test refactor

* update appeals for dist query to add affinity start, add seed file, fix hearing factory, add stat to dist factory

* disable new seed on reset

* update seed file with vet names, add another seed category

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* APPEALS-44959: Modify affinity date checks to use appeal_affinity (#21611)

* swap distribution queries from distribution_task to appeal_affinities

* update seed files to use appeal affinities instead of distribution task

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

* fix user seed, fix date format in distribution task instructions

* fix tests for date format update

* Calvin/APPEALS-44957-rake-affinity (#21577)

* grabbed receipt dates from distributed cases

* refactored for functionality + added method to grab appeals that match

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

* if appeal affinity is nil, it will now be updated

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

* updated start date to receipt date instead of Time.now

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

* APPEALS-46016: Add Affinity Start Date to the Explain Page (#21660)

* add affinity start date to explain page

* add feature test to verify dates display

* update rake task and spec (#21731)

* APPEALS-46325: Add Seeds for AOD Appeals and Update Dates to Match CAVC (#21730)

* add aod hearing cases to ama affinity cases seed

* fix lever spec

* APPEALS-45148: Hook to clear saved affinity date (#21623)

* initial imp. idea

* AC1: check for affinity_start_date on assignment

* AC2/3: update affinity start date  w/ instr.

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

* add case dist lever to new tests (#21776)

* remove unnecessarily included module from job (#21827)

* APPEALS-47211: Improve Performance of Distribution Queries (#21840)

* rework ready_for_distribution scope

* fix non-hearing docket distribution bug

* restart tests

* added null checks for appeal affinity in distribution queries, update tests (#21893)

* add check for appeal being active to distribution and associated slack message (#21902)

* Update users_spec.rb

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* hotfix/APPEALS-45177: TaskTable Default Sorting Fix (#21772)

* Updated the TaskTable component to use the defaultSort property instead of the defaultSortIdx property for queue table since that property is not used anywhere. Added a default sorting hash to the UnassignedCasesPage component and now pass that down to TaskTable. Removed references to defaultSortIdx.

* Added the type column default sort to the AssignedCasesPage widget as well.

* Added a parenthesis for clarity around a boolean. Moved the defaultSortingHash out into a constants file.

---------

Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>

* APPEALS-47106 Caseflow Swagger (#21993)

* Add Rswag and convert existing API documentation (#21778)

* add rswag

* Update Gemfile.lock

* Setup yaml UI

* remove and reroute old swagger files

* update format and servers values

* Update route_docs_controller.rb

* Update cmp_controller.rb

* cmp endpoint yaml

* cmp endpoint to return 501

* CMP endpoint swagger flies

* update swagger files

* adjust server order, add auth token

* cmp parameter name change

* add comments

* Update users_controller.rb

* unit tests and linting

* lint fixes

* Update swagger_helper.rb

* APPEALS-48048 Swagger Updates (#21909)

* update servers to not include a host

* remove host for server

* remove generated swaggers from definitions

* remove internal API endpoints from having generated swagger

* IDT servers fixes

* disable CMP swagger in prod and prodtest

* set authorization correctly

* fix what is required for CMP upload

* fix linting issues, update lint rake task to autocorrect for rubocop, add rubocop make command

* Update decision_reviews.yaml

* Update ama_issues.yaml

* Update vacols_issues.yaml

* Update swagger.yaml

* fix check failures

* Update docs_controller_spec.rb

* fix unit tests

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update rswag_ui.rb

* Update lint.rake

* Update decision_reviews_spec.rb

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update veterans_controller_spec.rb

* feature/APPEALS-43597 RC1.5.1 (#21996)

* APPEALS-36759 Add sms_response_content and sms_response_time notifications table

* APPEALS-37003 First pass at job refactor

* APPEALS-37003 Add comments and update kwargs for va notify service

* APPEALS-37003 Update spec files

* APPEALS-37003 Update spec

* APPEALS-37003 Ensure user in job and create email_enabled method

* APPEALS-37003 Remove question mark

* Limit max retry attempts to 5

* Add ? to boolen return methods

* jcohen/APPEALS-43706 (#21444)

* APPEALS-43706 macros added to each model file for the polymorphic relationship to be setup.

* APPEALS-43706 migration made and yet to be run.

* APPEALS-43706 migrations ran and expected columns and indexes are in table.

* Fix some spec failures unrelated to this branch

* Limit schema diff

* Add a missing tab

* Fix more unrelated failures. Also prevent ACD lever seeds from overwriting spec output

* Fix last unrelated failure.

* APPEALS-43706 linting issues in va_notify_service fixed.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* [APPEALS-43598] Quarterly Notification Job refactoring (#21505)

* Quarterly Notification Job refactoring

* APPEALS-43598 Fix lint issues for QuarterlyNotificationsJob refactor

* APPEALS-43598 Fix db schema.rb file

* APPEALS-43598 Fix schema.rb file

* APPEALS-43598 Refactoring QuarterlyNotificationsJob for readability

* APPEALS-43598 Refactoring QuarterlyNotificationsJob and removing extra methods

* [APPEALS-43598] Update method name

---------

Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-44007: Eliminate Transmission of Notifications to Deceased Veterans (#21481)

* APPEALS-44007: Writing tests to ensure adding the 'failure due to deceased' information is properly set and added to the db

* updates to pr

* pushing changes for tonight

* updating spec file to handle enabling and disabling feature flags

* Update format_message_status

* Lint roll

* fixing conflicts

* Updates to send notification spec

* Fix one of the legacy test cases

* Remove accidental push

* Fix remaining test

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-45235: Remove Temporary PDF Files From tmp Directory After All eFolder Upload Attempts (#21557)

* Cleanup files after uploading to VBMS

* Only delete file if it exists

* Resolve linter issue

* Update specs

* Trigger CodeClimate

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Add appeal alias for notifiable

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications (#21575)

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications

* fixing some errors

* updating factory

* updating tests

* updating tests and factory

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-43596 Adding JobMessageDeletionMiddleware to delete SQS messages for certain jobs

* APPEALS-43596 Adding tests

* APPEALS-43596 Fix codeclimate

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables (#21596)

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables

* pushing changes

* updating tests

* rubocop

* rubocop'n

* deleting repeat constants

* removing file in favor of EVENT_TYPE_FILTERS.json

* removing instances of using VA_NOTIFY_TEMPLATE_NAMES and using EVENT_TYPE_FILTERS instead

* replacing all instances of strings with constants

* fixing bug

* rubocop'n

* rubocop'n

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Clean notification_events after notification report specs finish (#21662)

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-43725: Extract `notify_appellant` Call from `QuaterlyNotificationsJob` to Decrease Runtime (#21643)

* Group notification types as scopes

* Add new job

* Fix typo

* Add back batching

* Batch send messages

* Multithread job queueing

* Reconfigure bulk enqueueing to utilize send_notifications.fifo queue

* Update the comment on QuaterlyNotificationsJob#perform

to adhere to the RDoc standard

* Use constants for template name

* Provide a more descriptive var name

* Remove unused env var

* Fix linting issues

* Prevent error from being thrown early in init job

* Add RDoc comments to appeal_state

* Add rdoc comment to init job

* Add another rdoc comment to the init job

* Use a more specific error class whenever an appeal

cannot be located within the init job

* Add a more specific error to CaseflowJob#enqueue_batch_of_jobs

* Add test for SendNotificationJob.queue_name_suffix

* Update QuarterlyNotificationsJob tests

* Update appeal_state_spec.rb to cover new scopes

* Add spec file for NotificationInitializationJob

* Add CaseflowJob specs

* Add CaseflowJob specs

* Address rubocop issue (by ignoring it)

* Kicking off CodeClimate

* Fix some lint issues

* Freeze constant

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Move spec file to proper location

* APPEALS-43599 (#21696)

* APPEALS-43599 Refactoring SendNotificationJob

* APPEALS-43599 Remove comments

* APPEALS-43599 Suppress code smells from reek

* APPEALS-43599 Suppress code smells from reek

* jcohen/APPEALS-43727 (#21589)

* APPEALS-43727 Branch created. Extracted all the 'when' conditions in the case statement within appellant_notification.rb update_appeal_state method.

* APPEALS-43727 appellant_notification_service is created, logic from crowded method in appellant_notificaion.rb placed in newly created file, allowing redability.

* APPEALS-43727 added logic to appeal_state.rb, appellant_notification.rb updated with less logic, readable code through well named methods.

* APPEALS-43727 commit before merge from teammates work

* APPEALS-43727 removed freeze method on default status hash in appeal_state.rb. removed some rubocop disabling in appellant_notificaion.rb

* APPEALS-43727 extracted more logic from the appellant_notification module and placed it into the appeal_state class. Also got rid of rubocop declarations in app_notif and app_state as well. finally removed feature_toggle calls in appell_notif.

* APPEALS-43727 tests passing, code works

* APPEALS-43727 adding tests to appeal_state_spec to test functionality

* APPEALS-43727 rspec tests in appeal_state.

* APPEALS-43727 tests pass.

* Fixing code climate duplicate code issue

* fixing case statement

* code climate things

* rubocop

* APPEALS-43727 work completed.

* APPEALS-43727 PR comments applied. tests not in a working state.

* APPEALS-43727 PR comments applied. appeal_state_spec in working state.

* APPEALS-43727 PR comments applied. appellant_notification_spec.rb all green.

* Adjust spacing of comments in appeal_state.rb

* Utilize #external_id method over ternary

* Swap or conditional for blank?

* Fix another whitespace gap

* APPEALS-43727 PR comments applied. again after reset.

* APPEALS-43727 PR comments applied. flipped conditionals in appeal_state.rb

* Update app/models/concerns/appeal_concern.rb

* APPEALS-43727 code/test edits

* APPEALS-43727 bulk_task_reasssignment_spec reverted to orginal state, with the exception of an expectation that was on line 98

* APPEALS-43727 lint fix

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-46179 (#21712)

* APPEALS-46179 Create JobExecutionTimes table

* APPEALS-46179 Add comment

* APPEALS-46179 Update schema

* APPEALS-46193 (#21753)

* APPEALS-46193 Add record to JobExecutionTime table when job is performed

* APPEALS-46193 Updating JobExecutionTimes table with an upsert query

* APPEALS-46193 Ignore JobExecutionTimes for certain jobs

* APPEALS-46193 Update ignore_job_execution_time? method

* APPEALS-46193 Adding tests

* Fix lint issues

* Update AWS dependencies

* Rollback gem reduction due to UAT issue

* Alter queue priority

* Forward error in SendNotificationJob

* Allow for notification audit records to remain in ProdTest

* Fix spec

* Fix typo in test fixture's name

* Fix lint infraction related to re-raising exceptions

* Address duplication CC error

* Reenable-privacy-mail-notifications (#21859)

* Add conditional for FOIA and Privacy Act mail

task to receives 'Privacy Act Pending' notifications

* Update spec

* Adjust some specs

* Add missing param

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Remove byebug from spec

* Revert queue tweak

* Remove duplicate method

* APPEALS-47382: Refactor Job Behavior Filtering Boolean Methods (#21898)

* initial commit

* refactoring methods to have constants instead of methods

* adding comments back in

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* APPEALS-48342: Prevent Intentional Retries of SendNotificationJobs in ProdTest from Causing Duplicate Notification Table Entries (#21927)

* initial commit

* rubocop'n

* rubcop'n

* fixing tests

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Resolve missed conflict

* MattT/APPEALS-48514 (#21959)

* Prototype of privacy act fix

* Leave privacy act states intact upon decision mailed

* Remove unused param

* Attempt updating specs to cover new behavior

* Fix attr name typo

* Add missing bang

* Skip reek issue

The issue has been deemed to be minor enough to not warrant having to reinvent everything for now.

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix quarterly specs by add in necessary hearings

* Adjust spacing/ordering of gems (#21978)

* MattT/APPEALS-49085 (#21960)

* Filter out appeals whose hearings have been held from hearing_scheduled scope

* Fix whitespace issues

* Fix failing specs caused by an oversight on my part

* Fix lint issue

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-49212 (#21991)

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add step to NightlySyncsJob to sync hearing dispositions and appeal stateS

* Add comment to new method

* Use constant for disposition type

* Fix typo in accessor

* Add spec for new appeal state action

* Create user in top scope

* Expand nighlty syncs job to check all scheduled hearing disposition types.

No show was left off as we don't have a requirement around it yet.

* Add nightly sync job spec

* Add disp task spec

* Add specs targeting the hearings controller

* Add sync script

* Eager load constants

* Add distinct

* Remove appeal_docketed from being reset

* Add script to adjust ama hearing statuses

* Correct mistype

* Add appeal_type clause

* Fix specs

* Lint fixes

* Flip conditionals in specs

* Fix var name

* Fix var

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Backfill addition to script

* Add AppealState record for newly docketed LegacyAppeals (#21999)

* APPEALS-48966 Adding AppealState record for recently docketed appeals

* APPEALS-48966 Refactor code and add comments

* Delete extraneous files

* Revert to using constants value

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix typo

---------

Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Feature/appeals 43597 release candidate (#22004)

* APPEALS-36759 Add sms_response_content and sms_response_time notifications table

* APPEALS-37003 First pass at job refactor

* APPEALS-37003 Add comments and update kwargs for va notify service

* APPEALS-37003 Update spec files

* APPEALS-37003 Update spec

* APPEALS-37003 Ensure user in job and create email_enabled method

* APPEALS-37003 Remove question mark

* Limit max retry attempts to 5

* Add ? to boolen return methods

* jcohen/APPEALS-43706 (#21444)

* APPEALS-43706 macros added to each model file for the polymorphic relationship to be setup.

* APPEALS-43706 migration made and yet to be run.

* APPEALS-43706 migrations ran and expected columns and indexes are in table.

* Fix some spec failures unrelated to this branch

* Limit schema diff

* Add a missing tab

* Fix more unrelated failures. Also prevent ACD lever seeds from overwriting spec output

* Fix last unrelated failure.

* APPEALS-43706 linting issues in va_notify_service fixed.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* [APPEALS-43598] Quarterly Notification Job refactoring (#21505)

* Quarterly Notification Job refactoring

* APPEALS-43598 Fix lint issues for QuarterlyNotificationsJob refactor

* APPEALS-43598 Fix db schema.rb file

* APPEALS-43598 Fix schema.rb file

* APPEALS-43598 Refactoring QuarterlyNotificationsJob for readability

* APPEALS-43598 Refactoring QuarterlyNotificationsJob and removing extra methods

* [APPEALS-43598] Update method name

---------

Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-44007: Eliminate Transmission of Notifications to Deceased Veterans (#21481)

* APPEALS-44007: Writing tests to ensure adding the 'failure due to deceased' information is properly set and added to the db

* updates to pr

* pushing changes for tonight

* updating spec file to handle enabling and disabling feature flags

* Update format_message_status

* Lint roll

* fixing conflicts

* Updates to send notification spec

* Fix one of the legacy test cases

* Remove accidental push

* Fix remaining test

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-45235: Remove Temporary PDF Files From tmp Directory After All eFolder Upload Attempts (#21557)

* Cleanup files after uploading to VBMS

* Only delete file if it exists

* Resolve linter issue

* Update specs

* Trigger CodeClimate

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Add appeal alias for notifiable

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications (#21575)

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications

* fixing some errors

* updating factory

* updating tests

* updating tests and factory

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-43596 Adding JobMessageDeletionMiddleware to delete SQS messages for certain jobs

* APPEALS-43596 Adding tests

* APPEALS-43596 Fix codeclimate

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables (#21596)

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables

* pushing changes

* updating tests

* rubocop

* rubocop'n

* deleting repeat constants

* removing file in favor of EVENT_TYPE_FILTERS.json

* removing instances of using VA_NOTIFY_TEMPLATE_NAMES and using EVENT_TYPE_FILTERS instead

* replacing all instances of strings with constants

* fixing bug

* rubocop'n

* rubocop'n

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Clean notification_events after notification report specs finish (#21662)

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-43725: Extract `notify_appellant` Call from `QuaterlyNotificationsJob` to Decrease Runtime (#21643)

* Group notification types as scopes

* Add new job

* Fix typo

* Add back batching

* Batch send messages

* Multithread job queueing

* Reconfigure bulk enqueueing to utilize send_notifications.fifo queue

* Update the comment on QuaterlyNotificationsJob#perform

to adhere to the RDoc standard

* Use constants for template name

* Provide a more descriptive var name

* Remove unused env var

* Fix linting issues

* Prevent error from being thrown early in init job

* Add RDoc comments to appeal_state

* Add rdoc comment to init job

* Add another rdoc comment to the init job

* Use a more specific error class whenever an appeal

cannot be located within the init job

* Add a more specific error to CaseflowJob#enqueue_batch_of_jobs

* Add test for SendNotificationJob.queue_name_suffix

* Update QuarterlyNotificationsJob tests

* Update appeal_state_spec.rb to cover new scopes

* Add spec file for NotificationInitializationJob

* Add CaseflowJob specs

* Add CaseflowJob specs

* Address rubocop issue (by ignoring it)

* Kicking off CodeClimate

* Fix some lint issues

* Freeze constant

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Move spec file to proper location

* APPEALS-43599 (#21696)

* APPEALS-43599 Refactoring SendNotificationJob

* APPEALS-43599 Remove comments

* APPEALS-43599 Suppress code smells from reek

* APPEALS-43599 Suppress code smells from reek

* jcohen/APPEALS-43727 (#21589)

* APPEALS-43727 Branch created. Extracted all the 'when' conditions in the case statement within appellant_notification.rb update_appeal_state method.

* APPEALS-43727 appellant_notification_service is created, logic from crowded method in appellant_notificaion.rb placed in newly created file, allowing redability.

* APPEALS-43727 added logic to appeal_state.rb, appellant_notification.rb updated with less logic, readable code through well named methods.

* APPEALS-43727 commit before merge from teammates work

* APPEALS-43727 removed freeze method on default status hash in appeal_state.rb. removed some rubocop disabling in appellant_notificaion.rb

* APPEALS-43727 extracted more logic from the appellant_notification module and placed it into the appeal_state class. Also got rid of rubocop declarations in app_notif and app_state as well. finally removed feature_toggle calls in appell_notif.

* APPEALS-43727 tests passing, code works

* APPEALS-43727 adding tests to appeal_state_spec to test functionality

* APPEALS-43727 rspec tests in appeal_state.

* APPEALS-43727 tests pass.

* Fixing code climate duplicate code issue

* fixing case statement

* code climate things

* rubocop

* APPEALS-43727 work completed.

* APPEALS-43727 PR comments applied. tests not in a working state.

* APPEALS-43727 PR comments applied. appeal_state_spec in working state.

* APPEALS-43727 PR comments applied. appellant_notification_spec.rb all green.

* Adjust spacing of comments in appeal_state.rb

* Utilize #external_id method over ternary

* Swap or conditional for blank?

* Fix another whitespace gap

* APPEALS-43727 PR comments applied. again after reset.

* APPEALS-43727 PR comments applied. flipped conditionals in appeal_state.rb

* Update app/models/concerns/appeal_concern.rb

* APPEALS-43727 code/test edits

* APPEALS-43727 bulk_task_reasssignment_spec reverted to orginal state, with the exception of an expectation that was on line 98

* APPEALS-43727 lint fix

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-46179 (#21712)

* APPEALS-46179 Create JobExecutionTimes table

* APPEALS-46179 Add comment

* APPEALS-46179 Update schema

* APPEALS-46193 (#21753)

* APPEALS-46193 Add record to JobExecutionTime table when job is performed

* APPEALS-46193 Updating JobExecutionTimes table with an upsert query

* APPEALS-46193 Ignore JobExecutionTimes for certain jobs

* APPEALS-46193 Update ignore_job_execution_time? method

* APPEALS-46193 Adding tests

* Fix lint issues

* Update AWS dependencies

* Rollback gem reduction due to UAT issue

* Alter queue priority

* Forward error in SendNotificationJob

* Allow for notification audit records to remain in ProdTest

* Fix spec

* Fix typo in test fixture's name

* Fix lint infraction related to re-raising exceptions

* Address duplication CC error

* Reenable-privacy-mail-notifications (#21859)

* Add conditional for FOIA and Privacy Act mail

task to receives 'Privacy Act Pending' notifications

* Update spec

* Adjust some specs

* Add missing param

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Remove byebug from spec

* Revert queue tweak

* Remove duplicate method

* APPEALS-47382: Refactor Job Behavior Filtering Boolean Methods (#21898)

* initial commit

* refactoring methods to have constants instead of methods

* adding comments back in

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* APPEALS-48342: Prevent Intentional Retries of SendNotificationJobs in ProdTest from Causing Duplicate Notification Table Entries (#21927)

* initial commit

* rubocop'n

* rubcop'n

* fixing tests

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Resolve missed conflict

* MattT/APPEALS-48514 (#21959)

* Prototype of privacy act fix

* Leave privacy act states intact upon decision mailed

* Remove unused param

* Attempt updating specs to cover new behavior

* Fix attr name typo

* Add missing bang

* Skip reek issue

The issue has been deemed to be minor enough to not warrant having to reinvent everything for now.

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix quarterly specs by add in necessary hearings

* Adjust spacing/ordering of gems (#21978)

* MattT/APPEALS-49085 (#21960)

* Filter out appeals whose hearings have been held from hearing_scheduled scope

* Fix whitespace issues

* Fix failing specs caused by an oversight on my part

* Fix lint issue

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-49212 (#21991)

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add step to NightlySyncsJob to sync hearing dispositions and appeal stateS

* Add comment to new method

* Use constant for disposition type

* Fix typo in accessor

* Add spec for new appeal state action

* Create user in top scope

* Expand nighlty syncs job to check all scheduled hearing disposition types.

No show was left off as we don't have a requirement around it yet.

* Add nightly sync job spec

* Add disp task spec

* Add specs targeting the hearings controller

* Add sync script

* Eager load constants

* Add distinct

* Remove appeal_docketed from being reset

* Add script to adjust ama hearing statuses

* Correct mistype

* Add appeal_type clause

* Fix specs

* Lint fixes

* Flip conditionals in specs

* Fix var name

* Fix var

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Backfill addition to script

* Add AppealState record for newly docketed LegacyAppeals (#21999)

* APPEALS-48966 Adding AppealState record for recently docketed appeals

* APPEALS-48966 Refactor code and add comments

* Delete extraneous files

* Revert to using constants value

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix typo

* Fix typo

* Fix seed script

* Fix seed script

* Ensure cleanup

* Change copy for Appeal Docketed status (#22006)

* Change copy for Appeal Docketed status

* Change case

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Use status text value instead of key

---------

Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-44916 seed data update (#22008)

* APPEALS-44956: Add AppealAffinity model and database table (#21526)

* add migration for appeal_affinities

* add AppealAffinity model and associations, update migration for new column

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

* add new job, update affinity model validation and after save hook

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

* add return in job if no query results, tests for no query results

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

* remove comment, fix hearing factory, disable some seeds for testing

* add more tests

* test refactor

* update appeals for dist query to add affinity start, add seed file, fix hearing factory, add stat to dist factory

* disable new seed on reset

* update seed file with vet names, add another seed category

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* APPEALS-44959: Modify affinity date checks to use appeal_affinity (#21611)

* swap distribution queries from distribution_task to appeal_affinities

* update seed files to use appeal affinities instead of distribution task

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

* fix user seed, fix date format in distribution task instructions

* fix tests for date format update

* Calvin/APPEALS-44957-rake-affinity (#21577)

* grabbed receipt dates from distributed cases

* refactored for functionality + added method to grab appeals that match

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

* if appeal affinity is nil, it will now be updated

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

* updated start date to receipt date instead of Time.now

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

* APPEALS-46016: Add Affinity Start Date to the Explain Page (#21660)

* add affinity start date to explain page

* add feature test to verify dates display

* update rake task and spec (#21731)

* APPEALS-46325: Add Seeds for AOD Appeals and Update Dates to Match CAVC (#21730)

* add aod hearing cases to ama affinity cases seed

* fix lever spec

* APPEALS-45148: Hook to clear saved affinity date (#21623)

* initial imp. idea

* AC1: check for affinity_start_date on assignment

* AC2/3: update affinity start date  w/ instr.

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

* add case dist lever to new tests (#21776)

* remove unnecessarily included module from job (#21827)

* APPEALS-47211: Improve Performance of Distribution Queries (#21840)

* rework ready_for_distribution scope

* fix non-hearing docket distribution bug

* restart tests

* added null checks for appeal affinity in distribution queries, update tests (#21893)

* add check for appeal being active to distribution and associated slack message (#21902)

* prelim work on 48033

* refactored code a bit, working on data creation now

* created ama_affinity data

* fixing mispelt variable

* add back line that was removed

* updated users_spec to now pass

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: Calvin <Calvin.Costa@va.gov>

* fixed merge conflict

---------

Co-authored-by: alex-guanipatin <143651918+alex-guanipatin@users.noreply.github.com>
Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>
Co-authored-by: slwallerBAH <161883271+slwallerBAH@users.noreply.github.com>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Matt Roth <roth_matthew@bah.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: Calvin <Calvin.Costa@va.gov>

* Revert "APPEALS-46087 fix css table width issues for case distribution lever history table (#22024)"

This reverts commit 05896d32fa0510bf76101dff689ad05187dc7ccf.

* Add unit testing around push priority distributions with Docket Levers (#22078)

Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-50756: Fix for Appeals Ready to Distribute Query includes dates that are NA (#22090)

* APPEALS-50756 fix appeals ready for distribution csv report to exclude place holder dates for non priority appeals

* fix linting issues of feature branch

* fix rubocop offenses from feature branch

* APPEALS-50756 updated login in ama rows method

* APPEALS-50756 fix lint issues

* APPEALS-50756 The Appeals Ready to Distribute Query includes dates that are NA (#22183)

* APPEALS-50756 fix appeals ready for distribution csv report to exclude place holder dates for non priority appeals

* fix linting issues of feature branch

* fix rubocop offenses from feature branch

* APPEALS-50756 updated login in ama rows method

* APPEALS-50756 fix lint issues

* APPEALS-50756 fix argument error

* APPEALS-49839. improve the test coverage in test docket seeds controller (#22060)

* APPEALS-49839. improve the test coverage in test docket seeds controller

* APPEALS-49839. Improve legacy_tasks_controller test coverage

* APPEALS-49839. Lint fixes

* APPEALS-49839. seedReducer test coverage

* APPEALS-49839. Improve CustomSeed test coverage

* APPEALS-49839. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-52535. Fix PG::UniqueViolation: ERROR in the seed (#22296)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* reverted the invalid role error change

* reverted the invalid role out of the legacy tasks controller too

* took out commented out code

* removed scenario seeds

* lint fix and taking out constants that were already defined

* fixed RSpec test and added docket back in for appeals_ready_for_distribution

* added docket back

---------

Co-authored-by: Blake Manus <33578594+Blake-Manus@users.noreply.github.com>
Co-authored-by: sbashamoni <SampathKumar.Bashamoni@va.gov>
Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: Michael Beard <131783726+mbeardy@users.noreply.github.com>
Co-authored-by: cdetlefva <133903625+cdetlefva@users.noreply.github.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Michael Beard <michael.beard@va.gov>
Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
Co-authored-by: 631068 <rickybmanus@gmail.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: youfoundmanesh <maneshreddy.kommidi@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>
Co-authored-by: kristeja <112115264+kristeja@users.noreply.github.com>
Co-authored-by: Craig Reese <Reese_Craig@bah.com>
Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>
Co-authored-by: Matt Roth <roth_matthew@bah.com>
Co-authored-by: alex-guanipatin <143651918+alex-guanipatin@users.noreply.github.com>
Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
…
amybids added a commit that referenced this pull request Aug 19, 2024
* APPEALS-36339 (#21436)

* Updated to remove obsolete levers of ACD Disable Legacy Distributions and ACD Disable Non-priority Distributions

* Fixed redundant linting issue

* Fixed empty line linting issue

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* mbeard/APPEALS-44379 (#21451)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44417 Seeds for Docket Lever Demo (#21534)

Co-authored-by: Christopher Detlef <>

* APPEALS-36345-updated (#21537)

* Refactored exclusion table

* Fixed ordering issue and testing

* mbeard/APPEALS-44379 (#21530)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

* first new commit with new args

* updates methods and test query

* updates age_of_oldest methods params

* cleans up method removes args and updates tests, fixes linting

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44346 Demo Docket Goal Lever Test Seed Data (#21524)

Co-authored-by: Christopher Detlef <>

* Chrisbdetlef/appeals 40705 (#21535)

* Chris backend Work

* APPEALS-44441. Added initial changes for individual seed

* WIP

* APPEALS-44441. Fixed the table css

* APPEALS-44441. Added Custom and Scenario Seed components and jest tests

* APPEALS-44441. Fix ScenarioSeeds jest test

* APPEALS-44441. Fix CustomeSeeds Jest test

* init commit

* fixes linting issues

* capybara test init

* APPEALS-44441. Backend Integration API changes

* APPEALS-44441_1. Matched the constant keys in the backend

* APPEALS-44441_1. Update the param to match the backend and fixed spec

* APPEALS-44441. lint fixes

* APPEALS-44441. linting fixes

* sharsha/APPEALS-44441. fixed the route and tests

* Change route

* Change variables to match front and back end

* CustomSeed Jest test fix

* Fix issues

* Fix rubocop issues

* Use existing method in the controller

---------

Co-authored-by: Christopher Detlef <>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Michael Beard <michael.beard@va.gov>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 (#21566)

* Fixed rspec failures on constants

* APPEALS-45531. Remove dead code

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Updated lever history to handle null unit values from docket levers (#21567)

Co-authored-by: 631966 <amy.detwiler@va.gov>

* Sharsha/appeals 45531_1 (#21573)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 1 (#21609)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

* TEST FOR FIX

* MORE TESTING

* Fixed rspec issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45502. Organize route and fix the controller (#21595)

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Ricky/APPEALS-36345.fixes (#21612)

* Updated lever history to handle null unit values from docket levers

* Updated member view of exclusion table with proper text display and fixed missing css

* Updated unit test and test data to test rendering of exclusionTable

---------

Co-authored-by: 631966 <amy.detwiler@va.gov>

* ricky/APPEALS-44053 (#21587)

* init commit, adds conditional to check for docket_type ama to method, fixes json constants to snakecase

* puts statements testing

* updates seeds for evidence_submission, adds method to hearing_request_docket.rb and dist_concern.rb

* updated appeals dsit

* final fix for PR

* updates spec to reflect changes in hearing_request_docket

* uncomments seeds

* Ricky/appeals 43523 (#21649)

* Added Assignment Queue link to Switch Users test page

* Updated controller to validate role and redirect

* Updated error information

* Updated rspec tests

---------

Co-authored-by: 631068 <rickybmanus@gmail.com>

* APPEALS-45898. Updated the lever_group_order values (#21639)

* APPEALS-45898. Updated the lever_group_order values

* APPEALS-45898. Updated order of the evidence submission priority and non-priority

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-40646 (#21645)

* Init commit

* adds methods and useffect first pass

* fixes isIdle warning

* removes important from scss

* refined handleToggleChange method

* updates font color for h4

* adds keys to the td and fixed proptype for loadAcdExcludeFromAffinity in casedistributionapp

* Chrisbdetlef/appeals 43117.cleanup (#21671)

* APPEALS-43421: Attorney Selection Sticking on Dropdown after Assignment (#21401)

* redo init commit

* updated imp. logic

* attorney widget fix

---------

Co-authored-by: Calvin <Calvin.Costa@va.gov>

* Add ruby CE API Gem

* remove correspondence changes from schema.rb (#21468)

* Revert "Add ruby CE API Gem" (#21479)

This reverts commit c78afe30620716d59d2ac31ad6eed71585d78a98.

* Override SCT Bulk Assign Page task limit (#21465)

* Override SCT Bulk Assign Queue 15 case limit & Adjust SCT attorney assign task action label

* feature/APPEALS-35707-29633-29632 (prodtest) (#21485)

* 🔀 Squash merge AlecK/APPEALS-35707 - Replace `database_cleaner` with `database_cleaner-active_record`

* 🔀 Squash merge jcroteau/APPEALS-29632-fix-deprecation-action-view-base-instances

* 🔀 Squash merge jcroteau/APPEALS-29633-fix-deprecation-warning-active_record-result-to_hash

* feature/APPEALS-44871 Steps for installing node in the Caseflow demo environment  (#21483) (#21484)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Revert "feature/APPEALS-44871 Steps for installing node in the Caseflow demo …" (#21489)

This reverts commit a6262001f9bedabca60598c82bfe1b803f0f16c7.

* Sbashamoni/appeals 44871 node14 demo fixes (#21490) (#21495)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* add error rules to demo builds (#21496) (#21498)

Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>

* APPEALS-43117 Add QA Users for testing

* Fix rspecs

* Fix issues with attorneys and judge teams

* Fix org count

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: youfoundmanesh <maneshreddy.kommidi@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>
Co-authored-by: Christopher Detlef <>

* Minor fixes (#21694)

* Minor fixes

* Fix rspec tests and properly check for judge css id

* Fix lint issue

---------

Co-authored-by: Christopher Detlef <>

* Fix Legacy Case issues (#21747)

Co-authored-by: Christopher Detlef <>

* APPEALS-46037. Fix padding in the lever history table (#21725)

* APPEALS-46037. Fix padding in the lever history table

* APPEALS-46037. Fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Fix Lauren Roth issue (#21813)

* Users with a VACOLS::Staff entry no longer get created with the default name of Lauren Roth

Co-authored-by: Christopher Detlef <>

* ricky/APPEALS-44044 (#21814)

* first pass at legacy_docket method and spec

* second iteration of legacy_docket and spec

* adds method to age_of_oldest methods and updates test scenarios

* Updated testing and expanded method missing logic

* Updated legacy_docket_spec file and tests

* Updated boolean logic, updated rspecs and factories

* Updated rspec tests to include factories

* updates docket_spec line 317 and factory for disable_ama_non_priority_direct_review

---------

Co-authored-by: Michael Beard <michael.beard@va.gov>

* updates ready_priority_nonpriority_appeals to public_send, updates test (#21844)

* APPEALS-36333 first iteration of docket time goal and prior to goal (#21523)

* APPEALS-36333 first iteration of docket time goal and prior to goal

* APPEALS-36333 address pr comments and moved the logic to docket model

* APPEALS-36333 Added specs for docket and hearing request docket models

* refactored code and moved it to distribution scopes

* APPEALS-36333 address pr comments and refactor code

* APPEALS-43996 updated lever name in all the required files to fix spec failures

* APPEALS-44000 revert hearing request docket model changes to keept it in sync with feature

* APPEALS-44000 updated hearing request docket model specs

* APPEALS-44000 fixed jest tests

* APPEALS-44000 fixed broken rspecs

* APPEALS-43996 fix rubocop warnings

* APPEALS-43996 fix push priority job spec failures

* APPEALS-43996 Updated case distribution lever and docker model and refactor specs

* APPEALS-43996 added rake task to update case distribution lever item in db

* APPEALS-43996 update docket model to handle the scenario when the lever being disabled by a user via the UI

* APPEALS-43996 update section title

* APPEALS-43996 revert rake task

* APPEALS-43996 add new factories to case distribution lever and fix spec failures

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks (#21834)

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks

* APPEALS-45191. Refactor and fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* refactor the logic and fix docket spec failures

* changed the call times to 3 times

* APPEALS-36333 fixed the docket time goal to check the existence of the item before using the public send to get the value

---------

Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: 631966 <amy.detwiler@va.gov>

* updated the seeds to align with the work completed

* Updated Toggle Switch behavior when clicked while idle (#21874)

* Csv research (#21892)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

* csv and etc

* CSS for buttons

* jest tests for the reducer and action types

* Jest test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-46057. CleanUP (#21914)

* more jest tests

* Disable scenario seeds

* Lint fixes

* APPEALS-46057. disable all scenario seeds

* APPEALS-46057. Refactor the TestSeed wrapper to be a functional component and fixed jest test

* APPEALS-46057. Jest job in GHA complaining on test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* updates line of test to correctly build lever item (#21918)

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45191. Updated the query to return the date based on the calculation (#21928)

* APPEALS-45191. Updated the query to return the date based on the calculation

* APPEALS-45191. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisharsha/appeals 43962 (#21929)

* Sharsha/appeals-44911_1 (#21784)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisbdetlef/appeals 44910 (#21838)

* Initial

* Add JSON parsing and multiple calls to rake tasks

* Pre-caby tets

* Add capybara tests and add IDs to buttons

---------

Co-authored-by: Christopher Detlef <>

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: cdetlefva <133903625+cdetlefva@users.noreply.github.com>

* APPEALS-43962. Lint fixes (#21932)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Ricky/APPEALS-47293 (#21925)

* First pass implementation of fixing seeding rspecs

* Second pass at fixing errors in rspecs

* Revert updates to test if rspec passes

* Fixed linting issues in test_docket_seeds_controller_spec

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-48292 updated the column to be a string (#21954)

* APPEALS-48292 updated the column to be a string

* APPEALS-48292 added comment to the control_group field in the migration

* APPEALS-48292 added column comment to the schema, changed migration so that it can be rolled back

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false (#21948)

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false

* APPEALS-49004 added spec to check when Start Distribution Prior to Docket Time Goal toggle is on

* APPEALS-49004 fixed lint issues in docket.rb

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query (#21949)

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query

* APPEALS-48898. Renamed the column and update the method

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-49100. getting value from the start_distribution_prior_to_goal (#21968)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-46257 (#21976)

* updates routes and frontend urls to namespace

* removes superfluous <a> tags

* Ensure that legacy appeals are being created (#21981)

* Ensure that legacy appeals are being created

* Remove puts

---------

Co-authored-by: Christopher Detlef <>

* APPEALS-49403. Added buttons Docket Lever Seed (#21989)

* APPEALS-49403. Added buttons Docket Lever Seed

* sharsha/APPEALS-49403. Updated the endpoint URL path

* APPEALS-49403. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-44000 added check to skip priority appeals in docket model (#21992)

* Feature/appeals 36234 masterupgrade (#22003)

* sbashamoni/APPEALS-43724 Node 16 version upgrade changes (#21966) (#21975)

* Update node verstion to 16 in git workflow

* Update node verstion to 16 in nvm and dockerfile for demo

* Update node version in yarn.lock and package.json and .nvmrc file

* Update node's version path to node16 in docker-bin/env.sh

* Update and upgrade to node16 in client

* More updates to yarn.lock and package.json

* Fix tests by Adam Shaw

* Upadate snapshot for ScheduleVeteran.test.js.snap

* Doing some code clean up

* Doiing some more clean up

* Add and remove spaces to match master

* One more space to take care of

* One more space to take care of again

* One more space to take care of again

---------

Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* init master merge branch

---------

Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* Remove AOD trait from non-priority legacy appeal creation (#22013)

Co-authored-by: Christopher Detlef <>

* Sharsha/appeals 49461 (#22018)

* sharsha/APPEALS-49461. initial commit

* sharsha/APPEALS-49461. fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49421 (#22014)

* init commit fixes ama_np_ capybara test to expect user as admin, and first attempt  test_docket_seeds test

* removes previous chane for TASKS_LOADED

* fixes capybara for test seeds controller button ids

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-49403. Updated the buttons label (#22025)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49585 (#22020)

* init commit for non member view input

* fixes css issue for docket-lever-right

* Added a hyphen between value and unit for member only view

* replaces hyphen with comma

* Init commit replaces th with div for 508 compliance (#22036)

* Chrisbdetlef/appeals 47008 1 (#22040)

* Allow judges to see legacy cases and attorneys to be assigned cases

* Remove testing function

* Update spec to reflect new user count in seed file

---------

Co-authored-by: Christopher Detlef <>

* got rid of extraneous file

* got rid of yarn lock orig

* APPEALS-50734. Remove Legacy appeals from the query (#22071)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-46087 fix css table width issues for case distribution lever history table (#22024)

* Feature/appeals 36234.merge master.20240701 (#22075)

* APPEALS-47277 remove Vegas office (#21876)

* APPEALS-47277 remove Vagas office

* Removed Texas ID from other files and updated tests

* Snapshot update

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* hotfix/APPEALS-22403 (#21942)

* add identifier for filenumber or ssn in filenumber search

* linting

* codeclimate linting

* update match call to return boolean

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* APPEALS-46907: Update to Determination of Gen Pop Legacy Cases (#21986)

* Isaiah/merge 46910 (#21983)

* removed BFHINES checks and modified tests

* removed lingering bfhines test

* modified test

* most recent updates on tests for passing status

* removed refs to cavc updates

* Skip flaky test ro_viewhearsched_spec

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* APPEALS-44916: Case Distribution Affinity Calculations (#21899)

* APPEALS-44956: Add AppealAffinity model and database table (#21526)

* add migration for appeal_affinities

* add AppealAffinity model and associations, update migration for new column

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

* add new job, update affinity model validation and after save hook

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

* add return in job if no query results, tests for no query results

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

* remove comment, fix hearing factory, disable some seeds for testing

* add more tests

* test refactor

* update appeals for dist query to add affinity start, add seed file, fix hearing factory, add stat to dist factory

* disable new seed on reset

* update seed file with vet names, add another seed category

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* APPEALS-44959: Modify affinity date checks to use appeal_affinity (#21611)

* swap distribution queries from distribution_task to appeal_affinities

* update seed files to use appeal affinities instead of distribution task

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

* fix user seed, fix date format in distribution task instructions

* fix tests for date format update

* Calvin/APPEALS-44957-rake-affinity (#21577)

* grabbed receipt dates from distributed cases

* refactored for functionality + added method to grab appeals that match

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

* if appeal affinity is nil, it will now be updated

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

* updated start date to receipt date instead of Time.now

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

* APPEALS-46016: Add Affinity Start Date to the Explain Page (#21660)

* add affinity start date to explain page

* add feature test to verify dates display

* update rake task and spec (#21731)

* APPEALS-46325: Add Seeds for AOD Appeals and Update Dates to Match CAVC (#21730)

* add aod hearing cases to ama affinity cases seed

* fix lever spec

* APPEALS-45148: Hook to clear saved affinity date (#21623)

* initial imp. idea

* AC1: check for affinity_start_date on assignment

* AC2/3: update affinity start date  w/ instr.

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

* add case dist lever to new tests (#21776)

* remove unnecessarily included module from job (#21827)

* APPEALS-47211: Improve Performance of Distribution Queries (#21840)

* rework ready_for_distribution scope

* fix non-hearing docket distribution bug

* restart tests

* added null checks for appeal affinity in distribution queries, update tests (#21893)

* add check for appeal being active to distribution and associated slack message (#21902)

* Update users_spec.rb

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* hotfix/APPEALS-45177: TaskTable Default Sorting Fix (#21772)

* Updated the TaskTable component to use the defaultSort property instead of the defaultSortIdx property for queue table since that property is not used anywhere. Added a default sorting hash to the UnassignedCasesPage component and now pass that down to TaskTable. Removed references to defaultSortIdx.

* Added the type column default sort to the AssignedCasesPage widget as well.

* Added a parenthesis for clarity around a boolean. Moved the defaultSortingHash out into a constants file.

---------

Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>

* APPEALS-47106 Caseflow Swagger (#21993)

* Add Rswag and convert existing API documentation (#21778)

* add rswag

* Update Gemfile.lock

* Setup yaml UI

* remove and reroute old swagger files

* update format and servers values

* Update route_docs_controller.rb

* Update cmp_controller.rb

* cmp endpoint yaml

* cmp endpoint to return 501

* CMP endpoint swagger flies

* update swagger files

* adjust server order, add auth token

* cmp parameter name change

* add comments

* Update users_controller.rb

* unit tests and linting

* lint fixes

* Update swagger_helper.rb

* APPEALS-48048 Swagger Updates (#21909)

* update servers to not include a host

* remove host for server

* remove generated swaggers from definitions

* remove internal API endpoints from having generated swagger

* IDT servers fixes

* disable CMP swagger in prod and prodtest

* set authorization correctly

* fix what is required for CMP upload

* fix linting issues, update lint rake task to autocorrect for rubocop, add rubocop make command

* Update decision_reviews.yaml

* Update ama_issues.yaml

* Update vacols_issues.yaml

* Update swagger.yaml

* fix check failures

* Update docs_controller_spec.rb

* fix unit tests

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update rswag_ui.rb

* Update lint.rake

* Update decision_reviews_spec.rb

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update veterans_controller_spec.rb

* feature/APPEALS-43597 RC1.5.1 (#21996)

* APPEALS-36759 Add sms_response_content and sms_response_time notifications table

* APPEALS-37003 First pass at job refactor

* APPEALS-37003 Add comments and update kwargs for va notify service

* APPEALS-37003 Update spec files

* APPEALS-37003 Update spec

* APPEALS-37003 Ensure user in job and create email_enabled method

* APPEALS-37003 Remove question mark

* Limit max retry attempts to 5

* Add ? to boolen return methods

* jcohen/APPEALS-43706 (#21444)

* APPEALS-43706 macros added to each model file for the polymorphic relationship to be setup.

* APPEALS-43706 migration made and yet to be run.

* APPEALS-43706 migrations ran and expected columns and indexes are in table.

* Fix some spec failures unrelated to this branch

* Limit schema diff

* Add a missing tab

* Fix more unrelated failures. Also prevent ACD lever seeds from overwriting spec output

* Fix last unrelated failure.

* APPEALS-43706 linting issues in va_notify_service fixed.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* [APPEALS-43598] Quarterly Notification Job refactoring (#21505)

* Quarterly Notification Job refactoring

* APPEALS-43598 Fix lint issues for QuarterlyNotificationsJob refactor

* APPEALS-43598 Fix db schema.rb file

* APPEALS-43598 Fix schema.rb file

* APPEALS-43598 Refactoring QuarterlyNotificationsJob for readability

* APPEALS-43598 Refactoring QuarterlyNotificationsJob and removing extra methods

* [APPEALS-43598] Update method name

---------

Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-44007: Eliminate Transmission of Notifications to Deceased Veterans (#21481)

* APPEALS-44007: Writing tests to ensure adding the 'failure due to deceased' information is properly set and added to the db

* updates to pr

* pushing changes for tonight

* updating spec file to handle enabling and disabling feature flags

* Update format_message_status

* Lint roll

* fixing conflicts

* Updates to send notification spec

* Fix one of the legacy test cases

* Remove accidental push

* Fix remaining test

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-45235: Remove Temporary PDF Files From tmp Directory After All eFolder Upload Attempts (#21557)

* Cleanup files after uploading to VBMS

* Only delete file if it exists

* Resolve linter issue

* Update specs

* Trigger CodeClimate

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Add appeal alias for notifiable

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications (#21575)

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications

* fixing some errors

* updating factory

* updating tests

* updating tests and factory

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-43596 Adding JobMessageDeletionMiddleware to delete SQS messages for certain jobs

* APPEALS-43596 Adding tests

* APPEALS-43596 Fix codeclimate

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables (#21596)

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables

* pushing changes

* updating tests

* rubocop

* rubocop'n

* deleting repeat constants

* removing file in favor of EVENT_TYPE_FILTERS.json

* removing instances of using VA_NOTIFY_TEMPLATE_NAMES and using EVENT_TYPE_FILTERS instead

* replacing all instances of strings with constants

* fixing bug

* rubocop'n

* rubocop'n

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Clean notification_events after notification report specs finish (#21662)

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-43725: Extract `notify_appellant` Call from `QuaterlyNotificationsJob` to Decrease Runtime (#21643)

* Group notification types as scopes

* Add new job

* Fix typo

* Add back batching

* Batch send messages

* Multithread job queueing

* Reconfigure bulk enqueueing to utilize send_notifications.fifo queue

* Update the comment on QuaterlyNotificationsJob#perform

to adhere to the RDoc standard

* Use constants for template name

* Provide a more descriptive var name

* Remove unused env var

* Fix linting issues

* Prevent error from being thrown early in init job

* Add RDoc comments to appeal_state

* Add rdoc comment to init job

* Add another rdoc comment to the init job

* Use a more specific error class whenever an appeal

cannot be located within the init job

* Add a more specific error to CaseflowJob#enqueue_batch_of_jobs

* Add test for SendNotificationJob.queue_name_suffix

* Update QuarterlyNotificationsJob tests

* Update appeal_state_spec.rb to cover new scopes

* Add spec file for NotificationInitializationJob

* Add CaseflowJob specs

* Add CaseflowJob specs

* Address rubocop issue (by ignoring it)

* Kicking off CodeClimate

* Fix some lint issues

* Freeze constant

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Move spec file to proper location

* APPEALS-43599 (#21696)

* APPEALS-43599 Refactoring SendNotificationJob

* APPEALS-43599 Remove comments

* APPEALS-43599 Suppress code smells from reek

* APPEALS-43599 Suppress code smells from reek

* jcohen/APPEALS-43727 (#21589)

* APPEALS-43727 Branch created. Extracted all the 'when' conditions in the case statement within appellant_notification.rb update_appeal_state method.

* APPEALS-43727 appellant_notification_service is created, logic from crowded method in appellant_notificaion.rb placed in newly created file, allowing redability.

* APPEALS-43727 added logic to appeal_state.rb, appellant_notification.rb updated with less logic, readable code through well named methods.

* APPEALS-43727 commit before merge from teammates work

* APPEALS-43727 removed freeze method on default status hash in appeal_state.rb. removed some rubocop disabling in appellant_notificaion.rb

* APPEALS-43727 extracted more logic from the appellant_notification module and placed it into the appeal_state class. Also got rid of rubocop declarations in app_notif and app_state as well. finally removed feature_toggle calls in appell_notif.

* APPEALS-43727 tests passing, code works

* APPEALS-43727 adding tests to appeal_state_spec to test functionality

* APPEALS-43727 rspec tests in appeal_state.

* APPEALS-43727 tests pass.

* Fixing code climate duplicate code issue

* fixing case statement

* code climate things

* rubocop

* APPEALS-43727 work completed.

* APPEALS-43727 PR comments applied. tests not in a working state.

* APPEALS-43727 PR comments applied. appeal_state_spec in working state.

* APPEALS-43727 PR comments applied. appellant_notification_spec.rb all green.

* Adjust spacing of comments in appeal_state.rb

* Utilize #external_id method over ternary

* Swap or conditional for blank?

* Fix another whitespace gap

* APPEALS-43727 PR comments applied. again after reset.

* APPEALS-43727 PR comments applied. flipped conditionals in appeal_state.rb

* Update app/models/concerns/appeal_concern.rb

* APPEALS-43727 code/test edits

* APPEALS-43727 bulk_task_reasssignment_spec reverted to orginal state, with the exception of an expectation that was on line 98

* APPEALS-43727 lint fix

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-46179 (#21712)

* APPEALS-46179 Create JobExecutionTimes table

* APPEALS-46179 Add comment

* APPEALS-46179 Update schema

* APPEALS-46193 (#21753)

* APPEALS-46193 Add record to JobExecutionTime table when job is performed

* APPEALS-46193 Updating JobExecutionTimes table with an upsert query

* APPEALS-46193 Ignore JobExecutionTimes for certain jobs

* APPEALS-46193 Update ignore_job_execution_time? method

* APPEALS-46193 Adding tests

* Fix lint issues

* Update AWS dependencies

* Rollback gem reduction due to UAT issue

* Alter queue priority

* Forward error in SendNotificationJob

* Allow for notification audit records to remain in ProdTest

* Fix spec

* Fix typo in test fixture's name

* Fix lint infraction related to re-raising exceptions

* Address duplication CC error

* Reenable-privacy-mail-notifications (#21859)

* Add conditional for FOIA and Privacy Act mail

task to receives 'Privacy Act Pending' notifications

* Update spec

* Adjust some specs

* Add missing param

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Remove byebug from spec

* Revert queue tweak

* Remove duplicate method

* APPEALS-47382: Refactor Job Behavior Filtering Boolean Methods (#21898)

* initial commit

* refactoring methods to have constants instead of methods

* adding comments back in

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* APPEALS-48342: Prevent Intentional Retries of SendNotificationJobs in ProdTest from Causing Duplicate Notification Table Entries (#21927)

* initial commit

* rubocop'n

* rubcop'n

* fixing tests

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Resolve missed conflict

* MattT/APPEALS-48514 (#21959)

* Prototype of privacy act fix

* Leave privacy act states intact upon decision mailed

* Remove unused param

* Attempt updating specs to cover new behavior

* Fix attr name typo

* Add missing bang

* Skip reek issue

The issue has been deemed to be minor enough to not warrant having to reinvent everything for now.

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix quarterly specs by add in necessary hearings

* Adjust spacing/ordering of gems (#21978)

* MattT/APPEALS-49085 (#21960)

* Filter out appeals whose hearings have been held from hearing_scheduled scope

* Fix whitespace issues

* Fix failing specs caused by an oversight on my part

* Fix lint issue

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-49212 (#21991)

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add step to NightlySyncsJob to sync hearing dispositions and appeal stateS

* Add comment to new method

* Use constant for disposition type

* Fix typo in accessor

* Add spec for new appeal state action

* Create user in top scope

* Expand nighlty syncs job to check all scheduled hearing disposition types.

No show was left off as we don't have a requirement around it yet.

* Add nightly sync job spec

* Add disp task spec

* Add specs targeting the hearings controller

* Add sync script

* Eager load constants

* Add distinct

* Remove appeal_docketed from being reset

* Add script to adjust ama hearing statuses

* Correct mistype

* Add appeal_type clause

* Fix specs

* Lint fixes

* Flip conditionals in specs

* Fix var name

* Fix var

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Backfill addition to script

* Add AppealState record for newly docketed LegacyAppeals (#21999)

* APPEALS-48966 Adding AppealState record for recently docketed appeals

* APPEALS-48966 Refactor code and add comments

* Delete extraneous files

* Revert to using constants value

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix typo

---------

Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Feature/appeals 43597 release candidate (#22004)

* APPEALS-36759 Add sms_response_content and sms_response_time notifications table

* APPEALS-37003 First pass at job refactor

* APPEALS-37003 Add comments and update kwargs for va notify service

* APPEALS-37003 Update spec files

* APPEALS-37003 Update spec

* APPEALS-37003 Ensure user in job and create email_enabled method

* APPEALS-37003 Remove question mark

* Limit max retry attempts to 5

* Add ? to boolen return methods

* jcohen/APPEALS-43706 (#21444)

* APPEALS-43706 macros added to each model file for the polymorphic relationship to be setup.

* APPEALS-43706 migration made and yet to be run.

* APPEALS-43706 migrations ran and expected columns and indexes are in table.

* Fix some spec failures unrelated to this branch

* Limit schema diff

* Add a missing tab

* Fix more unrelated failures. Also prevent ACD lever seeds from overwriting spec output

* Fix last unrelated failure.

* APPEALS-43706 linting issues in va_notify_service fixed.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* [APPEALS-43598] Quarterly Notification Job refactoring (#21505)

* Quarterly Notification Job refactoring

* APPEALS-43598 Fix lint issues for QuarterlyNotificationsJob refactor

* APPEALS-43598 Fix db schema.rb file

* APPEALS-43598 Fix schema.rb file

* APPEALS-43598 Refactoring QuarterlyNotificationsJob for readability

* APPEALS-43598 Refactoring QuarterlyNotificationsJob and removing extra methods

* [APPEALS-43598] Update method name

---------

Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-44007: Eliminate Transmission of Notifications to Deceased Veterans (#21481)

* APPEALS-44007: Writing tests to ensure adding the 'failure due to deceased' information is properly set and added to the db

* updates to pr

* pushing changes for tonight

* updating spec file to handle enabling and disabling feature flags

* Update format_message_status

* Lint roll

* fixing conflicts

* Updates to send notification spec

* Fix one of the legacy test cases

* Remove accidental push

* Fix remaining test

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-45235: Remove Temporary PDF Files From tmp Directory After All eFolder Upload Attempts (#21557)

* Cleanup files after uploading to VBMS

* Only delete file if it exists

* Resolve linter issue

* Update specs

* Trigger CodeClimate

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Add appeal alias for notifiable

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications (#21575)

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications

* fixing some errors

* updating factory

* updating tests

* updating tests and factory

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-43596 Adding JobMessageDeletionMiddleware to delete SQS messages for certain jobs

* APPEALS-43596 Adding tests

* APPEALS-43596 Fix codeclimate

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables (#21596)

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables

* pushing changes

* updating tests

* rubocop

* rubocop'n

* deleting repeat constants

* removing file in favor of EVENT_TYPE_FILTERS.json

* removing instances of using VA_NOTIFY_TEMPLATE_NAMES and using EVENT_TYPE_FILTERS instead

* replacing all instances of strings with constants

* fixing bug

* rubocop'n

* rubocop'n

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Clean notification_events after notification report specs finish (#21662)

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-43725: Extract `notify_appellant` Call from `QuaterlyNotificationsJob` to Decrease Runtime (#21643)

* Group notification types as scopes

* Add new job

* Fix typo

* Add back batching

* Batch send messages

* Multithread job queueing

* Reconfigure bulk enqueueing to utilize send_notifications.fifo queue

* Update the comment on QuaterlyNotificationsJob#perform

to adhere to the RDoc standard

* Use constants for template name

* Provide a more descriptive var name

* Remove unused env var

* Fix linting issues

* Prevent error from being thrown early in init job

* Add RDoc comments to appeal_state

* Add rdoc comment to init job

* Add another rdoc comment to the init job

* Use a more specific error class whenever an appeal

cannot be located within the init job

* Add a more specific error to CaseflowJob#enqueue_batch_of_jobs

* Add test for SendNotificationJob.queue_name_suffix

* Update QuarterlyNotificationsJob tests

* Update appeal_state_spec.rb to cover new scopes

* Add spec file for NotificationInitializationJob

* Add CaseflowJob specs

* Add CaseflowJob specs

* Address rubocop issue (by ignoring it)

* Kicking off CodeClimate

* Fix some lint issues

* Freeze constant

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Move spec file to proper location

* APPEALS-43599 (#21696)

* APPEALS-43599 Refactoring SendNotificationJob

* APPEALS-43599 Remove comments

* APPEALS-43599 Suppress code smells from reek

* APPEALS-43599 Suppress code smells from reek

* jcohen/APPEALS-43727 (#21589)

* APPEALS-43727 Branch created. Extracted all the 'when' conditions in the case statement within appellant_notification.rb update_appeal_state method.

* APPEALS-43727 appellant_notification_service is created, logic from crowded method in appellant_notificaion.rb placed in newly created file, allowing redability.

* APPEALS-43727 added logic to appeal_state.rb, appellant_notification.rb updated with less logic, readable code through well named methods.

* APPEALS-43727 commit before merge from teammates work

* APPEALS-43727 removed freeze method on default status hash in appeal_state.rb. removed some rubocop disabling in appellant_notificaion.rb

* APPEALS-43727 extracted more logic from the appellant_notification module and placed it into the appeal_state class. Also got rid of rubocop declarations in app_notif and app_state as well. finally removed feature_toggle calls in appell_notif.

* APPEALS-43727 tests passing, code works

* APPEALS-43727 adding tests to appeal_state_spec to test functionality

* APPEALS-43727 rspec tests in appeal_state.

* APPEALS-43727 tests pass.

* Fixing code climate duplicate code issue

* fixing case statement

* code climate things

* rubocop

* APPEALS-43727 work completed.

* APPEALS-43727 PR comments applied. tests not in a working state.

* APPEALS-43727 PR comments applied. appeal_state_spec in working state.

* APPEALS-43727 PR comments applied. appellant_notification_spec.rb all green.

* Adjust spacing of comments in appeal_state.rb

* Utilize #external_id method over ternary

* Swap or conditional for blank?

* Fix another whitespace gap

* APPEALS-43727 PR comments applied. again after reset.

* APPEALS-43727 PR comments applied. flipped conditionals in appeal_state.rb

* Update app/models/concerns/appeal_concern.rb

* APPEALS-43727 code/test edits

* APPEALS-43727 bulk_task_reasssignment_spec reverted to orginal state, with the exception of an expectation that was on line 98

* APPEALS-43727 lint fix

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-46179 (#21712)

* APPEALS-46179 Create JobExecutionTimes table

* APPEALS-46179 Add comment

* APPEALS-46179 Update schema

* APPEALS-46193 (#21753)

* APPEALS-46193 Add record to JobExecutionTime table when job is performed

* APPEALS-46193 Updating JobExecutionTimes table with an upsert query

* APPEALS-46193 Ignore JobExecutionTimes for certain jobs

* APPEALS-46193 Update ignore_job_execution_time? method

* APPEALS-46193 Adding tests

* Fix lint issues

* Update AWS dependencies

* Rollback gem reduction due to UAT issue

* Alter queue priority

* Forward error in SendNotificationJob

* Allow for notification audit records to remain in ProdTest

* Fix spec

* Fix typo in test fixture's name

* Fix lint infraction related to re-raising exceptions

* Address duplication CC error

* Reenable-privacy-mail-notifications (#21859)

* Add conditional for FOIA and Privacy Act mail

task to receives 'Privacy Act Pending' notifications

* Update spec

* Adjust some specs

* Add missing param

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Remove byebug from spec

* Revert queue tweak

* Remove duplicate method

* APPEALS-47382: Refactor Job Behavior Filtering Boolean Methods (#21898)

* initial commit

* refactoring methods to have constants instead of methods

* adding comments back in

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* APPEALS-48342: Prevent Intentional Retries of SendNotificationJobs in ProdTest from Causing Duplicate Notification Table Entries (#21927)

* initial commit

* rubocop'n

* rubcop'n

* fixing tests

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Resolve missed conflict

* MattT/APPEALS-48514 (#21959)

* Prototype of privacy act fix

* Leave privacy act states intact upon decision mailed

* Remove unused param

* Attempt updating specs to cover new behavior

* Fix attr name typo

* Add missing bang

* Skip reek issue

The issue has been deemed to be minor enough to not warrant having to reinvent everything for now.

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix quarterly specs by add in necessary hearings

* Adjust spacing/ordering of gems (#21978)

* MattT/APPEALS-49085 (#21960)

* Filter out appeals whose hearings have been held from hearing_scheduled scope

* Fix whitespace issues

* Fix failing specs caused by an oversight on my part

* Fix lint issue

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-49212 (#21991)

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add step to NightlySyncsJob to sync hearing dispositions and appeal stateS

* Add comment to new method

* Use constant for disposition type

* Fix typo in accessor

* Add spec for new appeal state action

* Create user in top scope

* Expand nighlty syncs job to check all scheduled hearing disposition types.

No show was left off as we don't have a requirement around it yet.

* Add nightly sync job spec

* Add disp task spec

* Add specs targeting the hearings controller

* Add sync script

* Eager load constants

* Add distinct

* Remove appeal_docketed from being reset

* Add script to adjust ama hearing statuses

* Correct mistype

* Add appeal_type clause

* Fix specs

* Lint fixes

* Flip conditionals in specs

* Fix var name

* Fix var

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Backfill addition to script

* Add AppealState record for newly docketed LegacyAppeals (#21999)

* APPEALS-48966 Adding AppealState record for recently docketed appeals

* APPEALS-48966 Refactor code and add comments

* Delete extraneous files

* Revert to using constants value

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix typo

* Fix typo

* Fix seed script

* Fix seed script

* Ensure cleanup

* Change copy for Appeal Docketed status (#22006)

* Change copy for Appeal Docketed status

* Change case

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Use status text value instead of key

---------

Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-44916 seed data update (#22008)

* APPEALS-44956: Add AppealAffinity model and database table (#21526)

* add migration for appeal_affinities

* add AppealAffinity model and associations, update migration for new column

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

* add new job, update affinity model validation and after save hook

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

* add return in job if no query results, tests for no query results

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

* remove comment, fix hearing factory, disable some seeds for testing

* add more tests

* test refactor

* update appeals for dist query to add affinity start, add seed file, fix hearing factory, add stat to dist factory

* disable new seed on reset

* update seed file with vet names, add another seed category

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* APPEALS-44959: Modify affinity date checks to use appeal_affinity (#21611)

* swap distribution queries from distribution_task to appeal_affinities

* update seed files to use appeal affinities instead of distribution task

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

* fix user seed, fix date format in distribution task instructions

* fix tests for date format update

* Calvin/APPEALS-44957-rake-affinity (#21577)

* grabbed receipt dates from distributed cases

* refactored for functionality + added method to grab appeals that match

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

* if appeal affinity is nil, it will now be updated

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

* updated start date to receipt date instead of Time.now

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

* APPEALS-46016: Add Affinity Start Date to the Explain Page (#21660)

* add affinity start date to explain page

* add feature test to verify dates display

* update rake task and spec (#21731)

* APPEALS-46325: Add Seeds for AOD Appeals and Update Dates to Match CAVC (#21730)

* add aod hearing cases to ama affinity cases seed

* fix lever spec

* APPEALS-45148: Hook to clear saved affinity date (#21623)

* initial imp. idea

* AC1: check for affinity_start_date on assignment

* AC2/3: update affinity start date  w/ instr.

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

* add case dist lever to new tests (#21776)

* remove unnecessarily included module from job (#21827)

* APPEALS-47211: Improve Performance of Distribution Queries (#21840)

* rework ready_for_distribution scope

* fix non-hearing docket distribution bug

* restart tests

* added null checks for appeal affinity in distribution queries, update tests (#21893)

* add check for appeal being active to distribution and associated slack message (#21902)

* prelim work on 48033

* refactored code a bit, working on data creation now

* created ama_affinity data

* fixing mispelt variable

* add back line that was removed

* updated users_spec to now pass

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: Calvin <Calvin.Costa@va.gov>

* fixed merge conflict

---------

Co-authored-by: alex-guanipatin <143651918+alex-guanipatin@users.noreply.github.com>
Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>
Co-authored-by: slwallerBAH <161883271+slwallerBAH@users.noreply.github.com>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Matt Roth <roth_matthew@bah.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: Calvin <Calvin.Costa@va.gov>

* Revert "APPEALS-46087 fix css table width issues for case distribution lever history table (#22024)"

This reverts commit 05896d32fa0510bf76101dff689ad05187dc7ccf.

* Add unit testing around push priority distributions with Docket Levers (#22078)

Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-50756: Fix for Appeals Ready to Distribute Query includes dates that are NA (#22090)

* APPEALS-50756 fix appeals ready for distribution csv report to exclude place holder dates for non priority appeals

* fix linting issues of feature branch

* fix rubocop offenses from feature branch

* APPEALS-50756 updated login in ama rows method

* APPEALS-50756 fix lint issues

* APPEALS-50756 The Appeals Ready to Distribute Query includes dates that are NA (#22183)

* APPEALS-50756 fix appeals ready for distribution csv report to exclude place holder dates for non priority appeals

* fix linting issues of feature branch

* fix rubocop offenses from feature branch

* APPEALS-50756 updated login in ama rows method

* APPEALS-50756 fix lint issues

* APPEALS-50756 fix argument error

* APPEALS-49839. improve the test coverage in test docket seeds controller (#22060)

* APPEALS-49839. improve the test coverage in test docket seeds controller

* APPEALS-49839. Improve legacy_tasks_controller test coverage

* APPEALS-49839. Lint fixes

* APPEALS-49839. seedReducer test coverage

* APPEALS-49839. Improve CustomSeed test coverage

* APPEALS-49839. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-52535. Fix PG::UniqueViolation: ERROR in the seed (#22296)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* reverted the invalid role error change

* reverted the invalid role out of the legacy tasks controller too

* took out commented out code

* removed scenario seeds

* lint fix and taking out constants that were already defined

* fixed typo

* fixed indentation

* fixed some linting errors and the push priority spec

* got rid of extraneious variable

* fixed merge conflict fix

* Skip test for now in push_priority_appeals_to_judges_job (#22526)

Co-authored-by: SHarshain <spoosa@razortalent.com>

---------

Co-authored-by: Blake Manus <33578594+Blake-Manus@users.noreply.github.com>
Co-authored-by: sbashamoni <SampathKumar.Bashamoni@va.gov>
Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: Michael Beard <131783726+mbeardy@users.noreply.github.com>
Co-authored-by: cdetlefva <133903625+cdetlefva@users.noreply.github.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Michael Beard <michael.beard@va.gov>
Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
Co-authored-by: 631068 <rickybmanus@gmail.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: youfoundmanesh <maneshreddy.kommidi@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>
Co-authored-by: kristeja <112115264+kristeja@users.noreply.github.com>
Co-authored-by: Craig Reese <Reese_Craig@bah.com>
Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>
Co-authored-by: Matt Roth <r…
craigrva added a commit that referenced this pull request Aug 22, 2024
* Hotfix/appeals 45 2 (#22198)

* Trigger Build

* Update email address from Hearings to Decisions

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>

* APPEALS-46269: Remove the ability to enable proportions code (#22499)

* remove conditional for selecting distribution algorithm

* fix tests which broke when removing the toggle

* Feature/appeals 42187 (#22522)

* cmartine/APPEALS-42621 (#21599)

* Add remove_comp_and_pen_intake feature toggle to intakes controller

* Add new compensation and pension removal message to COPY.json

* Disable comp and pen radio buttons if remove_comp_and_pen_intake toggle is on

* Frontend test updates

* Add tooltip checks for review page integration tests

* fix frontend test lint errors

* frontend tests changes

* Fix linter errors

---------

Co-authored-by: kshiflett88 <kodishiflett@gmail.com>
Co-authored-by: root <root@DESKTOP-IBDKNPF>

* nrithner/APPEALS-45263 (#21617)

* Add remove_comp_and_pen_intake feature toggle to intakes controller

* Add new compensation and pension removal message to COPY.json

* Disable comp and pen radio buttons if remove_comp_and_pen_intake toggle is on

* Frontend test updates

* Add tooltip checks for review page integration tests

* fix frontend test lint errors

* frontend tests changes

* Add banner for non-vha

* Add banner for VHA employee

* Refactor conditionals

* Refactor logic for banners to display

* Add dangerouslySetHtml to banner

* Add test for no VHA employee

with vha_claim_review_establishment disabled.

* Add VHA employee scenario to display REMOVE_INTAKE_COMP_AND_PEN

* Complete non vha user scenarios

* Complete VHA employee scenarios

* Remove comments

* Fix linter errors

* Remove spaces preceding question marks

* Correct linting errors

---------

Co-authored-by: Chris-Martine <christopher.martine@va.gov>
Co-authored-by: kshiflett88 <kodishiflett@gmail.com>
Co-authored-by: root <root@DESKTOP-IBDKNPF>

---------

Co-authored-by: Chris-Martine <135330019+Chris-Martine@users.noreply.github.com>
Co-authored-by: kshiflett88 <kodishiflett@gmail.com>
Co-authored-by: root <root@DESKTOP-IBDKNPF>
Co-authored-by: nicorithner-bah <148365039+nicorithner-bah@users.noreply.github.com>
Co-authored-by: Chris-Martine <christopher.martine@va.gov>

* Feature/appeals 51138.rc.4.3.0 (#22523)

* APPEALS-36339 (#21436)

* Updated to remove obsolete levers of ACD Disable Legacy Distributions and ACD Disable Non-priority Distributions

* Fixed redundant linting issue

* Fixed empty line linting issue

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* mbeard/APPEALS-44379 (#21451)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44417 Seeds for Docket Lever Demo (#21534)

Co-authored-by: Christopher Detlef <>

* APPEALS-36345-updated (#21537)

* Refactored exclusion table

* Fixed ordering issue and testing

* mbeard/APPEALS-44379 (#21530)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

* first new commit with new args

* updates methods and test query

* updates age_of_oldest methods params

* cleans up method removes args and updates tests, fixes linting

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44346 Demo Docket Goal Lever Test Seed Data (#21524)

Co-authored-by: Christopher Detlef <>

* Chrisbdetlef/appeals 40705 (#21535)

* Chris backend Work

* APPEALS-44441. Added initial changes for individual seed

* WIP

* APPEALS-44441. Fixed the table css

* APPEALS-44441. Added Custom and Scenario Seed components and jest tests

* APPEALS-44441. Fix ScenarioSeeds jest test

* APPEALS-44441. Fix CustomeSeeds Jest test

* init commit

* fixes linting issues

* capybara test init

* APPEALS-44441. Backend Integration API changes

* APPEALS-44441_1. Matched the constant keys in the backend

* APPEALS-44441_1. Update the param to match the backend and fixed spec

* APPEALS-44441. lint fixes

* APPEALS-44441. linting fixes

* sharsha/APPEALS-44441. fixed the route and tests

* Change route

* Change variables to match front and back end

* CustomSeed Jest test fix

* Fix issues

* Fix rubocop issues

* Use existing method in the controller

---------

Co-authored-by: Christopher Detlef <>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Michael Beard <michael.beard@va.gov>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 (#21566)

* Fixed rspec failures on constants

* APPEALS-45531. Remove dead code

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Updated lever history to handle null unit values from docket levers (#21567)

Co-authored-by: 631966 <amy.detwiler@va.gov>

* Sharsha/appeals 45531_1 (#21573)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 1 (#21609)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

* TEST FOR FIX

* MORE TESTING

* Fixed rspec issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45502. Organize route and fix the controller (#21595)

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Ricky/APPEALS-36345.fixes (#21612)

* Updated lever history to handle null unit values from docket levers

* Updated member view of exclusion table with proper text display and fixed missing css

* Updated unit test and test data to test rendering of exclusionTable

---------

Co-authored-by: 631966 <amy.detwiler@va.gov>

* ricky/APPEALS-44053 (#21587)

* init commit, adds conditional to check for docket_type ama to method, fixes json constants to snakecase

* puts statements testing

* updates seeds for evidence_submission, adds method to hearing_request_docket.rb and dist_concern.rb

* updated appeals dsit

* final fix for PR

* updates spec to reflect changes in hearing_request_docket

* uncomments seeds

* Ricky/appeals 43523 (#21649)

* Added Assignment Queue link to Switch Users test page

* Updated controller to validate role and redirect

* Updated error information

* Updated rspec tests

---------

Co-authored-by: 631068 <rickybmanus@gmail.com>

* APPEALS-45898. Updated the lever_group_order values (#21639)

* APPEALS-45898. Updated the lever_group_order values

* APPEALS-45898. Updated order of the evidence submission priority and non-priority

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-40646 (#21645)

* Init commit

* adds methods and useffect first pass

* fixes isIdle warning

* removes important from scss

* refined handleToggleChange method

* updates font color for h4

* adds keys to the td and fixed proptype for loadAcdExcludeFromAffinity in casedistributionapp

* Chrisbdetlef/appeals 43117.cleanup (#21671)

* APPEALS-43421: Attorney Selection Sticking on Dropdown after Assignment (#21401)

* redo init commit

* updated imp. logic

* attorney widget fix

---------

Co-authored-by: Calvin <Calvin.Costa@va.gov>

* Add ruby CE API Gem

* remove correspondence changes from schema.rb (#21468)

* Revert "Add ruby CE API Gem" (#21479)

This reverts commit c78afe30620716d59d2ac31ad6eed71585d78a98.

* Override SCT Bulk Assign Page task limit (#21465)

* Override SCT Bulk Assign Queue 15 case limit & Adjust SCT attorney assign task action label

* feature/APPEALS-35707-29633-29632 (prodtest) (#21485)

* 🔀 Squash merge AlecK/APPEALS-35707 - Replace `database_cleaner` with `database_cleaner-active_record`

* 🔀 Squash merge jcroteau/APPEALS-29632-fix-deprecation-action-view-base-instances

* 🔀 Squash merge jcroteau/APPEALS-29633-fix-deprecation-warning-active_record-result-to_hash

* feature/APPEALS-44871 Steps for installing node in the Caseflow demo environment  (#21483) (#21484)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Revert "feature/APPEALS-44871 Steps for installing node in the Caseflow demo …" (#21489)

This reverts commit a6262001f9bedabca60598c82bfe1b803f0f16c7.

* Sbashamoni/appeals 44871 node14 demo fixes (#21490) (#21495)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* add error rules to demo builds (#21496) (#21498)

Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>

* APPEALS-43117 Add QA Users for testing

* Fix rspecs

* Fix issues with attorneys and judge teams

* Fix org count

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: youfoundmanesh <maneshreddy.kommidi@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>
Co-authored-by: Christopher Detlef <>

* Minor fixes (#21694)

* Minor fixes

* Fix rspec tests and properly check for judge css id

* Fix lint issue

---------

Co-authored-by: Christopher Detlef <>

* Fix Legacy Case issues (#21747)

Co-authored-by: Christopher Detlef <>

* APPEALS-46037. Fix padding in the lever history table (#21725)

* APPEALS-46037. Fix padding in the lever history table

* APPEALS-46037. Fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Fix Lauren Roth issue (#21813)

* Users with a VACOLS::Staff entry no longer get created with the default name of Lauren Roth

Co-authored-by: Christopher Detlef <>

* ricky/APPEALS-44044 (#21814)

* first pass at legacy_docket method and spec

* second iteration of legacy_docket and spec

* adds method to age_of_oldest methods and updates test scenarios

* Updated testing and expanded method missing logic

* Updated legacy_docket_spec file and tests

* Updated boolean logic, updated rspecs and factories

* Updated rspec tests to include factories

* updates docket_spec line 317 and factory for disable_ama_non_priority_direct_review

---------

Co-authored-by: Michael Beard <michael.beard@va.gov>

* updates ready_priority_nonpriority_appeals to public_send, updates test (#21844)

* APPEALS-36333 first iteration of docket time goal and prior to goal (#21523)

* APPEALS-36333 first iteration of docket time goal and prior to goal

* APPEALS-36333 address pr comments and moved the logic to docket model

* APPEALS-36333 Added specs for docket and hearing request docket models

* refactored code and moved it to distribution scopes

* APPEALS-36333 address pr comments and refactor code

* APPEALS-43996 updated lever name in all the required files to fix spec failures

* APPEALS-44000 revert hearing request docket model changes to keept it in sync with feature

* APPEALS-44000 updated hearing request docket model specs

* APPEALS-44000 fixed jest tests

* APPEALS-44000 fixed broken rspecs

* APPEALS-43996 fix rubocop warnings

* APPEALS-43996 fix push priority job spec failures

* APPEALS-43996 Updated case distribution lever and docker model and refactor specs

* APPEALS-43996 added rake task to update case distribution lever item in db

* APPEALS-43996 update docket model to handle the scenario when the lever being disabled by a user via the UI

* APPEALS-43996 update section title

* APPEALS-43996 revert rake task

* APPEALS-43996 add new factories to case distribution lever and fix spec failures

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks (#21834)

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks

* APPEALS-45191. Refactor and fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* refactor the logic and fix docket spec failures

* changed the call times to 3 times

* APPEALS-36333 fixed the docket time goal to check the existence of the item before using the public send to get the value

---------

Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: 631966 <amy.detwiler@va.gov>

* updated the seeds to align with the work completed

* Updated Toggle Switch behavior when clicked while idle (#21874)

* Csv research (#21892)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

* csv and etc

* CSS for buttons

* jest tests for the reducer and action types

* Jest test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-46057. CleanUP (#21914)

* more jest tests

* Disable scenario seeds

* Lint fixes

* APPEALS-46057. disable all scenario seeds

* APPEALS-46057. Refactor the TestSeed wrapper to be a functional component and fixed jest test

* APPEALS-46057. Jest job in GHA complaining on test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* updates line of test to correctly build lever item (#21918)

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45191. Updated the query to return the date based on the calculation (#21928)

* APPEALS-45191. Updated the query to return the date based on the calculation

* APPEALS-45191. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisharsha/appeals 43962 (#21929)

* Sharsha/appeals-44911_1 (#21784)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisbdetlef/appeals 44910 (#21838)

* Initial

* Add JSON parsing and multiple calls to rake tasks

* Pre-caby tets

* Add capybara tests and add IDs to buttons

---------

Co-authored-by: Christopher Detlef <>

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: cdetlefva <133903625+cdetlefva@users.noreply.github.com>

* APPEALS-43962. Lint fixes (#21932)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Ricky/APPEALS-47293 (#21925)

* First pass implementation of fixing seeding rspecs

* Second pass at fixing errors in rspecs

* Revert updates to test if rspec passes

* Fixed linting issues in test_docket_seeds_controller_spec

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-48292 updated the column to be a string (#21954)

* APPEALS-48292 updated the column to be a string

* APPEALS-48292 added comment to the control_group field in the migration

* APPEALS-48292 added column comment to the schema, changed migration so that it can be rolled back

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false (#21948)

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false

* APPEALS-49004 added spec to check when Start Distribution Prior to Docket Time Goal toggle is on

* APPEALS-49004 fixed lint issues in docket.rb

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query (#21949)

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query

* APPEALS-48898. Renamed the column and update the method

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-49100. getting value from the start_distribution_prior_to_goal (#21968)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-46257 (#21976)

* updates routes and frontend urls to namespace

* removes superfluous <a> tags

* Ensure that legacy appeals are being created (#21981)

* Ensure that legacy appeals are being created

* Remove puts

---------

Co-authored-by: Christopher Detlef <>

* APPEALS-49403. Added buttons Docket Lever Seed (#21989)

* APPEALS-49403. Added buttons Docket Lever Seed

* sharsha/APPEALS-49403. Updated the endpoint URL path

* APPEALS-49403. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-44000 added check to skip priority appeals in docket model (#21992)

* Feature/appeals 36234 masterupgrade (#22003)

* sbashamoni/APPEALS-43724 Node 16 version upgrade changes (#21966) (#21975)

* Update node verstion to 16 in git workflow

* Update node verstion to 16 in nvm and dockerfile for demo

* Update node version in yarn.lock and package.json and .nvmrc file

* Update node's version path to node16 in docker-bin/env.sh

* Update and upgrade to node16 in client

* More updates to yarn.lock and package.json

* Fix tests by Adam Shaw

* Upadate snapshot for ScheduleVeteran.test.js.snap

* Doing some code clean up

* Doiing some more clean up

* Add and remove spaces to match master

* One more space to take care of

* One more space to take care of again

* One more space to take care of again

---------

Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* init master merge branch

---------

Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* Remove AOD trait from non-priority legacy appeal creation (#22013)

Co-authored-by: Christopher Detlef <>

* Sharsha/appeals 49461 (#22018)

* sharsha/APPEALS-49461. initial commit

* sharsha/APPEALS-49461. fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49421 (#22014)

* init commit fixes ama_np_ capybara test to expect user as admin, and first attempt  test_docket_seeds test

* removes previous chane for TASKS_LOADED

* fixes capybara for test seeds controller button ids

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-49403. Updated the buttons label (#22025)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49585 (#22020)

* init commit for non member view input

* fixes css issue for docket-lever-right

* Added a hyphen between value and unit for member only view

* replaces hyphen with comma

* Init commit replaces th with div for 508 compliance (#22036)

* Chrisbdetlef/appeals 47008 1 (#22040)

* Allow judges to see legacy cases and attorneys to be assigned cases

* Remove testing function

* Update spec to reflect new user count in seed file

---------

Co-authored-by: Christopher Detlef <>

* got rid of extraneous file

* got rid of yarn lock orig

* APPEALS-50734. Remove Legacy appeals from the query (#22071)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-46087 fix css table width issues for case distribution lever history table (#22024)

* Feature/appeals 36234.merge master.20240701 (#22075)

* APPEALS-47277 remove Vegas office (#21876)

* APPEALS-47277 remove Vagas office

* Removed Texas ID from other files and updated tests

* Snapshot update

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* hotfix/APPEALS-22403 (#21942)

* add identifier for filenumber or ssn in filenumber search

* linting

* codeclimate linting

* update match call to return boolean

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* APPEALS-46907: Update to Determination of Gen Pop Legacy Cases (#21986)

* Isaiah/merge 46910 (#21983)

* removed BFHINES checks and modified tests

* removed lingering bfhines test

* modified test

* most recent updates on tests for passing status

* removed refs to cavc updates

* Skip flaky test ro_viewhearsched_spec

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* APPEALS-44916: Case Distribution Affinity Calculations (#21899)

* APPEALS-44956: Add AppealAffinity model and database table (#21526)

* add migration for appeal_affinities

* add AppealAffinity model and associations, update migration for new column

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

* add new job, update affinity model validation and after save hook

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

* add return in job if no query results, tests for no query results

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

* remove comment, fix hearing factory, disable some seeds for testing

* add more tests

* test refactor

* update appeals for dist query to add affinity start, add seed file, fix hearing factory, add stat to dist factory

* disable new seed on reset

* update seed file with vet names, add another seed category

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* APPEALS-44959: Modify affinity date checks to use appeal_affinity (#21611)

* swap distribution queries from distribution_task to appeal_affinities

* update seed files to use appeal affinities instead of distribution task

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

* fix user seed, fix date format in distribution task instructions

* fix tests for date format update

* Calvin/APPEALS-44957-rake-affinity (#21577)

* grabbed receipt dates from distributed cases

* refactored for functionality + added method to grab appeals that match

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

* if appeal affinity is nil, it will now be updated

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

* updated start date to receipt date instead of Time.now

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

* APPEALS-46016: Add Affinity Start Date to the Explain Page (#21660)

* add affinity start date to explain page

* add feature test to verify dates display

* update rake task and spec (#21731)

* APPEALS-46325: Add Seeds for AOD Appeals and Update Dates to Match CAVC (#21730)

* add aod hearing cases to ama affinity cases seed

* fix lever spec

* APPEALS-45148: Hook to clear saved affinity date (#21623)

* initial imp. idea

* AC1: check for affinity_start_date on assignment

* AC2/3: update affinity start date  w/ instr.

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

* add case dist lever to new tests (#21776)

* remove unnecessarily included module from job (#21827)

* APPEALS-47211: Improve Performance of Distribution Queries (#21840)

* rework ready_for_distribution scope

* fix non-hearing docket distribution bug

* restart tests

* added null checks for appeal affinity in distribution queries, update tests (#21893)

* add check for appeal being active to distribution and associated slack message (#21902)

* Update users_spec.rb

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* hotfix/APPEALS-45177: TaskTable Default Sorting Fix (#21772)

* Updated the TaskTable component to use the defaultSort property instead of the defaultSortIdx property for queue table since that property is not used anywhere. Added a default sorting hash to the UnassignedCasesPage component and now pass that down to TaskTable. Removed references to defaultSortIdx.

* Added the type column default sort to the AssignedCasesPage widget as well.

* Added a parenthesis for clarity around a boolean. Moved the defaultSortingHash out into a constants file.

---------

Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>

* APPEALS-47106 Caseflow Swagger (#21993)

* Add Rswag and convert existing API documentation (#21778)

* add rswag

* Update Gemfile.lock

* Setup yaml UI

* remove and reroute old swagger files

* update format and servers values

* Update route_docs_controller.rb

* Update cmp_controller.rb

* cmp endpoint yaml

* cmp endpoint to return 501

* CMP endpoint swagger flies

* update swagger files

* adjust server order, add auth token

* cmp parameter name change

* add comments

* Update users_controller.rb

* unit tests and linting

* lint fixes

* Update swagger_helper.rb

* APPEALS-48048 Swagger Updates (#21909)

* update servers to not include a host

* remove host for server

* remove generated swaggers from definitions

* remove internal API endpoints from having generated swagger

* IDT servers fixes

* disable CMP swagger in prod and prodtest

* set authorization correctly

* fix what is required for CMP upload

* fix linting issues, update lint rake task to autocorrect for rubocop, add rubocop make command

* Update decision_reviews.yaml

* Update ama_issues.yaml

* Update vacols_issues.yaml

* Update swagger.yaml

* fix check failures

* Update docs_controller_spec.rb

* fix unit tests

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update rswag_ui.rb

* Update lint.rake

* Update decision_reviews_spec.rb

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update veterans_controller_spec.rb

* feature/APPEALS-43597 RC1.5.1 (#21996)

* APPEALS-36759 Add sms_response_content and sms_response_time notifications table

* APPEALS-37003 First pass at job refactor

* APPEALS-37003 Add comments and update kwargs for va notify service

* APPEALS-37003 Update spec files

* APPEALS-37003 Update spec

* APPEALS-37003 Ensure user in job and create email_enabled method

* APPEALS-37003 Remove question mark

* Limit max retry attempts to 5

* Add ? to boolen return methods

* jcohen/APPEALS-43706 (#21444)

* APPEALS-43706 macros added to each model file for the polymorphic relationship to be setup.

* APPEALS-43706 migration made and yet to be run.

* APPEALS-43706 migrations ran and expected columns and indexes are in table.

* Fix some spec failures unrelated to this branch

* Limit schema diff

* Add a missing tab

* Fix more unrelated failures. Also prevent ACD lever seeds from overwriting spec output

* Fix last unrelated failure.

* APPEALS-43706 linting issues in va_notify_service fixed.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* [APPEALS-43598] Quarterly Notification Job refactoring (#21505)

* Quarterly Notification Job refactoring

* APPEALS-43598 Fix lint issues for QuarterlyNotificationsJob refactor

* APPEALS-43598 Fix db schema.rb file

* APPEALS-43598 Fix schema.rb file

* APPEALS-43598 Refactoring QuarterlyNotificationsJob for readability

* APPEALS-43598 Refactoring QuarterlyNotificationsJob and removing extra methods

* [APPEALS-43598] Update method name

---------

Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-44007: Eliminate Transmission of Notifications to Deceased Veterans (#21481)

* APPEALS-44007: Writing tests to ensure adding the 'failure due to deceased' information is properly set and added to the db

* updates to pr

* pushing changes for tonight

* updating spec file to handle enabling and disabling feature flags

* Update format_message_status

* Lint roll

* fixing conflicts

* Updates to send notification spec

* Fix one of the legacy test cases

* Remove accidental push

* Fix remaining test

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-45235: Remove Temporary PDF Files From tmp Directory After All eFolder Upload Attempts (#21557)

* Cleanup files after uploading to VBMS

* Only delete file if it exists

* Resolve linter issue

* Update specs

* Trigger CodeClimate

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Add appeal alias for notifiable

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications (#21575)

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications

* fixing some errors

* updating factory

* updating tests

* updating tests and factory

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-43596 Adding JobMessageDeletionMiddleware to delete SQS messages for certain jobs

* APPEALS-43596 Adding tests

* APPEALS-43596 Fix codeclimate

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables (#21596)

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables

* pushing changes

* updating tests

* rubocop

* rubocop'n

* deleting repeat constants

* removing file in favor of EVENT_TYPE_FILTERS.json

* removing instances of using VA_NOTIFY_TEMPLATE_NAMES and using EVENT_TYPE_FILTERS instead

* replacing all instances of strings with constants

* fixing bug

* rubocop'n

* rubocop'n

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Clean notification_events after notification report specs finish (#21662)

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-43725: Extract `notify_appellant` Call from `QuaterlyNotificationsJob` to Decrease Runtime (#21643)

* Group notification types as scopes

* Add new job

* Fix typo

* Add back batching

* Batch send messages

* Multithread job queueing

* Reconfigure bulk enqueueing to utilize send_notifications.fifo queue

* Update the comment on QuaterlyNotificationsJob#perform

to adhere to the RDoc standard

* Use constants for template name

* Provide a more descriptive var name

* Remove unused env var

* Fix linting issues

* Prevent error from being thrown early in init job

* Add RDoc comments to appeal_state

* Add rdoc comment to init job

* Add another rdoc comment to the init job

* Use a more specific error class whenever an appeal

cannot be located within the init job

* Add a more specific error to CaseflowJob#enqueue_batch_of_jobs

* Add test for SendNotificationJob.queue_name_suffix

* Update QuarterlyNotificationsJob tests

* Update appeal_state_spec.rb to cover new scopes

* Add spec file for NotificationInitializationJob

* Add CaseflowJob specs

* Add CaseflowJob specs

* Address rubocop issue (by ignoring it)

* Kicking off CodeClimate

* Fix some lint issues

* Freeze constant

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Move spec file to proper location

* APPEALS-43599 (#21696)

* APPEALS-43599 Refactoring SendNotificationJob

* APPEALS-43599 Remove comments

* APPEALS-43599 Suppress code smells from reek

* APPEALS-43599 Suppress code smells from reek

* jcohen/APPEALS-43727 (#21589)

* APPEALS-43727 Branch created. Extracted all the 'when' conditions in the case statement within appellant_notification.rb update_appeal_state method.

* APPEALS-43727 appellant_notification_service is created, logic from crowded method in appellant_notificaion.rb placed in newly created file, allowing redability.

* APPEALS-43727 added logic to appeal_state.rb, appellant_notification.rb updated with less logic, readable code through well named methods.

* APPEALS-43727 commit before merge from teammates work

* APPEALS-43727 removed freeze method on default status hash in appeal_state.rb. removed some rubocop disabling in appellant_notificaion.rb

* APPEALS-43727 extracted more logic from the appellant_notification module and placed it into the appeal_state class. Also got rid of rubocop declarations in app_notif and app_state as well. finally removed feature_toggle calls in appell_notif.

* APPEALS-43727 tests passing, code works

* APPEALS-43727 adding tests to appeal_state_spec to test functionality

* APPEALS-43727 rspec tests in appeal_state.

* APPEALS-43727 tests pass.

* Fixing code climate duplicate code issue

* fixing case statement

* code climate things

* rubocop

* APPEALS-43727 work completed.

* APPEALS-43727 PR comments applied. tests not in a working state.

* APPEALS-43727 PR comments applied. appeal_state_spec in working state.

* APPEALS-43727 PR comments applied. appellant_notification_spec.rb all green.

* Adjust spacing of comments in appeal_state.rb

* Utilize #external_id method over ternary

* Swap or conditional for blank?

* Fix another whitespace gap

* APPEALS-43727 PR comments applied. again after reset.

* APPEALS-43727 PR comments applied. flipped conditionals in appeal_state.rb

* Update app/models/concerns/appeal_concern.rb

* APPEALS-43727 code/test edits

* APPEALS-43727 bulk_task_reasssignment_spec reverted to orginal state, with the exception of an expectation that was on line 98

* APPEALS-43727 lint fix

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-46179 (#21712)

* APPEALS-46179 Create JobExecutionTimes table

* APPEALS-46179 Add comment

* APPEALS-46179 Update schema

* APPEALS-46193 (#21753)

* APPEALS-46193 Add record to JobExecutionTime table when job is performed

* APPEALS-46193 Updating JobExecutionTimes table with an upsert query

* APPEALS-46193 Ignore JobExecutionTimes for certain jobs

* APPEALS-46193 Update ignore_job_execution_time? method

* APPEALS-46193 Adding tests

* Fix lint issues

* Update AWS dependencies

* Rollback gem reduction due to UAT issue

* Alter queue priority

* Forward error in SendNotificationJob

* Allow for notification audit records to remain in ProdTest

* Fix spec

* Fix typo in test fixture's name

* Fix lint infraction related to re-raising exceptions

* Address duplication CC error

* Reenable-privacy-mail-notifications (#21859)

* Add conditional for FOIA and Privacy Act mail

task to receives 'Privacy Act Pending' notifications

* Update spec

* Adjust some specs

* Add missing param

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Remove byebug from spec

* Revert queue tweak

* Remove duplicate method

* APPEALS-47382: Refactor Job Behavior Filtering Boolean Methods (#21898)

* initial commit

* refactoring methods to have constants instead of methods

* adding comments back in

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* APPEALS-48342: Prevent Intentional Retries of SendNotificationJobs in ProdTest from Causing Duplicate Notification Table Entries (#21927)

* initial commit

* rubocop'n

* rubcop'n

* fixing tests

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Resolve missed conflict

* MattT/APPEALS-48514 (#21959)

* Prototype of privacy act fix

* Leave privacy act states intact upon decision mailed

* Remove unused param

* Attempt updating specs to cover new behavior

* Fix attr name typo

* Add missing bang

* Skip reek issue

The issue has been deemed to be minor enough to not warrant having to reinvent everything for now.

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix quarterly specs by add in necessary hearings

* Adjust spacing/ordering of gems (#21978)

* MattT/APPEALS-49085 (#21960)

* Filter out appeals whose hearings have been held from hearing_scheduled scope

* Fix whitespace issues

* Fix failing specs caused by an oversight on my part

* Fix lint issue

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-49212 (#21991)

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add step to NightlySyncsJob to sync hearing dispositions and appeal stateS

* Add comment to new method

* Use constant for disposition type

* Fix typo in accessor

* Add spec for new appeal state action

* Create user in top scope

* Expand nighlty syncs job to check all scheduled hearing disposition types.

No show was left off as we don't have a requirement around it yet.

* Add nightly sync job spec

* Add disp task spec

* Add specs targeting the hearings controller

* Add sync script

* Eager load constants

* Add distinct

* Remove appeal_docketed from being reset

* Add script to adjust ama hearing statuses

* Correct mistype

* Add appeal_type clause

* Fix specs

* Lint fixes

* Flip conditionals in specs

* Fix var name

* Fix var

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Backfill addition to script

* Add AppealState record for newly docketed LegacyAppeals (#21999)

* APPEALS-48966 Adding AppealState record for recently docketed appeals

* APPEALS-48966 Refactor code and add comments

* Delete extraneous files

* Revert to using constants value

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix typo

---------

Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Feature/appeals 43597 release candidate (#22004)

* APPEALS-36759 Add sms_response_content and sms_response_time notifications table

* APPEALS-37003 First pass at job refactor

* APPEALS-37003 Add comments and update kwargs for va notify service

* APPEALS-37003 Update spec files

* APPEALS-37003 Update spec

* APPEALS-37003 Ensure user in job and create email_enabled method

* APPEALS-37003 Remove question mark

* Limit max retry attempts to 5

* Add ? to boolen return methods

* jcohen/APPEALS-43706 (#21444)

* APPEALS-43706 macros added to each model file for the polymorphic relationship to be setup.

* APPEALS-43706 migration made and yet to be run.

* APPEALS-43706 migrations ran and expected columns and indexes are in table.

* Fix some spec failures unrelated to this branch

* Limit schema diff

* Add a missing tab

* Fix more unrelated failures. Also prevent ACD lever seeds from overwriting spec output

* Fix last unrelated failure.

* APPEALS-43706 linting issues in va_notify_service fixed.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* [APPEALS-43598] Quarterly Notification Job refactoring (#21505)

* Quarterly Notification Job refactoring

* APPEALS-43598 Fix lint issues for QuarterlyNotificationsJob refactor

* APPEALS-43598 Fix db schema.rb file

* APPEALS-43598 Fix schema.rb file

* APPEALS-43598 Refactoring QuarterlyNotificationsJob for readability

* APPEALS-43598 Refactoring QuarterlyNotificationsJob and removing extra methods

* [APPEALS-43598] Update method name

---------

Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-44007: Eliminate Transmission of Notifications to Deceased Veterans (#21481)

* APPEALS-44007: Writing tests to ensure adding the 'failure due to deceased' information is properly set and added to the db

* updates to pr

* pushing changes for tonight

* updating spec file to handle enabling and disabling feature flags

* Update format_message_status

* Lint roll

* fixing conflicts

* Updates to send notification spec

* Fix one of the legacy test cases

* Remove accidental push

* Fix remaining test

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-45235: Remove Temporary PDF Files From tmp Directory After All eFolder Upload Attempts (#21557)

* Cleanup files after uploading to VBMS

* Only delete file if it exists

* Resolve linter issue

* Update specs

* Trigger CodeClimate

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Add appeal alias for notifiable

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications (#21575)

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications

* fixing some errors

* updating factory

* updating tests

* updating tests and factory

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-43596 Adding JobMessageDeletionMiddleware to delete SQS messages for certain jobs

* APPEALS-43596 Adding tests

* APPEALS-43596 Fix codeclimate

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables (#21596)

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables

* pushing changes

* updating tests

* rubocop

* rubocop'n

* deleting repeat constants

* removing file in favor of EVENT_TYPE_FILTERS.json

* removing instances of using VA_NOTIFY_TEMPLATE_NAMES and using EVENT_TYPE_FILTERS instead

* replacing all instances of strings with constants

* fixing bug

* rubocop'n

* rubocop'n

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Clean notification_events after notification report specs finish (#21662)

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-43725: Extract `notify_appellant` Call from `QuaterlyNotificationsJob` to Decrease Runtime (#21643)

* Group notification types as scopes

* Add new job

* Fix typo

* Add back batching

* Batch send messages

* Multithread job queueing

* Reconfigure bulk enqueueing to utilize send_notifications.fifo queue

* Update the comment on QuaterlyNotificationsJob#perform

to adhere to the RDoc standard

* Use constants for template name

* Provide a more descriptive var name

* Remove unused env var

* Fix linting issues

* Prevent error from being thrown early in init job

* Add RDoc comments to appeal_state

* Add rdoc comment to init job

* Add another rdoc comment to the init job

* Use a more specific error class whenever an appeal

cannot be located within the init job

* Add a more specific error to CaseflowJob#enqueue_batch_of_jobs

* Add test for SendNotificationJob.queue_name_suffix

* Update QuarterlyNotificationsJob tests

* Update appeal_state_spec.rb to cover new scopes

* Add spec file for NotificationInitializationJob

* Add CaseflowJob specs

* Add CaseflowJob specs

* Address rubocop issue (by ignoring it)

* Kicking off CodeClimate

* Fix some lint issues

* Freeze constant

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Move spec file to proper location

* APPEALS-43599 (#21696)

* APPEALS-43599 Refactoring SendNotificationJob

* APPEALS-43599 Remove comments

* APPEALS-43599 Suppress code smells from reek

* APPEALS-43599 Suppress code smells from reek

* jcohen/APPEALS-43727 (#21589)

* APPEALS-43727 Branch created. Extracted all the 'when' conditions in the case statement within appellant_notification.rb update_appeal_state method.

* APPEALS-43727 appellant_notification_service is created, logic from crowded method in appellant_notificaion.rb placed in newly created file, allowing redability.

* APPEALS-43727 added logic to appeal_state.rb, appellant_notification.rb updated with less logic, readable code through well named methods.

* APPEALS-43727 commit before merge from teammates work

* APPEALS-43727 removed freeze method on default status hash in appeal_state.rb. removed some rubocop disabling in appellant_notificaion.rb

* APPEALS-43727 extracted more logic from the appellant_notification module and placed it into the appeal_state class. Also got rid of rubocop declarations in app_notif and app_state as well. finally removed feature_toggle calls in appell_notif.

* APPEALS-43727 tests passing, code works

* APPEALS-43727 adding tests to appeal_state_spec to test functionality

* APPEALS-43727 rspec tests in appeal_state.

* APPEALS-43727 tests pass.

* Fixing code climate duplicate code issue

* fixing case statement

* code climate things

* rubocop

* APPEALS-43727 work completed.

* APPEALS-43727 PR comments applied. tests not in a working state.

* APPEALS-43727 PR comments applied. appeal_state_spec in working state.

* APPEALS-43727 PR comments applied. appellant_notification_spec.rb all green.

* Adjust spacing of comments in appeal_state.rb

* Utilize #external_id method over ternary

* Swap or conditional for blank?

* Fix another whitespace gap

* APPEALS-43727 PR comments applied. again after reset.

* APPEALS-43727 PR comments applied. flipped conditionals in appeal_state.rb

* Update app/models/concerns/appeal_concern.rb

* APPEALS-43727 code/test edits

* APPEALS-43727 bulk_task_reasssignment_spec reverted to orginal state, with the exception of an expectation that was on line 98

* APPEALS-43727 lint fix

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-46179 (#21712)

* APPEALS-46179 Create JobExecutionTimes table

* APPEALS-46179 Add comment

* APPEALS-46179 Update schema

* APPEALS-46193 (#21753)

* APPEALS-46193 Add record to JobExecutionTime table when job is performed

* APPEALS-46193 Updating JobExecutionTimes table with an upsert query

* APPEALS-46193 Ignore JobExecutionTimes for certain jobs

* APPEALS-46193 Update ignore_job_execution_time? method

* APPEALS-46193 Adding tests

* Fix lint issues

* Update AWS dependencies

* Rollback gem reduction due to UAT issue

* Alter queue priority

* Forward error in SendNotificationJob

* Allow for notification audit records to remain in ProdTest

* Fix spec

* Fix typo in test fixture's name

* Fix lint infraction related to re-raising exceptions

* Address duplication CC error

* Reenable-privacy-mail-notifications (#21859)

* Add conditional for FOIA and Privacy Act mail

task to receives 'Privacy Act Pending' notifications

* Update spec

* Adjust some specs

* Add missing param

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Remove byebug from spec

* Revert queue tweak

* Remove duplicate method

* APPEALS-47382: Refactor Job Behavior Filtering Boolean Methods (#21898)

* initial commit

* refactoring methods to have constants instead of methods

* adding comments back in

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* APPEALS-48342: Prevent Intentional Retries of SendNotificationJobs in ProdTest from Causing Duplicate Notification Table Entries (#21927)

* initial commit

* rubocop'n

* rubcop'n

* fixing tests

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Resolve missed conflict

* MattT/APPEALS-48514 (#21959)

* Prototype of privacy act fix

* Leave privacy act states intact upon decision mailed

* Remove unused param

* Attempt updating specs to cover new behavior

* Fix attr name typo

* Add missing bang

* Skip reek issue

The issue has been deemed to be minor enough to not warrant having to reinvent everything for now.

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix quarterly specs by add in necessary hearings

* Adjust spacing/ordering of gems (#21978)

* MattT/APPEALS-49085 (#21960)

* Filter out appeals whose hearings have been held from hearing_scheduled scope

* Fix whitespace issues

* Fix failing specs caused by an oversight on my part

* Fix lint issue

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-49212 (#21991)

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add step to NightlySyncsJob to sync hearing dispositions and appeal stateS

* Add comment to new method

* Use constant for disposition type

* Fix typo in accessor

* Add spec for new appeal state action

* Create user in top scope

* Expand nighlty syncs job to check all scheduled hearing disposition types.

No show was left off as we don't have a requirement around it yet.

* Add nightly sync job spec

* Add disp task spec

* Add specs targeting the hearings controller

* Add sync script

* Eager load constants

* Add distinct

* Remove appeal_docketed from being reset

* Add script to adjust ama hearing statuses

* Correct mistype

* Add appeal_type clause

* Fix specs

* Lint fixes

* Flip conditionals in specs

* Fix var name

* Fix var

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Backfill addition to script

* Add AppealState record for newly docketed LegacyAppeals (#21999)

* APPEALS-48966 Adding AppealState record for recently docketed appeals

* APPEALS-48966 Refactor code and add comments

* Delete extraneous files

* Revert to using constants value

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix typo

* Fix typo

* Fix seed script

* Fix seed script

* Ensure cleanup

* Change copy for Appeal Docketed status (#22006)

* Change copy for Appeal Docketed status

* Change case

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Use status text value instead of key

---------

Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-44916 seed data update (#22008)

* APPEALS-44956: Add AppealAffinity model and database table (#21526)

* add migration for appeal_affinities

* add AppealAffinity model and associations, update migration for new column

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

* add new job, update affinity model validation and after save hook

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

* add return in job if no query results, tests for no query results

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

* remove comment, fix hearing factory, disable some seeds for testing

* add more tests

* test refactor

* update appeals for dist query to add affinity start, add seed file, fix hearing factory, add stat to dist factory

* disable new seed on reset

* update seed file with vet names, add another seed category

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* APPEALS-44959: Modify affinity date checks to use appeal_affinity (#21611)

* swap distribution queries from distribution_task to appeal_affinities

* update seed files to use appeal affinities instead of distribution task

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

* fix user seed, fix date format in distribution task instructions

* fix tests for date format update

* Calvin/APPEALS-44957-rake-affinity (#21577)

* grabbed receipt dates from distributed cases

* refactored for functionality + added method to grab appeals that match

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

* if appeal affinity is nil, it will now be updated

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

* updated start date to receipt date instead of Time.now

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

* APPEALS-46016: Add Affinity Start Date to the Explain Page (#21660)

* add affinity start date to explain page

* add feature test to verify dates display

* update rake task and spec (#21731)

* APPEALS-46325: Add Seeds for AOD Appeals and Update Dates to Match CAVC (#21730)

* add aod hearing cases to ama affinity cases seed

* fix lever spec

* APPEALS-45148: Hook to clear saved affinity date (#21623)

* initial imp. idea

* AC1: check for affinity_start_date on assignment

* AC2/3: update affinity start date  w/ instr.

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

* add case dist lever to new tests (#21776)

* remove unnecessarily included module from job (#21827)

* APPEALS-47211: Improve Performance of Distribution Queries (#21840)

* rework ready_for_distribution scope

* fix non-hearing docket distribution bug

* restart tests

* added null checks for appeal affinity in distribution queries, update tests (#21893)

* add check for appeal being active to distribution and associated slack message (#21902)

* prelim work on 48033

* refactored code a bit, working on data creation now

* created ama_affinity data

* fixing mispelt variable

* add back line that was removed

* updated users_spec to now pass

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: Calvin <Calvin.Costa@va.gov>

* fixed merge conflict

---------

Co-authored-by: alex-guanipatin <143651918+alex-guanipatin@users.noreply.github.com>
Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>
Co-authored-by: slwallerBAH <161883271+slwallerBAH@users.noreply.github.com>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Matt Roth <roth_matthew@bah.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: Calvin <Calvin.Costa@va.gov>

* Revert "APPEALS-46087 fix css table width issues for case distribution lever history table (#22024)"

This reverts commit 05896d32fa0510bf76101dff689ad05187dc7ccf.

* Add unit testing around push priority distributions with Docket Levers (#22078)

Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-50756: Fix for Appeals Ready to Distribute Query includes dates that are NA (#22090)

* APPEALS-50756 fix appeals ready for distribution csv report to exclude place holder dates for non priority appeals

* fix linting issues of feature branch

* fix rubocop offenses from feature branch

* APPEALS-50756 updated login in ama rows method

* APPEALS-50756 fix lint issues

* APPEALS-50756 The Appeals Ready to Distribute Query includes dates that are NA (#22183)

* APPEALS-50756 fix appeals ready for distribution csv report to exclude place holder dates for non priority appeals

* fix linting issues of feature branch

* fix rubocop offenses from feature branch

* APPEALS-50756 updated login in ama rows method

* AP…
ramon-chavez added a commit that referenced this pull request Aug 23, 2024
* Hotfix/appeals 45 2 (#22198)

* Trigger Build

* Update email address from Hearings to Decisions

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>

* APPEALS-46269: Remove the ability to enable proportions code (#22499)

* remove conditional for selecting distribution algorithm

* fix tests which broke when removing the toggle

* Feature/appeals 42187 (#22522)

* cmartine/APPEALS-42621 (#21599)

* Add remove_comp_and_pen_intake feature toggle to intakes controller

* Add new compensation and pension removal message to COPY.json

* Disable comp and pen radio buttons if remove_comp_and_pen_intake toggle is on

* Frontend test updates

* Add tooltip checks for review page integration tests

* fix frontend test lint errors

* frontend tests changes

* Fix linter errors

---------

Co-authored-by: kshiflett88 <kodishiflett@gmail.com>
Co-authored-by: root <root@DESKTOP-IBDKNPF>

* nrithner/APPEALS-45263 (#21617)

* Add remove_comp_and_pen_intake feature toggle to intakes controller

* Add new compensation and pension removal message to COPY.json

* Disable comp and pen radio buttons if remove_comp_and_pen_intake toggle is on

* Frontend test updates

* Add tooltip checks for review page integration tests

* fix frontend test lint errors

* frontend tests changes

* Add banner for non-vha

* Add banner for VHA employee

* Refactor conditionals

* Refactor logic for banners to display

* Add dangerouslySetHtml to banner

* Add test for no VHA employee

with vha_claim_review_establishment disabled.

* Add VHA employee scenario to display REMOVE_INTAKE_COMP_AND_PEN

* Complete non vha user scenarios

* Complete VHA employee scenarios

* Remove comments

* Fix linter errors

* Remove spaces preceding question marks

* Correct linting errors

---------

Co-authored-by: Chris-Martine <christopher.martine@va.gov>
Co-authored-by: kshiflett88 <kodishiflett@gmail.com>
Co-authored-by: root <root@DESKTOP-IBDKNPF>

---------

Co-authored-by: Chris-Martine <135330019+Chris-Martine@users.noreply.github.com>
Co-authored-by: kshiflett88 <kodishiflett@gmail.com>
Co-authored-by: root <root@DESKTOP-IBDKNPF>
Co-authored-by: nicorithner-bah <148365039+nicorithner-bah@users.noreply.github.com>
Co-authored-by: Chris-Martine <christopher.martine@va.gov>

* Feature/appeals 51138.rc.4.3.0 (#22523)

* APPEALS-36339 (#21436)

* Updated to remove obsolete levers of ACD Disable Legacy Distributions and ACD Disable Non-priority Distributions

* Fixed redundant linting issue

* Fixed empty line linting issue

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* mbeard/APPEALS-44379 (#21451)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44417 Seeds for Docket Lever Demo (#21534)

Co-authored-by: Christopher Detlef <>

* APPEALS-36345-updated (#21537)

* Refactored exclusion table

* Fixed ordering issue and testing

* mbeard/APPEALS-44379 (#21530)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

* first new commit with new args

* updates methods and test query

* updates age_of_oldest methods params

* cleans up method removes args and updates tests, fixes linting

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44346 Demo Docket Goal Lever Test Seed Data (#21524)

Co-authored-by: Christopher Detlef <>

* Chrisbdetlef/appeals 40705 (#21535)

* Chris backend Work

* APPEALS-44441. Added initial changes for individual seed

* WIP

* APPEALS-44441. Fixed the table css

* APPEALS-44441. Added Custom and Scenario Seed components and jest tests

* APPEALS-44441. Fix ScenarioSeeds jest test

* APPEALS-44441. Fix CustomeSeeds Jest test

* init commit

* fixes linting issues

* capybara test init

* APPEALS-44441. Backend Integration API changes

* APPEALS-44441_1. Matched the constant keys in the backend

* APPEALS-44441_1. Update the param to match the backend and fixed spec

* APPEALS-44441. lint fixes

* APPEALS-44441. linting fixes

* sharsha/APPEALS-44441. fixed the route and tests

* Change route

* Change variables to match front and back end

* CustomSeed Jest test fix

* Fix issues

* Fix rubocop issues

* Use existing method in the controller

---------

Co-authored-by: Christopher Detlef <>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Michael Beard <michael.beard@va.gov>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 (#21566)

* Fixed rspec failures on constants

* APPEALS-45531. Remove dead code

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Updated lever history to handle null unit values from docket levers (#21567)

Co-authored-by: 631966 <amy.detwiler@va.gov>

* Sharsha/appeals 45531_1 (#21573)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 1 (#21609)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

* TEST FOR FIX

* MORE TESTING

* Fixed rspec issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45502. Organize route and fix the controller (#21595)

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Ricky/APPEALS-36345.fixes (#21612)

* Updated lever history to handle null unit values from docket levers

* Updated member view of exclusion table with proper text display and fixed missing css

* Updated unit test and test data to test rendering of exclusionTable

---------

Co-authored-by: 631966 <amy.detwiler@va.gov>

* ricky/APPEALS-44053 (#21587)

* init commit, adds conditional to check for docket_type ama to method, fixes json constants to snakecase

* puts statements testing

* updates seeds for evidence_submission, adds method to hearing_request_docket.rb and dist_concern.rb

* updated appeals dsit

* final fix for PR

* updates spec to reflect changes in hearing_request_docket

* uncomments seeds

* Ricky/appeals 43523 (#21649)

* Added Assignment Queue link to Switch Users test page

* Updated controller to validate role and redirect

* Updated error information

* Updated rspec tests

---------

Co-authored-by: 631068 <rickybmanus@gmail.com>

* APPEALS-45898. Updated the lever_group_order values (#21639)

* APPEALS-45898. Updated the lever_group_order values

* APPEALS-45898. Updated order of the evidence submission priority and non-priority

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-40646 (#21645)

* Init commit

* adds methods and useffect first pass

* fixes isIdle warning

* removes important from scss

* refined handleToggleChange method

* updates font color for h4

* adds keys to the td and fixed proptype for loadAcdExcludeFromAffinity in casedistributionapp

* Chrisbdetlef/appeals 43117.cleanup (#21671)

* APPEALS-43421: Attorney Selection Sticking on Dropdown after Assignment (#21401)

* redo init commit

* updated imp. logic

* attorney widget fix

---------

Co-authored-by: Calvin <Calvin.Costa@va.gov>

* Add ruby CE API Gem

* remove correspondence changes from schema.rb (#21468)

* Revert "Add ruby CE API Gem" (#21479)

This reverts commit c78afe30620716d59d2ac31ad6eed71585d78a98.

* Override SCT Bulk Assign Page task limit (#21465)

* Override SCT Bulk Assign Queue 15 case limit & Adjust SCT attorney assign task action label

* feature/APPEALS-35707-29633-29632 (prodtest) (#21485)

* 🔀 Squash merge AlecK/APPEALS-35707 - Replace `database_cleaner` with `database_cleaner-active_record`

* 🔀 Squash merge jcroteau/APPEALS-29632-fix-deprecation-action-view-base-instances

* 🔀 Squash merge jcroteau/APPEALS-29633-fix-deprecation-warning-active_record-result-to_hash

* feature/APPEALS-44871 Steps for installing node in the Caseflow demo environment  (#21483) (#21484)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Revert "feature/APPEALS-44871 Steps for installing node in the Caseflow demo …" (#21489)

This reverts commit a6262001f9bedabca60598c82bfe1b803f0f16c7.

* Sbashamoni/appeals 44871 node14 demo fixes (#21490) (#21495)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* add error rules to demo builds (#21496) (#21498)

Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>

* APPEALS-43117 Add QA Users for testing

* Fix rspecs

* Fix issues with attorneys and judge teams

* Fix org count

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: youfoundmanesh <maneshreddy.kommidi@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>
Co-authored-by: Christopher Detlef <>

* Minor fixes (#21694)

* Minor fixes

* Fix rspec tests and properly check for judge css id

* Fix lint issue

---------

Co-authored-by: Christopher Detlef <>

* Fix Legacy Case issues (#21747)

Co-authored-by: Christopher Detlef <>

* APPEALS-46037. Fix padding in the lever history table (#21725)

* APPEALS-46037. Fix padding in the lever history table

* APPEALS-46037. Fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Fix Lauren Roth issue (#21813)

* Users with a VACOLS::Staff entry no longer get created with the default name of Lauren Roth

Co-authored-by: Christopher Detlef <>

* ricky/APPEALS-44044 (#21814)

* first pass at legacy_docket method and spec

* second iteration of legacy_docket and spec

* adds method to age_of_oldest methods and updates test scenarios

* Updated testing and expanded method missing logic

* Updated legacy_docket_spec file and tests

* Updated boolean logic, updated rspecs and factories

* Updated rspec tests to include factories

* updates docket_spec line 317 and factory for disable_ama_non_priority_direct_review

---------

Co-authored-by: Michael Beard <michael.beard@va.gov>

* updates ready_priority_nonpriority_appeals to public_send, updates test (#21844)

* APPEALS-36333 first iteration of docket time goal and prior to goal (#21523)

* APPEALS-36333 first iteration of docket time goal and prior to goal

* APPEALS-36333 address pr comments and moved the logic to docket model

* APPEALS-36333 Added specs for docket and hearing request docket models

* refactored code and moved it to distribution scopes

* APPEALS-36333 address pr comments and refactor code

* APPEALS-43996 updated lever name in all the required files to fix spec failures

* APPEALS-44000 revert hearing request docket model changes to keept it in sync with feature

* APPEALS-44000 updated hearing request docket model specs

* APPEALS-44000 fixed jest tests

* APPEALS-44000 fixed broken rspecs

* APPEALS-43996 fix rubocop warnings

* APPEALS-43996 fix push priority job spec failures

* APPEALS-43996 Updated case distribution lever and docker model and refactor specs

* APPEALS-43996 added rake task to update case distribution lever item in db

* APPEALS-43996 update docket model to handle the scenario when the lever being disabled by a user via the UI

* APPEALS-43996 update section title

* APPEALS-43996 revert rake task

* APPEALS-43996 add new factories to case distribution lever and fix spec failures

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks (#21834)

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks

* APPEALS-45191. Refactor and fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* refactor the logic and fix docket spec failures

* changed the call times to 3 times

* APPEALS-36333 fixed the docket time goal to check the existence of the item before using the public send to get the value

---------

Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: 631966 <amy.detwiler@va.gov>

* updated the seeds to align with the work completed

* Updated Toggle Switch behavior when clicked while idle (#21874)

* Csv research (#21892)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

* csv and etc

* CSS for buttons

* jest tests for the reducer and action types

* Jest test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-46057. CleanUP (#21914)

* more jest tests

* Disable scenario seeds

* Lint fixes

* APPEALS-46057. disable all scenario seeds

* APPEALS-46057. Refactor the TestSeed wrapper to be a functional component and fixed jest test

* APPEALS-46057. Jest job in GHA complaining on test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* updates line of test to correctly build lever item (#21918)

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45191. Updated the query to return the date based on the calculation (#21928)

* APPEALS-45191. Updated the query to return the date based on the calculation

* APPEALS-45191. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisharsha/appeals 43962 (#21929)

* Sharsha/appeals-44911_1 (#21784)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisbdetlef/appeals 44910 (#21838)

* Initial

* Add JSON parsing and multiple calls to rake tasks

* Pre-caby tets

* Add capybara tests and add IDs to buttons

---------

Co-authored-by: Christopher Detlef <>

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: cdetlefva <133903625+cdetlefva@users.noreply.github.com>

* APPEALS-43962. Lint fixes (#21932)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Ricky/APPEALS-47293 (#21925)

* First pass implementation of fixing seeding rspecs

* Second pass at fixing errors in rspecs

* Revert updates to test if rspec passes

* Fixed linting issues in test_docket_seeds_controller_spec

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-48292 updated the column to be a string (#21954)

* APPEALS-48292 updated the column to be a string

* APPEALS-48292 added comment to the control_group field in the migration

* APPEALS-48292 added column comment to the schema, changed migration so that it can be rolled back

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false (#21948)

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false

* APPEALS-49004 added spec to check when Start Distribution Prior to Docket Time Goal toggle is on

* APPEALS-49004 fixed lint issues in docket.rb

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query (#21949)

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query

* APPEALS-48898. Renamed the column and update the method

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-49100. getting value from the start_distribution_prior_to_goal (#21968)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-46257 (#21976)

* updates routes and frontend urls to namespace

* removes superfluous <a> tags

* Ensure that legacy appeals are being created (#21981)

* Ensure that legacy appeals are being created

* Remove puts

---------

Co-authored-by: Christopher Detlef <>

* APPEALS-49403. Added buttons Docket Lever Seed (#21989)

* APPEALS-49403. Added buttons Docket Lever Seed

* sharsha/APPEALS-49403. Updated the endpoint URL path

* APPEALS-49403. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-44000 added check to skip priority appeals in docket model (#21992)

* Feature/appeals 36234 masterupgrade (#22003)

* sbashamoni/APPEALS-43724 Node 16 version upgrade changes (#21966) (#21975)

* Update node verstion to 16 in git workflow

* Update node verstion to 16 in nvm and dockerfile for demo

* Update node version in yarn.lock and package.json and .nvmrc file

* Update node's version path to node16 in docker-bin/env.sh

* Update and upgrade to node16 in client

* More updates to yarn.lock and package.json

* Fix tests by Adam Shaw

* Upadate snapshot for ScheduleVeteran.test.js.snap

* Doing some code clean up

* Doiing some more clean up

* Add and remove spaces to match master

* One more space to take care of

* One more space to take care of again

* One more space to take care of again

---------

Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* init master merge branch

---------

Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* Remove AOD trait from non-priority legacy appeal creation (#22013)

Co-authored-by: Christopher Detlef <>

* Sharsha/appeals 49461 (#22018)

* sharsha/APPEALS-49461. initial commit

* sharsha/APPEALS-49461. fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49421 (#22014)

* init commit fixes ama_np_ capybara test to expect user as admin, and first attempt  test_docket_seeds test

* removes previous chane for TASKS_LOADED

* fixes capybara for test seeds controller button ids

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-49403. Updated the buttons label (#22025)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49585 (#22020)

* init commit for non member view input

* fixes css issue for docket-lever-right

* Added a hyphen between value and unit for member only view

* replaces hyphen with comma

* Init commit replaces th with div for 508 compliance (#22036)

* Chrisbdetlef/appeals 47008 1 (#22040)

* Allow judges to see legacy cases and attorneys to be assigned cases

* Remove testing function

* Update spec to reflect new user count in seed file

---------

Co-authored-by: Christopher Detlef <>

* got rid of extraneous file

* got rid of yarn lock orig

* APPEALS-50734. Remove Legacy appeals from the query (#22071)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-46087 fix css table width issues for case distribution lever history table (#22024)

* Feature/appeals 36234.merge master.20240701 (#22075)

* APPEALS-47277 remove Vegas office (#21876)

* APPEALS-47277 remove Vagas office

* Removed Texas ID from other files and updated tests

* Snapshot update

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* hotfix/APPEALS-22403 (#21942)

* add identifier for filenumber or ssn in filenumber search

* linting

* codeclimate linting

* update match call to return boolean

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* APPEALS-46907: Update to Determination of Gen Pop Legacy Cases (#21986)

* Isaiah/merge 46910 (#21983)

* removed BFHINES checks and modified tests

* removed lingering bfhines test

* modified test

* most recent updates on tests for passing status

* removed refs to cavc updates

* Skip flaky test ro_viewhearsched_spec

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* APPEALS-44916: Case Distribution Affinity Calculations (#21899)

* APPEALS-44956: Add AppealAffinity model and database table (#21526)

* add migration for appeal_affinities

* add AppealAffinity model and associations, update migration for new column

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

* add new job, update affinity model validation and after save hook

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

* add return in job if no query results, tests for no query results

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

* remove comment, fix hearing factory, disable some seeds for testing

* add more tests

* test refactor

* update appeals for dist query to add affinity start, add seed file, fix hearing factory, add stat to dist factory

* disable new seed on reset

* update seed file with vet names, add another seed category

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* APPEALS-44959: Modify affinity date checks to use appeal_affinity (#21611)

* swap distribution queries from distribution_task to appeal_affinities

* update seed files to use appeal affinities instead of distribution task

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

* fix user seed, fix date format in distribution task instructions

* fix tests for date format update

* Calvin/APPEALS-44957-rake-affinity (#21577)

* grabbed receipt dates from distributed cases

* refactored for functionality + added method to grab appeals that match

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

* if appeal affinity is nil, it will now be updated

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

* updated start date to receipt date instead of Time.now

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

* APPEALS-46016: Add Affinity Start Date to the Explain Page (#21660)

* add affinity start date to explain page

* add feature test to verify dates display

* update rake task and spec (#21731)

* APPEALS-46325: Add Seeds for AOD Appeals and Update Dates to Match CAVC (#21730)

* add aod hearing cases to ama affinity cases seed

* fix lever spec

* APPEALS-45148: Hook to clear saved affinity date (#21623)

* initial imp. idea

* AC1: check for affinity_start_date on assignment

* AC2/3: update affinity start date  w/ instr.

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

* add case dist lever to new tests (#21776)

* remove unnecessarily included module from job (#21827)

* APPEALS-47211: Improve Performance of Distribution Queries (#21840)

* rework ready_for_distribution scope

* fix non-hearing docket distribution bug

* restart tests

* added null checks for appeal affinity in distribution queries, update tests (#21893)

* add check for appeal being active to distribution and associated slack message (#21902)

* Update users_spec.rb

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* hotfix/APPEALS-45177: TaskTable Default Sorting Fix (#21772)

* Updated the TaskTable component to use the defaultSort property instead of the defaultSortIdx property for queue table since that property is not used anywhere. Added a default sorting hash to the UnassignedCasesPage component and now pass that down to TaskTable. Removed references to defaultSortIdx.

* Added the type column default sort to the AssignedCasesPage widget as well.

* Added a parenthesis for clarity around a boolean. Moved the defaultSortingHash out into a constants file.

---------

Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>

* APPEALS-47106 Caseflow Swagger (#21993)

* Add Rswag and convert existing API documentation (#21778)

* add rswag

* Update Gemfile.lock

* Setup yaml UI

* remove and reroute old swagger files

* update format and servers values

* Update route_docs_controller.rb

* Update cmp_controller.rb

* cmp endpoint yaml

* cmp endpoint to return 501

* CMP endpoint swagger flies

* update swagger files

* adjust server order, add auth token

* cmp parameter name change

* add comments

* Update users_controller.rb

* unit tests and linting

* lint fixes

* Update swagger_helper.rb

* APPEALS-48048 Swagger Updates (#21909)

* update servers to not include a host

* remove host for server

* remove generated swaggers from definitions

* remove internal API endpoints from having generated swagger

* IDT servers fixes

* disable CMP swagger in prod and prodtest

* set authorization correctly

* fix what is required for CMP upload

* fix linting issues, update lint rake task to autocorrect for rubocop, add rubocop make command

* Update decision_reviews.yaml

* Update ama_issues.yaml

* Update vacols_issues.yaml

* Update swagger.yaml

* fix check failures

* Update docs_controller_spec.rb

* fix unit tests

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update rswag_ui.rb

* Update lint.rake

* Update decision_reviews_spec.rb

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update veterans_controller_spec.rb

* feature/APPEALS-43597 RC1.5.1 (#21996)

* APPEALS-36759 Add sms_response_content and sms_response_time notifications table

* APPEALS-37003 First pass at job refactor

* APPEALS-37003 Add comments and update kwargs for va notify service

* APPEALS-37003 Update spec files

* APPEALS-37003 Update spec

* APPEALS-37003 Ensure user in job and create email_enabled method

* APPEALS-37003 Remove question mark

* Limit max retry attempts to 5

* Add ? to boolen return methods

* jcohen/APPEALS-43706 (#21444)

* APPEALS-43706 macros added to each model file for the polymorphic relationship to be setup.

* APPEALS-43706 migration made and yet to be run.

* APPEALS-43706 migrations ran and expected columns and indexes are in table.

* Fix some spec failures unrelated to this branch

* Limit schema diff

* Add a missing tab

* Fix more unrelated failures. Also prevent ACD lever seeds from overwriting spec output

* Fix last unrelated failure.

* APPEALS-43706 linting issues in va_notify_service fixed.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* [APPEALS-43598] Quarterly Notification Job refactoring (#21505)

* Quarterly Notification Job refactoring

* APPEALS-43598 Fix lint issues for QuarterlyNotificationsJob refactor

* APPEALS-43598 Fix db schema.rb file

* APPEALS-43598 Fix schema.rb file

* APPEALS-43598 Refactoring QuarterlyNotificationsJob for readability

* APPEALS-43598 Refactoring QuarterlyNotificationsJob and removing extra methods

* [APPEALS-43598] Update method name

---------

Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-44007: Eliminate Transmission of Notifications to Deceased Veterans (#21481)

* APPEALS-44007: Writing tests to ensure adding the 'failure due to deceased' information is properly set and added to the db

* updates to pr

* pushing changes for tonight

* updating spec file to handle enabling and disabling feature flags

* Update format_message_status

* Lint roll

* fixing conflicts

* Updates to send notification spec

* Fix one of the legacy test cases

* Remove accidental push

* Fix remaining test

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-45235: Remove Temporary PDF Files From tmp Directory After All eFolder Upload Attempts (#21557)

* Cleanup files after uploading to VBMS

* Only delete file if it exists

* Resolve linter issue

* Update specs

* Trigger CodeClimate

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Add appeal alias for notifiable

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications (#21575)

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications

* fixing some errors

* updating factory

* updating tests

* updating tests and factory

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-43596 Adding JobMessageDeletionMiddleware to delete SQS messages for certain jobs

* APPEALS-43596 Adding tests

* APPEALS-43596 Fix codeclimate

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables (#21596)

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables

* pushing changes

* updating tests

* rubocop

* rubocop'n

* deleting repeat constants

* removing file in favor of EVENT_TYPE_FILTERS.json

* removing instances of using VA_NOTIFY_TEMPLATE_NAMES and using EVENT_TYPE_FILTERS instead

* replacing all instances of strings with constants

* fixing bug

* rubocop'n

* rubocop'n

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Clean notification_events after notification report specs finish (#21662)

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-43725: Extract `notify_appellant` Call from `QuaterlyNotificationsJob` to Decrease Runtime (#21643)

* Group notification types as scopes

* Add new job

* Fix typo

* Add back batching

* Batch send messages

* Multithread job queueing

* Reconfigure bulk enqueueing to utilize send_notifications.fifo queue

* Update the comment on QuaterlyNotificationsJob#perform

to adhere to the RDoc standard

* Use constants for template name

* Provide a more descriptive var name

* Remove unused env var

* Fix linting issues

* Prevent error from being thrown early in init job

* Add RDoc comments to appeal_state

* Add rdoc comment to init job

* Add another rdoc comment to the init job

* Use a more specific error class whenever an appeal

cannot be located within the init job

* Add a more specific error to CaseflowJob#enqueue_batch_of_jobs

* Add test for SendNotificationJob.queue_name_suffix

* Update QuarterlyNotificationsJob tests

* Update appeal_state_spec.rb to cover new scopes

* Add spec file for NotificationInitializationJob

* Add CaseflowJob specs

* Add CaseflowJob specs

* Address rubocop issue (by ignoring it)

* Kicking off CodeClimate

* Fix some lint issues

* Freeze constant

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Move spec file to proper location

* APPEALS-43599 (#21696)

* APPEALS-43599 Refactoring SendNotificationJob

* APPEALS-43599 Remove comments

* APPEALS-43599 Suppress code smells from reek

* APPEALS-43599 Suppress code smells from reek

* jcohen/APPEALS-43727 (#21589)

* APPEALS-43727 Branch created. Extracted all the 'when' conditions in the case statement within appellant_notification.rb update_appeal_state method.

* APPEALS-43727 appellant_notification_service is created, logic from crowded method in appellant_notificaion.rb placed in newly created file, allowing redability.

* APPEALS-43727 added logic to appeal_state.rb, appellant_notification.rb updated with less logic, readable code through well named methods.

* APPEALS-43727 commit before merge from teammates work

* APPEALS-43727 removed freeze method on default status hash in appeal_state.rb. removed some rubocop disabling in appellant_notificaion.rb

* APPEALS-43727 extracted more logic from the appellant_notification module and placed it into the appeal_state class. Also got rid of rubocop declarations in app_notif and app_state as well. finally removed feature_toggle calls in appell_notif.

* APPEALS-43727 tests passing, code works

* APPEALS-43727 adding tests to appeal_state_spec to test functionality

* APPEALS-43727 rspec tests in appeal_state.

* APPEALS-43727 tests pass.

* Fixing code climate duplicate code issue

* fixing case statement

* code climate things

* rubocop

* APPEALS-43727 work completed.

* APPEALS-43727 PR comments applied. tests not in a working state.

* APPEALS-43727 PR comments applied. appeal_state_spec in working state.

* APPEALS-43727 PR comments applied. appellant_notification_spec.rb all green.

* Adjust spacing of comments in appeal_state.rb

* Utilize #external_id method over ternary

* Swap or conditional for blank?

* Fix another whitespace gap

* APPEALS-43727 PR comments applied. again after reset.

* APPEALS-43727 PR comments applied. flipped conditionals in appeal_state.rb

* Update app/models/concerns/appeal_concern.rb

* APPEALS-43727 code/test edits

* APPEALS-43727 bulk_task_reasssignment_spec reverted to orginal state, with the exception of an expectation that was on line 98

* APPEALS-43727 lint fix

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-46179 (#21712)

* APPEALS-46179 Create JobExecutionTimes table

* APPEALS-46179 Add comment

* APPEALS-46179 Update schema

* APPEALS-46193 (#21753)

* APPEALS-46193 Add record to JobExecutionTime table when job is performed

* APPEALS-46193 Updating JobExecutionTimes table with an upsert query

* APPEALS-46193 Ignore JobExecutionTimes for certain jobs

* APPEALS-46193 Update ignore_job_execution_time? method

* APPEALS-46193 Adding tests

* Fix lint issues

* Update AWS dependencies

* Rollback gem reduction due to UAT issue

* Alter queue priority

* Forward error in SendNotificationJob

* Allow for notification audit records to remain in ProdTest

* Fix spec

* Fix typo in test fixture's name

* Fix lint infraction related to re-raising exceptions

* Address duplication CC error

* Reenable-privacy-mail-notifications (#21859)

* Add conditional for FOIA and Privacy Act mail

task to receives 'Privacy Act Pending' notifications

* Update spec

* Adjust some specs

* Add missing param

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Remove byebug from spec

* Revert queue tweak

* Remove duplicate method

* APPEALS-47382: Refactor Job Behavior Filtering Boolean Methods (#21898)

* initial commit

* refactoring methods to have constants instead of methods

* adding comments back in

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* APPEALS-48342: Prevent Intentional Retries of SendNotificationJobs in ProdTest from Causing Duplicate Notification Table Entries (#21927)

* initial commit

* rubocop'n

* rubcop'n

* fixing tests

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Resolve missed conflict

* MattT/APPEALS-48514 (#21959)

* Prototype of privacy act fix

* Leave privacy act states intact upon decision mailed

* Remove unused param

* Attempt updating specs to cover new behavior

* Fix attr name typo

* Add missing bang

* Skip reek issue

The issue has been deemed to be minor enough to not warrant having to reinvent everything for now.

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix quarterly specs by add in necessary hearings

* Adjust spacing/ordering of gems (#21978)

* MattT/APPEALS-49085 (#21960)

* Filter out appeals whose hearings have been held from hearing_scheduled scope

* Fix whitespace issues

* Fix failing specs caused by an oversight on my part

* Fix lint issue

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-49212 (#21991)

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add step to NightlySyncsJob to sync hearing dispositions and appeal stateS

* Add comment to new method

* Use constant for disposition type

* Fix typo in accessor

* Add spec for new appeal state action

* Create user in top scope

* Expand nighlty syncs job to check all scheduled hearing disposition types.

No show was left off as we don't have a requirement around it yet.

* Add nightly sync job spec

* Add disp task spec

* Add specs targeting the hearings controller

* Add sync script

* Eager load constants

* Add distinct

* Remove appeal_docketed from being reset

* Add script to adjust ama hearing statuses

* Correct mistype

* Add appeal_type clause

* Fix specs

* Lint fixes

* Flip conditionals in specs

* Fix var name

* Fix var

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Backfill addition to script

* Add AppealState record for newly docketed LegacyAppeals (#21999)

* APPEALS-48966 Adding AppealState record for recently docketed appeals

* APPEALS-48966 Refactor code and add comments

* Delete extraneous files

* Revert to using constants value

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix typo

---------

Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Feature/appeals 43597 release candidate (#22004)

* APPEALS-36759 Add sms_response_content and sms_response_time notifications table

* APPEALS-37003 First pass at job refactor

* APPEALS-37003 Add comments and update kwargs for va notify service

* APPEALS-37003 Update spec files

* APPEALS-37003 Update spec

* APPEALS-37003 Ensure user in job and create email_enabled method

* APPEALS-37003 Remove question mark

* Limit max retry attempts to 5

* Add ? to boolen return methods

* jcohen/APPEALS-43706 (#21444)

* APPEALS-43706 macros added to each model file for the polymorphic relationship to be setup.

* APPEALS-43706 migration made and yet to be run.

* APPEALS-43706 migrations ran and expected columns and indexes are in table.

* Fix some spec failures unrelated to this branch

* Limit schema diff

* Add a missing tab

* Fix more unrelated failures. Also prevent ACD lever seeds from overwriting spec output

* Fix last unrelated failure.

* APPEALS-43706 linting issues in va_notify_service fixed.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* [APPEALS-43598] Quarterly Notification Job refactoring (#21505)

* Quarterly Notification Job refactoring

* APPEALS-43598 Fix lint issues for QuarterlyNotificationsJob refactor

* APPEALS-43598 Fix db schema.rb file

* APPEALS-43598 Fix schema.rb file

* APPEALS-43598 Refactoring QuarterlyNotificationsJob for readability

* APPEALS-43598 Refactoring QuarterlyNotificationsJob and removing extra methods

* [APPEALS-43598] Update method name

---------

Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-44007: Eliminate Transmission of Notifications to Deceased Veterans (#21481)

* APPEALS-44007: Writing tests to ensure adding the 'failure due to deceased' information is properly set and added to the db

* updates to pr

* pushing changes for tonight

* updating spec file to handle enabling and disabling feature flags

* Update format_message_status

* Lint roll

* fixing conflicts

* Updates to send notification spec

* Fix one of the legacy test cases

* Remove accidental push

* Fix remaining test

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-45235: Remove Temporary PDF Files From tmp Directory After All eFolder Upload Attempts (#21557)

* Cleanup files after uploading to VBMS

* Only delete file if it exists

* Resolve linter issue

* Update specs

* Trigger CodeClimate

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Add appeal alias for notifiable

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications (#21575)

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications

* fixing some errors

* updating factory

* updating tests

* updating tests and factory

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-43596 Adding JobMessageDeletionMiddleware to delete SQS messages for certain jobs

* APPEALS-43596 Adding tests

* APPEALS-43596 Fix codeclimate

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables (#21596)

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables

* pushing changes

* updating tests

* rubocop

* rubocop'n

* deleting repeat constants

* removing file in favor of EVENT_TYPE_FILTERS.json

* removing instances of using VA_NOTIFY_TEMPLATE_NAMES and using EVENT_TYPE_FILTERS instead

* replacing all instances of strings with constants

* fixing bug

* rubocop'n

* rubocop'n

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Clean notification_events after notification report specs finish (#21662)

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-43725: Extract `notify_appellant` Call from `QuaterlyNotificationsJob` to Decrease Runtime (#21643)

* Group notification types as scopes

* Add new job

* Fix typo

* Add back batching

* Batch send messages

* Multithread job queueing

* Reconfigure bulk enqueueing to utilize send_notifications.fifo queue

* Update the comment on QuaterlyNotificationsJob#perform

to adhere to the RDoc standard

* Use constants for template name

* Provide a more descriptive var name

* Remove unused env var

* Fix linting issues

* Prevent error from being thrown early in init job

* Add RDoc comments to appeal_state

* Add rdoc comment to init job

* Add another rdoc comment to the init job

* Use a more specific error class whenever an appeal

cannot be located within the init job

* Add a more specific error to CaseflowJob#enqueue_batch_of_jobs

* Add test for SendNotificationJob.queue_name_suffix

* Update QuarterlyNotificationsJob tests

* Update appeal_state_spec.rb to cover new scopes

* Add spec file for NotificationInitializationJob

* Add CaseflowJob specs

* Add CaseflowJob specs

* Address rubocop issue (by ignoring it)

* Kicking off CodeClimate

* Fix some lint issues

* Freeze constant

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Move spec file to proper location

* APPEALS-43599 (#21696)

* APPEALS-43599 Refactoring SendNotificationJob

* APPEALS-43599 Remove comments

* APPEALS-43599 Suppress code smells from reek

* APPEALS-43599 Suppress code smells from reek

* jcohen/APPEALS-43727 (#21589)

* APPEALS-43727 Branch created. Extracted all the 'when' conditions in the case statement within appellant_notification.rb update_appeal_state method.

* APPEALS-43727 appellant_notification_service is created, logic from crowded method in appellant_notificaion.rb placed in newly created file, allowing redability.

* APPEALS-43727 added logic to appeal_state.rb, appellant_notification.rb updated with less logic, readable code through well named methods.

* APPEALS-43727 commit before merge from teammates work

* APPEALS-43727 removed freeze method on default status hash in appeal_state.rb. removed some rubocop disabling in appellant_notificaion.rb

* APPEALS-43727 extracted more logic from the appellant_notification module and placed it into the appeal_state class. Also got rid of rubocop declarations in app_notif and app_state as well. finally removed feature_toggle calls in appell_notif.

* APPEALS-43727 tests passing, code works

* APPEALS-43727 adding tests to appeal_state_spec to test functionality

* APPEALS-43727 rspec tests in appeal_state.

* APPEALS-43727 tests pass.

* Fixing code climate duplicate code issue

* fixing case statement

* code climate things

* rubocop

* APPEALS-43727 work completed.

* APPEALS-43727 PR comments applied. tests not in a working state.

* APPEALS-43727 PR comments applied. appeal_state_spec in working state.

* APPEALS-43727 PR comments applied. appellant_notification_spec.rb all green.

* Adjust spacing of comments in appeal_state.rb

* Utilize #external_id method over ternary

* Swap or conditional for blank?

* Fix another whitespace gap

* APPEALS-43727 PR comments applied. again after reset.

* APPEALS-43727 PR comments applied. flipped conditionals in appeal_state.rb

* Update app/models/concerns/appeal_concern.rb

* APPEALS-43727 code/test edits

* APPEALS-43727 bulk_task_reasssignment_spec reverted to orginal state, with the exception of an expectation that was on line 98

* APPEALS-43727 lint fix

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-46179 (#21712)

* APPEALS-46179 Create JobExecutionTimes table

* APPEALS-46179 Add comment

* APPEALS-46179 Update schema

* APPEALS-46193 (#21753)

* APPEALS-46193 Add record to JobExecutionTime table when job is performed

* APPEALS-46193 Updating JobExecutionTimes table with an upsert query

* APPEALS-46193 Ignore JobExecutionTimes for certain jobs

* APPEALS-46193 Update ignore_job_execution_time? method

* APPEALS-46193 Adding tests

* Fix lint issues

* Update AWS dependencies

* Rollback gem reduction due to UAT issue

* Alter queue priority

* Forward error in SendNotificationJob

* Allow for notification audit records to remain in ProdTest

* Fix spec

* Fix typo in test fixture's name

* Fix lint infraction related to re-raising exceptions

* Address duplication CC error

* Reenable-privacy-mail-notifications (#21859)

* Add conditional for FOIA and Privacy Act mail

task to receives 'Privacy Act Pending' notifications

* Update spec

* Adjust some specs

* Add missing param

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Remove byebug from spec

* Revert queue tweak

* Remove duplicate method

* APPEALS-47382: Refactor Job Behavior Filtering Boolean Methods (#21898)

* initial commit

* refactoring methods to have constants instead of methods

* adding comments back in

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* APPEALS-48342: Prevent Intentional Retries of SendNotificationJobs in ProdTest from Causing Duplicate Notification Table Entries (#21927)

* initial commit

* rubocop'n

* rubcop'n

* fixing tests

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Resolve missed conflict

* MattT/APPEALS-48514 (#21959)

* Prototype of privacy act fix

* Leave privacy act states intact upon decision mailed

* Remove unused param

* Attempt updating specs to cover new behavior

* Fix attr name typo

* Add missing bang

* Skip reek issue

The issue has been deemed to be minor enough to not warrant having to reinvent everything for now.

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix quarterly specs by add in necessary hearings

* Adjust spacing/ordering of gems (#21978)

* MattT/APPEALS-49085 (#21960)

* Filter out appeals whose hearings have been held from hearing_scheduled scope

* Fix whitespace issues

* Fix failing specs caused by an oversight on my part

* Fix lint issue

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-49212 (#21991)

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add step to NightlySyncsJob to sync hearing dispositions and appeal stateS

* Add comment to new method

* Use constant for disposition type

* Fix typo in accessor

* Add spec for new appeal state action

* Create user in top scope

* Expand nighlty syncs job to check all scheduled hearing disposition types.

No show was left off as we don't have a requirement around it yet.

* Add nightly sync job spec

* Add disp task spec

* Add specs targeting the hearings controller

* Add sync script

* Eager load constants

* Add distinct

* Remove appeal_docketed from being reset

* Add script to adjust ama hearing statuses

* Correct mistype

* Add appeal_type clause

* Fix specs

* Lint fixes

* Flip conditionals in specs

* Fix var name

* Fix var

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Backfill addition to script

* Add AppealState record for newly docketed LegacyAppeals (#21999)

* APPEALS-48966 Adding AppealState record for recently docketed appeals

* APPEALS-48966 Refactor code and add comments

* Delete extraneous files

* Revert to using constants value

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix typo

* Fix typo

* Fix seed script

* Fix seed script

* Ensure cleanup

* Change copy for Appeal Docketed status (#22006)

* Change copy for Appeal Docketed status

* Change case

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Use status text value instead of key

---------

Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-44916 seed data update (#22008)

* APPEALS-44956: Add AppealAffinity model and database table (#21526)

* add migration for appeal_affinities

* add AppealAffinity model and associations, update migration for new column

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

* add new job, update affinity model validation and after save hook

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

* add return in job if no query results, tests for no query results

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

* remove comment, fix hearing factory, disable some seeds for testing

* add more tests

* test refactor

* update appeals for dist query to add affinity start, add seed file, fix hearing factory, add stat to dist factory

* disable new seed on reset

* update seed file with vet names, add another seed category

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* APPEALS-44959: Modify affinity date checks to use appeal_affinity (#21611)

* swap distribution queries from distribution_task to appeal_affinities

* update seed files to use appeal affinities instead of distribution task

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

* fix user seed, fix date format in distribution task instructions

* fix tests for date format update

* Calvin/APPEALS-44957-rake-affinity (#21577)

* grabbed receipt dates from distributed cases

* refactored for functionality + added method to grab appeals that match

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

* if appeal affinity is nil, it will now be updated

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

* updated start date to receipt date instead of Time.now

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

* APPEALS-46016: Add Affinity Start Date to the Explain Page (#21660)

* add affinity start date to explain page

* add feature test to verify dates display

* update rake task and spec (#21731)

* APPEALS-46325: Add Seeds for AOD Appeals and Update Dates to Match CAVC (#21730)

* add aod hearing cases to ama affinity cases seed

* fix lever spec

* APPEALS-45148: Hook to clear saved affinity date (#21623)

* initial imp. idea

* AC1: check for affinity_start_date on assignment

* AC2/3: update affinity start date  w/ instr.

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

* add case dist lever to new tests (#21776)

* remove unnecessarily included module from job (#21827)

* APPEALS-47211: Improve Performance of Distribution Queries (#21840)

* rework ready_for_distribution scope

* fix non-hearing docket distribution bug

* restart tests

* added null checks for appeal affinity in distribution queries, update tests (#21893)

* add check for appeal being active to distribution and associated slack message (#21902)

* prelim work on 48033

* refactored code a bit, working on data creation now

* created ama_affinity data

* fixing mispelt variable

* add back line that was removed

* updated users_spec to now pass

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: Calvin <Calvin.Costa@va.gov>

* fixed merge conflict

---------

Co-authored-by: alex-guanipatin <143651918+alex-guanipatin@users.noreply.github.com>
Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>
Co-authored-by: slwallerBAH <161883271+slwallerBAH@users.noreply.github.com>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Matt Roth <roth_matthew@bah.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: Calvin <Calvin.Costa@va.gov>

* Revert "APPEALS-46087 fix css table width issues for case distribution lever history table (#22024)"

This reverts commit 05896d32fa0510bf76101dff689ad05187dc7ccf.

* Add unit testing around push priority distributions with Docket Levers (#22078)

Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-50756: Fix for Appeals Ready to Distribute Query includes dates that are NA (#22090)

* APPEALS-50756 fix appeals ready for distribution csv report to exclude place holder dates for non priority appeals

* fix linting issues of feature branch

* fix rubocop offenses from feature branch

* APPEALS-50756 updated login in ama rows method

* APPEALS-50756 fix lint issues

* APPEALS-50756 The Appeals Ready to Distribute Query includes dates that are NA (#22183)

* APPEALS-50756 fix appeals ready for distribution csv report to exclude place holder dates for non priority appeals

* fix linting issues of feature branch

* fix rubocop offenses from feature branch

* APPEALS-50756 updated login in ama rows method

* AP…
AdamShawBAH pushed a commit that referenced this pull request Aug 23, 2024
* Hotfix/appeals 45 2 (#22198)

* Trigger Build

* Update email address from Hearings to Decisions

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>

* APPEALS-46269: Remove the ability to enable proportions code (#22499)

* remove conditional for selecting distribution algorithm

* fix tests which broke when removing the toggle

* Feature/appeals 42187 (#22522)

* cmartine/APPEALS-42621 (#21599)

* Add remove_comp_and_pen_intake feature toggle to intakes controller

* Add new compensation and pension removal message to COPY.json

* Disable comp and pen radio buttons if remove_comp_and_pen_intake toggle is on

* Frontend test updates

* Add tooltip checks for review page integration tests

* fix frontend test lint errors

* frontend tests changes

* Fix linter errors

---------

Co-authored-by: kshiflett88 <kodishiflett@gmail.com>
Co-authored-by: root <root@DESKTOP-IBDKNPF>

* nrithner/APPEALS-45263 (#21617)

* Add remove_comp_and_pen_intake feature toggle to intakes controller

* Add new compensation and pension removal message to COPY.json

* Disable comp and pen radio buttons if remove_comp_and_pen_intake toggle is on

* Frontend test updates

* Add tooltip checks for review page integration tests

* fix frontend test lint errors

* frontend tests changes

* Add banner for non-vha

* Add banner for VHA employee

* Refactor conditionals

* Refactor logic for banners to display

* Add dangerouslySetHtml to banner

* Add test for no VHA employee

with vha_claim_review_establishment disabled.

* Add VHA employee scenario to display REMOVE_INTAKE_COMP_AND_PEN

* Complete non vha user scenarios

* Complete VHA employee scenarios

* Remove comments

* Fix linter errors

* Remove spaces preceding question marks

* Correct linting errors

---------

Co-authored-by: Chris-Martine <christopher.martine@va.gov>
Co-authored-by: kshiflett88 <kodishiflett@gmail.com>
Co-authored-by: root <root@DESKTOP-IBDKNPF>

---------

Co-authored-by: Chris-Martine <135330019+Chris-Martine@users.noreply.github.com>
Co-authored-by: kshiflett88 <kodishiflett@gmail.com>
Co-authored-by: root <root@DESKTOP-IBDKNPF>
Co-authored-by: nicorithner-bah <148365039+nicorithner-bah@users.noreply.github.com>
Co-authored-by: Chris-Martine <christopher.martine@va.gov>

* Feature/appeals 51138.rc.4.3.0 (#22523)

* APPEALS-36339 (#21436)

* Updated to remove obsolete levers of ACD Disable Legacy Distributions and ACD Disable Non-priority Distributions

* Fixed redundant linting issue

* Fixed empty line linting issue

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* mbeard/APPEALS-44379 (#21451)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44417 Seeds for Docket Lever Demo (#21534)

Co-authored-by: Christopher Detlef <>

* APPEALS-36345-updated (#21537)

* Refactored exclusion table

* Fixed ordering issue and testing

* mbeard/APPEALS-44379 (#21530)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

* first new commit with new args

* updates methods and test query

* updates age_of_oldest methods params

* cleans up method removes args and updates tests, fixes linting

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44346 Demo Docket Goal Lever Test Seed Data (#21524)

Co-authored-by: Christopher Detlef <>

* Chrisbdetlef/appeals 40705 (#21535)

* Chris backend Work

* APPEALS-44441. Added initial changes for individual seed

* WIP

* APPEALS-44441. Fixed the table css

* APPEALS-44441. Added Custom and Scenario Seed components and jest tests

* APPEALS-44441. Fix ScenarioSeeds jest test

* APPEALS-44441. Fix CustomeSeeds Jest test

* init commit

* fixes linting issues

* capybara test init

* APPEALS-44441. Backend Integration API changes

* APPEALS-44441_1. Matched the constant keys in the backend

* APPEALS-44441_1. Update the param to match the backend and fixed spec

* APPEALS-44441. lint fixes

* APPEALS-44441. linting fixes

* sharsha/APPEALS-44441. fixed the route and tests

* Change route

* Change variables to match front and back end

* CustomSeed Jest test fix

* Fix issues

* Fix rubocop issues

* Use existing method in the controller

---------

Co-authored-by: Christopher Detlef <>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Michael Beard <michael.beard@va.gov>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 (#21566)

* Fixed rspec failures on constants

* APPEALS-45531. Remove dead code

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Updated lever history to handle null unit values from docket levers (#21567)

Co-authored-by: 631966 <amy.detwiler@va.gov>

* Sharsha/appeals 45531_1 (#21573)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 1 (#21609)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

* TEST FOR FIX

* MORE TESTING

* Fixed rspec issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45502. Organize route and fix the controller (#21595)

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Ricky/APPEALS-36345.fixes (#21612)

* Updated lever history to handle null unit values from docket levers

* Updated member view of exclusion table with proper text display and fixed missing css

* Updated unit test and test data to test rendering of exclusionTable

---------

Co-authored-by: 631966 <amy.detwiler@va.gov>

* ricky/APPEALS-44053 (#21587)

* init commit, adds conditional to check for docket_type ama to method, fixes json constants to snakecase

* puts statements testing

* updates seeds for evidence_submission, adds method to hearing_request_docket.rb and dist_concern.rb

* updated appeals dsit

* final fix for PR

* updates spec to reflect changes in hearing_request_docket

* uncomments seeds

* Ricky/appeals 43523 (#21649)

* Added Assignment Queue link to Switch Users test page

* Updated controller to validate role and redirect

* Updated error information

* Updated rspec tests

---------

Co-authored-by: 631068 <rickybmanus@gmail.com>

* APPEALS-45898. Updated the lever_group_order values (#21639)

* APPEALS-45898. Updated the lever_group_order values

* APPEALS-45898. Updated order of the evidence submission priority and non-priority

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-40646 (#21645)

* Init commit

* adds methods and useffect first pass

* fixes isIdle warning

* removes important from scss

* refined handleToggleChange method

* updates font color for h4

* adds keys to the td and fixed proptype for loadAcdExcludeFromAffinity in casedistributionapp

* Chrisbdetlef/appeals 43117.cleanup (#21671)

* APPEALS-43421: Attorney Selection Sticking on Dropdown after Assignment (#21401)

* redo init commit

* updated imp. logic

* attorney widget fix

---------

Co-authored-by: Calvin <Calvin.Costa@va.gov>

* Add ruby CE API Gem

* remove correspondence changes from schema.rb (#21468)

* Revert "Add ruby CE API Gem" (#21479)

This reverts commit c78afe30620716d59d2ac31ad6eed71585d78a98.

* Override SCT Bulk Assign Page task limit (#21465)

* Override SCT Bulk Assign Queue 15 case limit & Adjust SCT attorney assign task action label

* feature/APPEALS-35707-29633-29632 (prodtest) (#21485)

* 🔀 Squash merge AlecK/APPEALS-35707 - Replace `database_cleaner` with `database_cleaner-active_record`

* 🔀 Squash merge jcroteau/APPEALS-29632-fix-deprecation-action-view-base-instances

* 🔀 Squash merge jcroteau/APPEALS-29633-fix-deprecation-warning-active_record-result-to_hash

* feature/APPEALS-44871 Steps for installing node in the Caseflow demo environment  (#21483) (#21484)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Revert "feature/APPEALS-44871 Steps for installing node in the Caseflow demo …" (#21489)

This reverts commit a6262001f9bedabca60598c82bfe1b803f0f16c7.

* Sbashamoni/appeals 44871 node14 demo fixes (#21490) (#21495)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* add error rules to demo builds (#21496) (#21498)

Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>

* APPEALS-43117 Add QA Users for testing

* Fix rspecs

* Fix issues with attorneys and judge teams

* Fix org count

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: youfoundmanesh <maneshreddy.kommidi@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>
Co-authored-by: Christopher Detlef <>

* Minor fixes (#21694)

* Minor fixes

* Fix rspec tests and properly check for judge css id

* Fix lint issue

---------

Co-authored-by: Christopher Detlef <>

* Fix Legacy Case issues (#21747)

Co-authored-by: Christopher Detlef <>

* APPEALS-46037. Fix padding in the lever history table (#21725)

* APPEALS-46037. Fix padding in the lever history table

* APPEALS-46037. Fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Fix Lauren Roth issue (#21813)

* Users with a VACOLS::Staff entry no longer get created with the default name of Lauren Roth

Co-authored-by: Christopher Detlef <>

* ricky/APPEALS-44044 (#21814)

* first pass at legacy_docket method and spec

* second iteration of legacy_docket and spec

* adds method to age_of_oldest methods and updates test scenarios

* Updated testing and expanded method missing logic

* Updated legacy_docket_spec file and tests

* Updated boolean logic, updated rspecs and factories

* Updated rspec tests to include factories

* updates docket_spec line 317 and factory for disable_ama_non_priority_direct_review

---------

Co-authored-by: Michael Beard <michael.beard@va.gov>

* updates ready_priority_nonpriority_appeals to public_send, updates test (#21844)

* APPEALS-36333 first iteration of docket time goal and prior to goal (#21523)

* APPEALS-36333 first iteration of docket time goal and prior to goal

* APPEALS-36333 address pr comments and moved the logic to docket model

* APPEALS-36333 Added specs for docket and hearing request docket models

* refactored code and moved it to distribution scopes

* APPEALS-36333 address pr comments and refactor code

* APPEALS-43996 updated lever name in all the required files to fix spec failures

* APPEALS-44000 revert hearing request docket model changes to keept it in sync with feature

* APPEALS-44000 updated hearing request docket model specs

* APPEALS-44000 fixed jest tests

* APPEALS-44000 fixed broken rspecs

* APPEALS-43996 fix rubocop warnings

* APPEALS-43996 fix push priority job spec failures

* APPEALS-43996 Updated case distribution lever and docker model and refactor specs

* APPEALS-43996 added rake task to update case distribution lever item in db

* APPEALS-43996 update docket model to handle the scenario when the lever being disabled by a user via the UI

* APPEALS-43996 update section title

* APPEALS-43996 revert rake task

* APPEALS-43996 add new factories to case distribution lever and fix spec failures

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks (#21834)

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks

* APPEALS-45191. Refactor and fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* refactor the logic and fix docket spec failures

* changed the call times to 3 times

* APPEALS-36333 fixed the docket time goal to check the existence of the item before using the public send to get the value

---------

Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: 631966 <amy.detwiler@va.gov>

* updated the seeds to align with the work completed

* Updated Toggle Switch behavior when clicked while idle (#21874)

* Csv research (#21892)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

* csv and etc

* CSS for buttons

* jest tests for the reducer and action types

* Jest test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-46057. CleanUP (#21914)

* more jest tests

* Disable scenario seeds

* Lint fixes

* APPEALS-46057. disable all scenario seeds

* APPEALS-46057. Refactor the TestSeed wrapper to be a functional component and fixed jest test

* APPEALS-46057. Jest job in GHA complaining on test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* updates line of test to correctly build lever item (#21918)

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45191. Updated the query to return the date based on the calculation (#21928)

* APPEALS-45191. Updated the query to return the date based on the calculation

* APPEALS-45191. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisharsha/appeals 43962 (#21929)

* Sharsha/appeals-44911_1 (#21784)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisbdetlef/appeals 44910 (#21838)

* Initial

* Add JSON parsing and multiple calls to rake tasks

* Pre-caby tets

* Add capybara tests and add IDs to buttons

---------

Co-authored-by: Christopher Detlef <>

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: cdetlefva <133903625+cdetlefva@users.noreply.github.com>

* APPEALS-43962. Lint fixes (#21932)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Ricky/APPEALS-47293 (#21925)

* First pass implementation of fixing seeding rspecs

* Second pass at fixing errors in rspecs

* Revert updates to test if rspec passes

* Fixed linting issues in test_docket_seeds_controller_spec

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-48292 updated the column to be a string (#21954)

* APPEALS-48292 updated the column to be a string

* APPEALS-48292 added comment to the control_group field in the migration

* APPEALS-48292 added column comment to the schema, changed migration so that it can be rolled back

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false (#21948)

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false

* APPEALS-49004 added spec to check when Start Distribution Prior to Docket Time Goal toggle is on

* APPEALS-49004 fixed lint issues in docket.rb

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query (#21949)

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query

* APPEALS-48898. Renamed the column and update the method

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-49100. getting value from the start_distribution_prior_to_goal (#21968)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-46257 (#21976)

* updates routes and frontend urls to namespace

* removes superfluous <a> tags

* Ensure that legacy appeals are being created (#21981)

* Ensure that legacy appeals are being created

* Remove puts

---------

Co-authored-by: Christopher Detlef <>

* APPEALS-49403. Added buttons Docket Lever Seed (#21989)

* APPEALS-49403. Added buttons Docket Lever Seed

* sharsha/APPEALS-49403. Updated the endpoint URL path

* APPEALS-49403. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-44000 added check to skip priority appeals in docket model (#21992)

* Feature/appeals 36234 masterupgrade (#22003)

* sbashamoni/APPEALS-43724 Node 16 version upgrade changes (#21966) (#21975)

* Update node verstion to 16 in git workflow

* Update node verstion to 16 in nvm and dockerfile for demo

* Update node version in yarn.lock and package.json and .nvmrc file

* Update node's version path to node16 in docker-bin/env.sh

* Update and upgrade to node16 in client

* More updates to yarn.lock and package.json

* Fix tests by Adam Shaw

* Upadate snapshot for ScheduleVeteran.test.js.snap

* Doing some code clean up

* Doiing some more clean up

* Add and remove spaces to match master

* One more space to take care of

* One more space to take care of again

* One more space to take care of again

---------

Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* init master merge branch

---------

Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* Remove AOD trait from non-priority legacy appeal creation (#22013)

Co-authored-by: Christopher Detlef <>

* Sharsha/appeals 49461 (#22018)

* sharsha/APPEALS-49461. initial commit

* sharsha/APPEALS-49461. fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49421 (#22014)

* init commit fixes ama_np_ capybara test to expect user as admin, and first attempt  test_docket_seeds test

* removes previous chane for TASKS_LOADED

* fixes capybara for test seeds controller button ids

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-49403. Updated the buttons label (#22025)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49585 (#22020)

* init commit for non member view input

* fixes css issue for docket-lever-right

* Added a hyphen between value and unit for member only view

* replaces hyphen with comma

* Init commit replaces th with div for 508 compliance (#22036)

* Chrisbdetlef/appeals 47008 1 (#22040)

* Allow judges to see legacy cases and attorneys to be assigned cases

* Remove testing function

* Update spec to reflect new user count in seed file

---------

Co-authored-by: Christopher Detlef <>

* got rid of extraneous file

* got rid of yarn lock orig

* APPEALS-50734. Remove Legacy appeals from the query (#22071)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-46087 fix css table width issues for case distribution lever history table (#22024)

* Feature/appeals 36234.merge master.20240701 (#22075)

* APPEALS-47277 remove Vegas office (#21876)

* APPEALS-47277 remove Vagas office

* Removed Texas ID from other files and updated tests

* Snapshot update

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* hotfix/APPEALS-22403 (#21942)

* add identifier for filenumber or ssn in filenumber search

* linting

* codeclimate linting

* update match call to return boolean

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* APPEALS-46907: Update to Determination of Gen Pop Legacy Cases (#21986)

* Isaiah/merge 46910 (#21983)

* removed BFHINES checks and modified tests

* removed lingering bfhines test

* modified test

* most recent updates on tests for passing status

* removed refs to cavc updates

* Skip flaky test ro_viewhearsched_spec

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* APPEALS-44916: Case Distribution Affinity Calculations (#21899)

* APPEALS-44956: Add AppealAffinity model and database table (#21526)

* add migration for appeal_affinities

* add AppealAffinity model and associations, update migration for new column

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

* add new job, update affinity model validation and after save hook

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

* add return in job if no query results, tests for no query results

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

* remove comment, fix hearing factory, disable some seeds for testing

* add more tests

* test refactor

* update appeals for dist query to add affinity start, add seed file, fix hearing factory, add stat to dist factory

* disable new seed on reset

* update seed file with vet names, add another seed category

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* APPEALS-44959: Modify affinity date checks to use appeal_affinity (#21611)

* swap distribution queries from distribution_task to appeal_affinities

* update seed files to use appeal affinities instead of distribution task

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

* fix user seed, fix date format in distribution task instructions

* fix tests for date format update

* Calvin/APPEALS-44957-rake-affinity (#21577)

* grabbed receipt dates from distributed cases

* refactored for functionality + added method to grab appeals that match

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

* if appeal affinity is nil, it will now be updated

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

* updated start date to receipt date instead of Time.now

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

* APPEALS-46016: Add Affinity Start Date to the Explain Page (#21660)

* add affinity start date to explain page

* add feature test to verify dates display

* update rake task and spec (#21731)

* APPEALS-46325: Add Seeds for AOD Appeals and Update Dates to Match CAVC (#21730)

* add aod hearing cases to ama affinity cases seed

* fix lever spec

* APPEALS-45148: Hook to clear saved affinity date (#21623)

* initial imp. idea

* AC1: check for affinity_start_date on assignment

* AC2/3: update affinity start date  w/ instr.

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

* add case dist lever to new tests (#21776)

* remove unnecessarily included module from job (#21827)

* APPEALS-47211: Improve Performance of Distribution Queries (#21840)

* rework ready_for_distribution scope

* fix non-hearing docket distribution bug

* restart tests

* added null checks for appeal affinity in distribution queries, update tests (#21893)

* add check for appeal being active to distribution and associated slack message (#21902)

* Update users_spec.rb

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* hotfix/APPEALS-45177: TaskTable Default Sorting Fix (#21772)

* Updated the TaskTable component to use the defaultSort property instead of the defaultSortIdx property for queue table since that property is not used anywhere. Added a default sorting hash to the UnassignedCasesPage component and now pass that down to TaskTable. Removed references to defaultSortIdx.

* Added the type column default sort to the AssignedCasesPage widget as well.

* Added a parenthesis for clarity around a boolean. Moved the defaultSortingHash out into a constants file.

---------

Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>

* APPEALS-47106 Caseflow Swagger (#21993)

* Add Rswag and convert existing API documentation (#21778)

* add rswag

* Update Gemfile.lock

* Setup yaml UI

* remove and reroute old swagger files

* update format and servers values

* Update route_docs_controller.rb

* Update cmp_controller.rb

* cmp endpoint yaml

* cmp endpoint to return 501

* CMP endpoint swagger flies

* update swagger files

* adjust server order, add auth token

* cmp parameter name change

* add comments

* Update users_controller.rb

* unit tests and linting

* lint fixes

* Update swagger_helper.rb

* APPEALS-48048 Swagger Updates (#21909)

* update servers to not include a host

* remove host for server

* remove generated swaggers from definitions

* remove internal API endpoints from having generated swagger

* IDT servers fixes

* disable CMP swagger in prod and prodtest

* set authorization correctly

* fix what is required for CMP upload

* fix linting issues, update lint rake task to autocorrect for rubocop, add rubocop make command

* Update decision_reviews.yaml

* Update ama_issues.yaml

* Update vacols_issues.yaml

* Update swagger.yaml

* fix check failures

* Update docs_controller_spec.rb

* fix unit tests

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update rswag_ui.rb

* Update lint.rake

* Update decision_reviews_spec.rb

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update veterans_controller_spec.rb

* feature/APPEALS-43597 RC1.5.1 (#21996)

* APPEALS-36759 Add sms_response_content and sms_response_time notifications table

* APPEALS-37003 First pass at job refactor

* APPEALS-37003 Add comments and update kwargs for va notify service

* APPEALS-37003 Update spec files

* APPEALS-37003 Update spec

* APPEALS-37003 Ensure user in job and create email_enabled method

* APPEALS-37003 Remove question mark

* Limit max retry attempts to 5

* Add ? to boolen return methods

* jcohen/APPEALS-43706 (#21444)

* APPEALS-43706 macros added to each model file for the polymorphic relationship to be setup.

* APPEALS-43706 migration made and yet to be run.

* APPEALS-43706 migrations ran and expected columns and indexes are in table.

* Fix some spec failures unrelated to this branch

* Limit schema diff

* Add a missing tab

* Fix more unrelated failures. Also prevent ACD lever seeds from overwriting spec output

* Fix last unrelated failure.

* APPEALS-43706 linting issues in va_notify_service fixed.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* [APPEALS-43598] Quarterly Notification Job refactoring (#21505)

* Quarterly Notification Job refactoring

* APPEALS-43598 Fix lint issues for QuarterlyNotificationsJob refactor

* APPEALS-43598 Fix db schema.rb file

* APPEALS-43598 Fix schema.rb file

* APPEALS-43598 Refactoring QuarterlyNotificationsJob for readability

* APPEALS-43598 Refactoring QuarterlyNotificationsJob and removing extra methods

* [APPEALS-43598] Update method name

---------

Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-44007: Eliminate Transmission of Notifications to Deceased Veterans (#21481)

* APPEALS-44007: Writing tests to ensure adding the 'failure due to deceased' information is properly set and added to the db

* updates to pr

* pushing changes for tonight

* updating spec file to handle enabling and disabling feature flags

* Update format_message_status

* Lint roll

* fixing conflicts

* Updates to send notification spec

* Fix one of the legacy test cases

* Remove accidental push

* Fix remaining test

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-45235: Remove Temporary PDF Files From tmp Directory After All eFolder Upload Attempts (#21557)

* Cleanup files after uploading to VBMS

* Only delete file if it exists

* Resolve linter issue

* Update specs

* Trigger CodeClimate

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Add appeal alias for notifiable

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications (#21575)

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications

* fixing some errors

* updating factory

* updating tests

* updating tests and factory

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-43596 Adding JobMessageDeletionMiddleware to delete SQS messages for certain jobs

* APPEALS-43596 Adding tests

* APPEALS-43596 Fix codeclimate

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables (#21596)

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables

* pushing changes

* updating tests

* rubocop

* rubocop'n

* deleting repeat constants

* removing file in favor of EVENT_TYPE_FILTERS.json

* removing instances of using VA_NOTIFY_TEMPLATE_NAMES and using EVENT_TYPE_FILTERS instead

* replacing all instances of strings with constants

* fixing bug

* rubocop'n

* rubocop'n

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Clean notification_events after notification report specs finish (#21662)

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-43725: Extract `notify_appellant` Call from `QuaterlyNotificationsJob` to Decrease Runtime (#21643)

* Group notification types as scopes

* Add new job

* Fix typo

* Add back batching

* Batch send messages

* Multithread job queueing

* Reconfigure bulk enqueueing to utilize send_notifications.fifo queue

* Update the comment on QuaterlyNotificationsJob#perform

to adhere to the RDoc standard

* Use constants for template name

* Provide a more descriptive var name

* Remove unused env var

* Fix linting issues

* Prevent error from being thrown early in init job

* Add RDoc comments to appeal_state

* Add rdoc comment to init job

* Add another rdoc comment to the init job

* Use a more specific error class whenever an appeal

cannot be located within the init job

* Add a more specific error to CaseflowJob#enqueue_batch_of_jobs

* Add test for SendNotificationJob.queue_name_suffix

* Update QuarterlyNotificationsJob tests

* Update appeal_state_spec.rb to cover new scopes

* Add spec file for NotificationInitializationJob

* Add CaseflowJob specs

* Add CaseflowJob specs

* Address rubocop issue (by ignoring it)

* Kicking off CodeClimate

* Fix some lint issues

* Freeze constant

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Move spec file to proper location

* APPEALS-43599 (#21696)

* APPEALS-43599 Refactoring SendNotificationJob

* APPEALS-43599 Remove comments

* APPEALS-43599 Suppress code smells from reek

* APPEALS-43599 Suppress code smells from reek

* jcohen/APPEALS-43727 (#21589)

* APPEALS-43727 Branch created. Extracted all the 'when' conditions in the case statement within appellant_notification.rb update_appeal_state method.

* APPEALS-43727 appellant_notification_service is created, logic from crowded method in appellant_notificaion.rb placed in newly created file, allowing redability.

* APPEALS-43727 added logic to appeal_state.rb, appellant_notification.rb updated with less logic, readable code through well named methods.

* APPEALS-43727 commit before merge from teammates work

* APPEALS-43727 removed freeze method on default status hash in appeal_state.rb. removed some rubocop disabling in appellant_notificaion.rb

* APPEALS-43727 extracted more logic from the appellant_notification module and placed it into the appeal_state class. Also got rid of rubocop declarations in app_notif and app_state as well. finally removed feature_toggle calls in appell_notif.

* APPEALS-43727 tests passing, code works

* APPEALS-43727 adding tests to appeal_state_spec to test functionality

* APPEALS-43727 rspec tests in appeal_state.

* APPEALS-43727 tests pass.

* Fixing code climate duplicate code issue

* fixing case statement

* code climate things

* rubocop

* APPEALS-43727 work completed.

* APPEALS-43727 PR comments applied. tests not in a working state.

* APPEALS-43727 PR comments applied. appeal_state_spec in working state.

* APPEALS-43727 PR comments applied. appellant_notification_spec.rb all green.

* Adjust spacing of comments in appeal_state.rb

* Utilize #external_id method over ternary

* Swap or conditional for blank?

* Fix another whitespace gap

* APPEALS-43727 PR comments applied. again after reset.

* APPEALS-43727 PR comments applied. flipped conditionals in appeal_state.rb

* Update app/models/concerns/appeal_concern.rb

* APPEALS-43727 code/test edits

* APPEALS-43727 bulk_task_reasssignment_spec reverted to orginal state, with the exception of an expectation that was on line 98

* APPEALS-43727 lint fix

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-46179 (#21712)

* APPEALS-46179 Create JobExecutionTimes table

* APPEALS-46179 Add comment

* APPEALS-46179 Update schema

* APPEALS-46193 (#21753)

* APPEALS-46193 Add record to JobExecutionTime table when job is performed

* APPEALS-46193 Updating JobExecutionTimes table with an upsert query

* APPEALS-46193 Ignore JobExecutionTimes for certain jobs

* APPEALS-46193 Update ignore_job_execution_time? method

* APPEALS-46193 Adding tests

* Fix lint issues

* Update AWS dependencies

* Rollback gem reduction due to UAT issue

* Alter queue priority

* Forward error in SendNotificationJob

* Allow for notification audit records to remain in ProdTest

* Fix spec

* Fix typo in test fixture's name

* Fix lint infraction related to re-raising exceptions

* Address duplication CC error

* Reenable-privacy-mail-notifications (#21859)

* Add conditional for FOIA and Privacy Act mail

task to receives 'Privacy Act Pending' notifications

* Update spec

* Adjust some specs

* Add missing param

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Remove byebug from spec

* Revert queue tweak

* Remove duplicate method

* APPEALS-47382: Refactor Job Behavior Filtering Boolean Methods (#21898)

* initial commit

* refactoring methods to have constants instead of methods

* adding comments back in

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* APPEALS-48342: Prevent Intentional Retries of SendNotificationJobs in ProdTest from Causing Duplicate Notification Table Entries (#21927)

* initial commit

* rubocop'n

* rubcop'n

* fixing tests

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Resolve missed conflict

* MattT/APPEALS-48514 (#21959)

* Prototype of privacy act fix

* Leave privacy act states intact upon decision mailed

* Remove unused param

* Attempt updating specs to cover new behavior

* Fix attr name typo

* Add missing bang

* Skip reek issue

The issue has been deemed to be minor enough to not warrant having to reinvent everything for now.

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix quarterly specs by add in necessary hearings

* Adjust spacing/ordering of gems (#21978)

* MattT/APPEALS-49085 (#21960)

* Filter out appeals whose hearings have been held from hearing_scheduled scope

* Fix whitespace issues

* Fix failing specs caused by an oversight on my part

* Fix lint issue

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-49212 (#21991)

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add step to NightlySyncsJob to sync hearing dispositions and appeal stateS

* Add comment to new method

* Use constant for disposition type

* Fix typo in accessor

* Add spec for new appeal state action

* Create user in top scope

* Expand nighlty syncs job to check all scheduled hearing disposition types.

No show was left off as we don't have a requirement around it yet.

* Add nightly sync job spec

* Add disp task spec

* Add specs targeting the hearings controller

* Add sync script

* Eager load constants

* Add distinct

* Remove appeal_docketed from being reset

* Add script to adjust ama hearing statuses

* Correct mistype

* Add appeal_type clause

* Fix specs

* Lint fixes

* Flip conditionals in specs

* Fix var name

* Fix var

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Backfill addition to script

* Add AppealState record for newly docketed LegacyAppeals (#21999)

* APPEALS-48966 Adding AppealState record for recently docketed appeals

* APPEALS-48966 Refactor code and add comments

* Delete extraneous files

* Revert to using constants value

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix typo

---------

Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Feature/appeals 43597 release candidate (#22004)

* APPEALS-36759 Add sms_response_content and sms_response_time notifications table

* APPEALS-37003 First pass at job refactor

* APPEALS-37003 Add comments and update kwargs for va notify service

* APPEALS-37003 Update spec files

* APPEALS-37003 Update spec

* APPEALS-37003 Ensure user in job and create email_enabled method

* APPEALS-37003 Remove question mark

* Limit max retry attempts to 5

* Add ? to boolen return methods

* jcohen/APPEALS-43706 (#21444)

* APPEALS-43706 macros added to each model file for the polymorphic relationship to be setup.

* APPEALS-43706 migration made and yet to be run.

* APPEALS-43706 migrations ran and expected columns and indexes are in table.

* Fix some spec failures unrelated to this branch

* Limit schema diff

* Add a missing tab

* Fix more unrelated failures. Also prevent ACD lever seeds from overwriting spec output

* Fix last unrelated failure.

* APPEALS-43706 linting issues in va_notify_service fixed.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* [APPEALS-43598] Quarterly Notification Job refactoring (#21505)

* Quarterly Notification Job refactoring

* APPEALS-43598 Fix lint issues for QuarterlyNotificationsJob refactor

* APPEALS-43598 Fix db schema.rb file

* APPEALS-43598 Fix schema.rb file

* APPEALS-43598 Refactoring QuarterlyNotificationsJob for readability

* APPEALS-43598 Refactoring QuarterlyNotificationsJob and removing extra methods

* [APPEALS-43598] Update method name

---------

Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-44007: Eliminate Transmission of Notifications to Deceased Veterans (#21481)

* APPEALS-44007: Writing tests to ensure adding the 'failure due to deceased' information is properly set and added to the db

* updates to pr

* pushing changes for tonight

* updating spec file to handle enabling and disabling feature flags

* Update format_message_status

* Lint roll

* fixing conflicts

* Updates to send notification spec

* Fix one of the legacy test cases

* Remove accidental push

* Fix remaining test

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-45235: Remove Temporary PDF Files From tmp Directory After All eFolder Upload Attempts (#21557)

* Cleanup files after uploading to VBMS

* Only delete file if it exists

* Resolve linter issue

* Update specs

* Trigger CodeClimate

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Add appeal alias for notifiable

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications (#21575)

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications

* fixing some errors

* updating factory

* updating tests

* updating tests and factory

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-43596 Adding JobMessageDeletionMiddleware to delete SQS messages for certain jobs

* APPEALS-43596 Adding tests

* APPEALS-43596 Fix codeclimate

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables (#21596)

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables

* pushing changes

* updating tests

* rubocop

* rubocop'n

* deleting repeat constants

* removing file in favor of EVENT_TYPE_FILTERS.json

* removing instances of using VA_NOTIFY_TEMPLATE_NAMES and using EVENT_TYPE_FILTERS instead

* replacing all instances of strings with constants

* fixing bug

* rubocop'n

* rubocop'n

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Clean notification_events after notification report specs finish (#21662)

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-43725: Extract `notify_appellant` Call from `QuaterlyNotificationsJob` to Decrease Runtime (#21643)

* Group notification types as scopes

* Add new job

* Fix typo

* Add back batching

* Batch send messages

* Multithread job queueing

* Reconfigure bulk enqueueing to utilize send_notifications.fifo queue

* Update the comment on QuaterlyNotificationsJob#perform

to adhere to the RDoc standard

* Use constants for template name

* Provide a more descriptive var name

* Remove unused env var

* Fix linting issues

* Prevent error from being thrown early in init job

* Add RDoc comments to appeal_state

* Add rdoc comment to init job

* Add another rdoc comment to the init job

* Use a more specific error class whenever an appeal

cannot be located within the init job

* Add a more specific error to CaseflowJob#enqueue_batch_of_jobs

* Add test for SendNotificationJob.queue_name_suffix

* Update QuarterlyNotificationsJob tests

* Update appeal_state_spec.rb to cover new scopes

* Add spec file for NotificationInitializationJob

* Add CaseflowJob specs

* Add CaseflowJob specs

* Address rubocop issue (by ignoring it)

* Kicking off CodeClimate

* Fix some lint issues

* Freeze constant

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Move spec file to proper location

* APPEALS-43599 (#21696)

* APPEALS-43599 Refactoring SendNotificationJob

* APPEALS-43599 Remove comments

* APPEALS-43599 Suppress code smells from reek

* APPEALS-43599 Suppress code smells from reek

* jcohen/APPEALS-43727 (#21589)

* APPEALS-43727 Branch created. Extracted all the 'when' conditions in the case statement within appellant_notification.rb update_appeal_state method.

* APPEALS-43727 appellant_notification_service is created, logic from crowded method in appellant_notificaion.rb placed in newly created file, allowing redability.

* APPEALS-43727 added logic to appeal_state.rb, appellant_notification.rb updated with less logic, readable code through well named methods.

* APPEALS-43727 commit before merge from teammates work

* APPEALS-43727 removed freeze method on default status hash in appeal_state.rb. removed some rubocop disabling in appellant_notificaion.rb

* APPEALS-43727 extracted more logic from the appellant_notification module and placed it into the appeal_state class. Also got rid of rubocop declarations in app_notif and app_state as well. finally removed feature_toggle calls in appell_notif.

* APPEALS-43727 tests passing, code works

* APPEALS-43727 adding tests to appeal_state_spec to test functionality

* APPEALS-43727 rspec tests in appeal_state.

* APPEALS-43727 tests pass.

* Fixing code climate duplicate code issue

* fixing case statement

* code climate things

* rubocop

* APPEALS-43727 work completed.

* APPEALS-43727 PR comments applied. tests not in a working state.

* APPEALS-43727 PR comments applied. appeal_state_spec in working state.

* APPEALS-43727 PR comments applied. appellant_notification_spec.rb all green.

* Adjust spacing of comments in appeal_state.rb

* Utilize #external_id method over ternary

* Swap or conditional for blank?

* Fix another whitespace gap

* APPEALS-43727 PR comments applied. again after reset.

* APPEALS-43727 PR comments applied. flipped conditionals in appeal_state.rb

* Update app/models/concerns/appeal_concern.rb

* APPEALS-43727 code/test edits

* APPEALS-43727 bulk_task_reasssignment_spec reverted to orginal state, with the exception of an expectation that was on line 98

* APPEALS-43727 lint fix

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-46179 (#21712)

* APPEALS-46179 Create JobExecutionTimes table

* APPEALS-46179 Add comment

* APPEALS-46179 Update schema

* APPEALS-46193 (#21753)

* APPEALS-46193 Add record to JobExecutionTime table when job is performed

* APPEALS-46193 Updating JobExecutionTimes table with an upsert query

* APPEALS-46193 Ignore JobExecutionTimes for certain jobs

* APPEALS-46193 Update ignore_job_execution_time? method

* APPEALS-46193 Adding tests

* Fix lint issues

* Update AWS dependencies

* Rollback gem reduction due to UAT issue

* Alter queue priority

* Forward error in SendNotificationJob

* Allow for notification audit records to remain in ProdTest

* Fix spec

* Fix typo in test fixture's name

* Fix lint infraction related to re-raising exceptions

* Address duplication CC error

* Reenable-privacy-mail-notifications (#21859)

* Add conditional for FOIA and Privacy Act mail

task to receives 'Privacy Act Pending' notifications

* Update spec

* Adjust some specs

* Add missing param

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Remove byebug from spec

* Revert queue tweak

* Remove duplicate method

* APPEALS-47382: Refactor Job Behavior Filtering Boolean Methods (#21898)

* initial commit

* refactoring methods to have constants instead of methods

* adding comments back in

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* APPEALS-48342: Prevent Intentional Retries of SendNotificationJobs in ProdTest from Causing Duplicate Notification Table Entries (#21927)

* initial commit

* rubocop'n

* rubcop'n

* fixing tests

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Resolve missed conflict

* MattT/APPEALS-48514 (#21959)

* Prototype of privacy act fix

* Leave privacy act states intact upon decision mailed

* Remove unused param

* Attempt updating specs to cover new behavior

* Fix attr name typo

* Add missing bang

* Skip reek issue

The issue has been deemed to be minor enough to not warrant having to reinvent everything for now.

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix quarterly specs by add in necessary hearings

* Adjust spacing/ordering of gems (#21978)

* MattT/APPEALS-49085 (#21960)

* Filter out appeals whose hearings have been held from hearing_scheduled scope

* Fix whitespace issues

* Fix failing specs caused by an oversight on my part

* Fix lint issue

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-49212 (#21991)

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add step to NightlySyncsJob to sync hearing dispositions and appeal stateS

* Add comment to new method

* Use constant for disposition type

* Fix typo in accessor

* Add spec for new appeal state action

* Create user in top scope

* Expand nighlty syncs job to check all scheduled hearing disposition types.

No show was left off as we don't have a requirement around it yet.

* Add nightly sync job spec

* Add disp task spec

* Add specs targeting the hearings controller

* Add sync script

* Eager load constants

* Add distinct

* Remove appeal_docketed from being reset

* Add script to adjust ama hearing statuses

* Correct mistype

* Add appeal_type clause

* Fix specs

* Lint fixes

* Flip conditionals in specs

* Fix var name

* Fix var

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Backfill addition to script

* Add AppealState record for newly docketed LegacyAppeals (#21999)

* APPEALS-48966 Adding AppealState record for recently docketed appeals

* APPEALS-48966 Refactor code and add comments

* Delete extraneous files

* Revert to using constants value

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix typo

* Fix typo

* Fix seed script

* Fix seed script

* Ensure cleanup

* Change copy for Appeal Docketed status (#22006)

* Change copy for Appeal Docketed status

* Change case

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Use status text value instead of key

---------

Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-44916 seed data update (#22008)

* APPEALS-44956: Add AppealAffinity model and database table (#21526)

* add migration for appeal_affinities

* add AppealAffinity model and associations, update migration for new column

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

* add new job, update affinity model validation and after save hook

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

* add return in job if no query results, tests for no query results

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

* remove comment, fix hearing factory, disable some seeds for testing

* add more tests

* test refactor

* update appeals for dist query to add affinity start, add seed file, fix hearing factory, add stat to dist factory

* disable new seed on reset

* update seed file with vet names, add another seed category

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* APPEALS-44959: Modify affinity date checks to use appeal_affinity (#21611)

* swap distribution queries from distribution_task to appeal_affinities

* update seed files to use appeal affinities instead of distribution task

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

* fix user seed, fix date format in distribution task instructions

* fix tests for date format update

* Calvin/APPEALS-44957-rake-affinity (#21577)

* grabbed receipt dates from distributed cases

* refactored for functionality + added method to grab appeals that match

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

* if appeal affinity is nil, it will now be updated

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

* updated start date to receipt date instead of Time.now

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

* APPEALS-46016: Add Affinity Start Date to the Explain Page (#21660)

* add affinity start date to explain page

* add feature test to verify dates display

* update rake task and spec (#21731)

* APPEALS-46325: Add Seeds for AOD Appeals and Update Dates to Match CAVC (#21730)

* add aod hearing cases to ama affinity cases seed

* fix lever spec

* APPEALS-45148: Hook to clear saved affinity date (#21623)

* initial imp. idea

* AC1: check for affinity_start_date on assignment

* AC2/3: update affinity start date  w/ instr.

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

* add case dist lever to new tests (#21776)

* remove unnecessarily included module from job (#21827)

* APPEALS-47211: Improve Performance of Distribution Queries (#21840)

* rework ready_for_distribution scope

* fix non-hearing docket distribution bug

* restart tests

* added null checks for appeal affinity in distribution queries, update tests (#21893)

* add check for appeal being active to distribution and associated slack message (#21902)

* prelim work on 48033

* refactored code a bit, working on data creation now

* created ama_affinity data

* fixing mispelt variable

* add back line that was removed

* updated users_spec to now pass

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: Calvin <Calvin.Costa@va.gov>

* fixed merge conflict

---------

Co-authored-by: alex-guanipatin <143651918+alex-guanipatin@users.noreply.github.com>
Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>
Co-authored-by: slwallerBAH <161883271+slwallerBAH@users.noreply.github.com>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Matt Roth <roth_matthew@bah.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: Calvin <Calvin.Costa@va.gov>

* Revert "APPEALS-46087 fix css table width issues for case distribution lever history table (#22024)"

This reverts commit 05896d32fa0510bf76101dff689ad05187dc7ccf.

* Add unit testing around push priority distributions with Docket Levers (#22078)

Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-50756: Fix for Appeals Ready to Distribute Query includes dates that are NA (#22090)

* APPEALS-50756 fix appeals ready for distribution csv report to exclude place holder dates for non priority appeals

* fix linting issues of feature branch

* fix rubocop offenses from feature branch

* APPEALS-50756 updated login in ama rows method

* APPEALS-50756 fix lint issues

* APPEALS-50756 The Appeals Ready to Distribute Query includes dates that are NA (#22183)

* APPEALS-50756 fix appeals ready for distribution csv report to exclude place holder dates for non priority appeals

* fix linting issues of feature branch

* fix rubocop offenses from feature branch

* APPEALS-50756 updated login in ama rows method

* AP…
Rnmarshall93 pushed a commit that referenced this pull request Aug 23, 2024
* Hotfix/appeals 45 2 (#22198)

* Trigger Build

* Update email address from Hearings to Decisions

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>

* APPEALS-46269: Remove the ability to enable proportions code (#22499)

* remove conditional for selecting distribution algorithm

* fix tests which broke when removing the toggle

* Feature/appeals 42187 (#22522)

* cmartine/APPEALS-42621 (#21599)

* Add remove_comp_and_pen_intake feature toggle to intakes controller

* Add new compensation and pension removal message to COPY.json

* Disable comp and pen radio buttons if remove_comp_and_pen_intake toggle is on

* Frontend test updates

* Add tooltip checks for review page integration tests

* fix frontend test lint errors

* frontend tests changes

* Fix linter errors

---------

Co-authored-by: kshiflett88 <kodishiflett@gmail.com>
Co-authored-by: root <root@DESKTOP-IBDKNPF>

* nrithner/APPEALS-45263 (#21617)

* Add remove_comp_and_pen_intake feature toggle to intakes controller

* Add new compensation and pension removal message to COPY.json

* Disable comp and pen radio buttons if remove_comp_and_pen_intake toggle is on

* Frontend test updates

* Add tooltip checks for review page integration tests

* fix frontend test lint errors

* frontend tests changes

* Add banner for non-vha

* Add banner for VHA employee

* Refactor conditionals

* Refactor logic for banners to display

* Add dangerouslySetHtml to banner

* Add test for no VHA employee

with vha_claim_review_establishment disabled.

* Add VHA employee scenario to display REMOVE_INTAKE_COMP_AND_PEN

* Complete non vha user scenarios

* Complete VHA employee scenarios

* Remove comments

* Fix linter errors

* Remove spaces preceding question marks

* Correct linting errors

---------

Co-authored-by: Chris-Martine <christopher.martine@va.gov>
Co-authored-by: kshiflett88 <kodishiflett@gmail.com>
Co-authored-by: root <root@DESKTOP-IBDKNPF>

---------

Co-authored-by: Chris-Martine <135330019+Chris-Martine@users.noreply.github.com>
Co-authored-by: kshiflett88 <kodishiflett@gmail.com>
Co-authored-by: root <root@DESKTOP-IBDKNPF>
Co-authored-by: nicorithner-bah <148365039+nicorithner-bah@users.noreply.github.com>
Co-authored-by: Chris-Martine <christopher.martine@va.gov>

* Feature/appeals 51138.rc.4.3.0 (#22523)

* APPEALS-36339 (#21436)

* Updated to remove obsolete levers of ACD Disable Legacy Distributions and ACD Disable Non-priority Distributions

* Fixed redundant linting issue

* Fixed empty line linting issue

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* mbeard/APPEALS-44379 (#21451)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44417 Seeds for Docket Lever Demo (#21534)

Co-authored-by: Christopher Detlef <>

* APPEALS-36345-updated (#21537)

* Refactored exclusion table

* Fixed ordering issue and testing

* mbeard/APPEALS-44379 (#21530)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

* first new commit with new args

* updates methods and test query

* updates age_of_oldest methods params

* cleans up method removes args and updates tests, fixes linting

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44346 Demo Docket Goal Lever Test Seed Data (#21524)

Co-authored-by: Christopher Detlef <>

* Chrisbdetlef/appeals 40705 (#21535)

* Chris backend Work

* APPEALS-44441. Added initial changes for individual seed

* WIP

* APPEALS-44441. Fixed the table css

* APPEALS-44441. Added Custom and Scenario Seed components and jest tests

* APPEALS-44441. Fix ScenarioSeeds jest test

* APPEALS-44441. Fix CustomeSeeds Jest test

* init commit

* fixes linting issues

* capybara test init

* APPEALS-44441. Backend Integration API changes

* APPEALS-44441_1. Matched the constant keys in the backend

* APPEALS-44441_1. Update the param to match the backend and fixed spec

* APPEALS-44441. lint fixes

* APPEALS-44441. linting fixes

* sharsha/APPEALS-44441. fixed the route and tests

* Change route

* Change variables to match front and back end

* CustomSeed Jest test fix

* Fix issues

* Fix rubocop issues

* Use existing method in the controller

---------

Co-authored-by: Christopher Detlef <>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Michael Beard <michael.beard@va.gov>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 (#21566)

* Fixed rspec failures on constants

* APPEALS-45531. Remove dead code

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Updated lever history to handle null unit values from docket levers (#21567)

Co-authored-by: 631966 <amy.detwiler@va.gov>

* Sharsha/appeals 45531_1 (#21573)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 1 (#21609)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

* TEST FOR FIX

* MORE TESTING

* Fixed rspec issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45502. Organize route and fix the controller (#21595)

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Ricky/APPEALS-36345.fixes (#21612)

* Updated lever history to handle null unit values from docket levers

* Updated member view of exclusion table with proper text display and fixed missing css

* Updated unit test and test data to test rendering of exclusionTable

---------

Co-authored-by: 631966 <amy.detwiler@va.gov>

* ricky/APPEALS-44053 (#21587)

* init commit, adds conditional to check for docket_type ama to method, fixes json constants to snakecase

* puts statements testing

* updates seeds for evidence_submission, adds method to hearing_request_docket.rb and dist_concern.rb

* updated appeals dsit

* final fix for PR

* updates spec to reflect changes in hearing_request_docket

* uncomments seeds

* Ricky/appeals 43523 (#21649)

* Added Assignment Queue link to Switch Users test page

* Updated controller to validate role and redirect

* Updated error information

* Updated rspec tests

---------

Co-authored-by: 631068 <rickybmanus@gmail.com>

* APPEALS-45898. Updated the lever_group_order values (#21639)

* APPEALS-45898. Updated the lever_group_order values

* APPEALS-45898. Updated order of the evidence submission priority and non-priority

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-40646 (#21645)

* Init commit

* adds methods and useffect first pass

* fixes isIdle warning

* removes important from scss

* refined handleToggleChange method

* updates font color for h4

* adds keys to the td and fixed proptype for loadAcdExcludeFromAffinity in casedistributionapp

* Chrisbdetlef/appeals 43117.cleanup (#21671)

* APPEALS-43421: Attorney Selection Sticking on Dropdown after Assignment (#21401)

* redo init commit

* updated imp. logic

* attorney widget fix

---------

Co-authored-by: Calvin <Calvin.Costa@va.gov>

* Add ruby CE API Gem

* remove correspondence changes from schema.rb (#21468)

* Revert "Add ruby CE API Gem" (#21479)

This reverts commit c78afe30620716d59d2ac31ad6eed71585d78a98.

* Override SCT Bulk Assign Page task limit (#21465)

* Override SCT Bulk Assign Queue 15 case limit & Adjust SCT attorney assign task action label

* feature/APPEALS-35707-29633-29632 (prodtest) (#21485)

* 🔀 Squash merge AlecK/APPEALS-35707 - Replace `database_cleaner` with `database_cleaner-active_record`

* 🔀 Squash merge jcroteau/APPEALS-29632-fix-deprecation-action-view-base-instances

* 🔀 Squash merge jcroteau/APPEALS-29633-fix-deprecation-warning-active_record-result-to_hash

* feature/APPEALS-44871 Steps for installing node in the Caseflow demo environment  (#21483) (#21484)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Revert "feature/APPEALS-44871 Steps for installing node in the Caseflow demo …" (#21489)

This reverts commit a6262001f9bedabca60598c82bfe1b803f0f16c7.

* Sbashamoni/appeals 44871 node14 demo fixes (#21490) (#21495)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* add error rules to demo builds (#21496) (#21498)

Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>

* APPEALS-43117 Add QA Users for testing

* Fix rspecs

* Fix issues with attorneys and judge teams

* Fix org count

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: youfoundmanesh <maneshreddy.kommidi@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>
Co-authored-by: Christopher Detlef <>

* Minor fixes (#21694)

* Minor fixes

* Fix rspec tests and properly check for judge css id

* Fix lint issue

---------

Co-authored-by: Christopher Detlef <>

* Fix Legacy Case issues (#21747)

Co-authored-by: Christopher Detlef <>

* APPEALS-46037. Fix padding in the lever history table (#21725)

* APPEALS-46037. Fix padding in the lever history table

* APPEALS-46037. Fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Fix Lauren Roth issue (#21813)

* Users with a VACOLS::Staff entry no longer get created with the default name of Lauren Roth

Co-authored-by: Christopher Detlef <>

* ricky/APPEALS-44044 (#21814)

* first pass at legacy_docket method and spec

* second iteration of legacy_docket and spec

* adds method to age_of_oldest methods and updates test scenarios

* Updated testing and expanded method missing logic

* Updated legacy_docket_spec file and tests

* Updated boolean logic, updated rspecs and factories

* Updated rspec tests to include factories

* updates docket_spec line 317 and factory for disable_ama_non_priority_direct_review

---------

Co-authored-by: Michael Beard <michael.beard@va.gov>

* updates ready_priority_nonpriority_appeals to public_send, updates test (#21844)

* APPEALS-36333 first iteration of docket time goal and prior to goal (#21523)

* APPEALS-36333 first iteration of docket time goal and prior to goal

* APPEALS-36333 address pr comments and moved the logic to docket model

* APPEALS-36333 Added specs for docket and hearing request docket models

* refactored code and moved it to distribution scopes

* APPEALS-36333 address pr comments and refactor code

* APPEALS-43996 updated lever name in all the required files to fix spec failures

* APPEALS-44000 revert hearing request docket model changes to keept it in sync with feature

* APPEALS-44000 updated hearing request docket model specs

* APPEALS-44000 fixed jest tests

* APPEALS-44000 fixed broken rspecs

* APPEALS-43996 fix rubocop warnings

* APPEALS-43996 fix push priority job spec failures

* APPEALS-43996 Updated case distribution lever and docker model and refactor specs

* APPEALS-43996 added rake task to update case distribution lever item in db

* APPEALS-43996 update docket model to handle the scenario when the lever being disabled by a user via the UI

* APPEALS-43996 update section title

* APPEALS-43996 revert rake task

* APPEALS-43996 add new factories to case distribution lever and fix spec failures

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks (#21834)

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks

* APPEALS-45191. Refactor and fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* refactor the logic and fix docket spec failures

* changed the call times to 3 times

* APPEALS-36333 fixed the docket time goal to check the existence of the item before using the public send to get the value

---------

Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: 631966 <amy.detwiler@va.gov>

* updated the seeds to align with the work completed

* Updated Toggle Switch behavior when clicked while idle (#21874)

* Csv research (#21892)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

* csv and etc

* CSS for buttons

* jest tests for the reducer and action types

* Jest test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-46057. CleanUP (#21914)

* more jest tests

* Disable scenario seeds

* Lint fixes

* APPEALS-46057. disable all scenario seeds

* APPEALS-46057. Refactor the TestSeed wrapper to be a functional component and fixed jest test

* APPEALS-46057. Jest job in GHA complaining on test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* updates line of test to correctly build lever item (#21918)

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45191. Updated the query to return the date based on the calculation (#21928)

* APPEALS-45191. Updated the query to return the date based on the calculation

* APPEALS-45191. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisharsha/appeals 43962 (#21929)

* Sharsha/appeals-44911_1 (#21784)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisbdetlef/appeals 44910 (#21838)

* Initial

* Add JSON parsing and multiple calls to rake tasks

* Pre-caby tets

* Add capybara tests and add IDs to buttons

---------

Co-authored-by: Christopher Detlef <>

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: cdetlefva <133903625+cdetlefva@users.noreply.github.com>

* APPEALS-43962. Lint fixes (#21932)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Ricky/APPEALS-47293 (#21925)

* First pass implementation of fixing seeding rspecs

* Second pass at fixing errors in rspecs

* Revert updates to test if rspec passes

* Fixed linting issues in test_docket_seeds_controller_spec

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-48292 updated the column to be a string (#21954)

* APPEALS-48292 updated the column to be a string

* APPEALS-48292 added comment to the control_group field in the migration

* APPEALS-48292 added column comment to the schema, changed migration so that it can be rolled back

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false (#21948)

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false

* APPEALS-49004 added spec to check when Start Distribution Prior to Docket Time Goal toggle is on

* APPEALS-49004 fixed lint issues in docket.rb

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query (#21949)

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query

* APPEALS-48898. Renamed the column and update the method

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-49100. getting value from the start_distribution_prior_to_goal (#21968)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-46257 (#21976)

* updates routes and frontend urls to namespace

* removes superfluous <a> tags

* Ensure that legacy appeals are being created (#21981)

* Ensure that legacy appeals are being created

* Remove puts

---------

Co-authored-by: Christopher Detlef <>

* APPEALS-49403. Added buttons Docket Lever Seed (#21989)

* APPEALS-49403. Added buttons Docket Lever Seed

* sharsha/APPEALS-49403. Updated the endpoint URL path

* APPEALS-49403. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-44000 added check to skip priority appeals in docket model (#21992)

* Feature/appeals 36234 masterupgrade (#22003)

* sbashamoni/APPEALS-43724 Node 16 version upgrade changes (#21966) (#21975)

* Update node verstion to 16 in git workflow

* Update node verstion to 16 in nvm and dockerfile for demo

* Update node version in yarn.lock and package.json and .nvmrc file

* Update node's version path to node16 in docker-bin/env.sh

* Update and upgrade to node16 in client

* More updates to yarn.lock and package.json

* Fix tests by Adam Shaw

* Upadate snapshot for ScheduleVeteran.test.js.snap

* Doing some code clean up

* Doiing some more clean up

* Add and remove spaces to match master

* One more space to take care of

* One more space to take care of again

* One more space to take care of again

---------

Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* init master merge branch

---------

Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* Remove AOD trait from non-priority legacy appeal creation (#22013)

Co-authored-by: Christopher Detlef <>

* Sharsha/appeals 49461 (#22018)

* sharsha/APPEALS-49461. initial commit

* sharsha/APPEALS-49461. fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49421 (#22014)

* init commit fixes ama_np_ capybara test to expect user as admin, and first attempt  test_docket_seeds test

* removes previous chane for TASKS_LOADED

* fixes capybara for test seeds controller button ids

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-49403. Updated the buttons label (#22025)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49585 (#22020)

* init commit for non member view input

* fixes css issue for docket-lever-right

* Added a hyphen between value and unit for member only view

* replaces hyphen with comma

* Init commit replaces th with div for 508 compliance (#22036)

* Chrisbdetlef/appeals 47008 1 (#22040)

* Allow judges to see legacy cases and attorneys to be assigned cases

* Remove testing function

* Update spec to reflect new user count in seed file

---------

Co-authored-by: Christopher Detlef <>

* got rid of extraneous file

* got rid of yarn lock orig

* APPEALS-50734. Remove Legacy appeals from the query (#22071)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-46087 fix css table width issues for case distribution lever history table (#22024)

* Feature/appeals 36234.merge master.20240701 (#22075)

* APPEALS-47277 remove Vegas office (#21876)

* APPEALS-47277 remove Vagas office

* Removed Texas ID from other files and updated tests

* Snapshot update

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* hotfix/APPEALS-22403 (#21942)

* add identifier for filenumber or ssn in filenumber search

* linting

* codeclimate linting

* update match call to return boolean

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* APPEALS-46907: Update to Determination of Gen Pop Legacy Cases (#21986)

* Isaiah/merge 46910 (#21983)

* removed BFHINES checks and modified tests

* removed lingering bfhines test

* modified test

* most recent updates on tests for passing status

* removed refs to cavc updates

* Skip flaky test ro_viewhearsched_spec

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* APPEALS-44916: Case Distribution Affinity Calculations (#21899)

* APPEALS-44956: Add AppealAffinity model and database table (#21526)

* add migration for appeal_affinities

* add AppealAffinity model and associations, update migration for new column

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

* add new job, update affinity model validation and after save hook

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

* add return in job if no query results, tests for no query results

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

* remove comment, fix hearing factory, disable some seeds for testing

* add more tests

* test refactor

* update appeals for dist query to add affinity start, add seed file, fix hearing factory, add stat to dist factory

* disable new seed on reset

* update seed file with vet names, add another seed category

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* APPEALS-44959: Modify affinity date checks to use appeal_affinity (#21611)

* swap distribution queries from distribution_task to appeal_affinities

* update seed files to use appeal affinities instead of distribution task

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

* fix user seed, fix date format in distribution task instructions

* fix tests for date format update

* Calvin/APPEALS-44957-rake-affinity (#21577)

* grabbed receipt dates from distributed cases

* refactored for functionality + added method to grab appeals that match

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

* if appeal affinity is nil, it will now be updated

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

* updated start date to receipt date instead of Time.now

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

* APPEALS-46016: Add Affinity Start Date to the Explain Page (#21660)

* add affinity start date to explain page

* add feature test to verify dates display

* update rake task and spec (#21731)

* APPEALS-46325: Add Seeds for AOD Appeals and Update Dates to Match CAVC (#21730)

* add aod hearing cases to ama affinity cases seed

* fix lever spec

* APPEALS-45148: Hook to clear saved affinity date (#21623)

* initial imp. idea

* AC1: check for affinity_start_date on assignment

* AC2/3: update affinity start date  w/ instr.

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

* add case dist lever to new tests (#21776)

* remove unnecessarily included module from job (#21827)

* APPEALS-47211: Improve Performance of Distribution Queries (#21840)

* rework ready_for_distribution scope

* fix non-hearing docket distribution bug

* restart tests

* added null checks for appeal affinity in distribution queries, update tests (#21893)

* add check for appeal being active to distribution and associated slack message (#21902)

* Update users_spec.rb

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* hotfix/APPEALS-45177: TaskTable Default Sorting Fix (#21772)

* Updated the TaskTable component to use the defaultSort property instead of the defaultSortIdx property for queue table since that property is not used anywhere. Added a default sorting hash to the UnassignedCasesPage component and now pass that down to TaskTable. Removed references to defaultSortIdx.

* Added the type column default sort to the AssignedCasesPage widget as well.

* Added a parenthesis for clarity around a boolean. Moved the defaultSortingHash out into a constants file.

---------

Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>

* APPEALS-47106 Caseflow Swagger (#21993)

* Add Rswag and convert existing API documentation (#21778)

* add rswag

* Update Gemfile.lock

* Setup yaml UI

* remove and reroute old swagger files

* update format and servers values

* Update route_docs_controller.rb

* Update cmp_controller.rb

* cmp endpoint yaml

* cmp endpoint to return 501

* CMP endpoint swagger flies

* update swagger files

* adjust server order, add auth token

* cmp parameter name change

* add comments

* Update users_controller.rb

* unit tests and linting

* lint fixes

* Update swagger_helper.rb

* APPEALS-48048 Swagger Updates (#21909)

* update servers to not include a host

* remove host for server

* remove generated swaggers from definitions

* remove internal API endpoints from having generated swagger

* IDT servers fixes

* disable CMP swagger in prod and prodtest

* set authorization correctly

* fix what is required for CMP upload

* fix linting issues, update lint rake task to autocorrect for rubocop, add rubocop make command

* Update decision_reviews.yaml

* Update ama_issues.yaml

* Update vacols_issues.yaml

* Update swagger.yaml

* fix check failures

* Update docs_controller_spec.rb

* fix unit tests

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update rswag_ui.rb

* Update lint.rake

* Update decision_reviews_spec.rb

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update veterans_controller_spec.rb

* feature/APPEALS-43597 RC1.5.1 (#21996)

* APPEALS-36759 Add sms_response_content and sms_response_time notifications table

* APPEALS-37003 First pass at job refactor

* APPEALS-37003 Add comments and update kwargs for va notify service

* APPEALS-37003 Update spec files

* APPEALS-37003 Update spec

* APPEALS-37003 Ensure user in job and create email_enabled method

* APPEALS-37003 Remove question mark

* Limit max retry attempts to 5

* Add ? to boolen return methods

* jcohen/APPEALS-43706 (#21444)

* APPEALS-43706 macros added to each model file for the polymorphic relationship to be setup.

* APPEALS-43706 migration made and yet to be run.

* APPEALS-43706 migrations ran and expected columns and indexes are in table.

* Fix some spec failures unrelated to this branch

* Limit schema diff

* Add a missing tab

* Fix more unrelated failures. Also prevent ACD lever seeds from overwriting spec output

* Fix last unrelated failure.

* APPEALS-43706 linting issues in va_notify_service fixed.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* [APPEALS-43598] Quarterly Notification Job refactoring (#21505)

* Quarterly Notification Job refactoring

* APPEALS-43598 Fix lint issues for QuarterlyNotificationsJob refactor

* APPEALS-43598 Fix db schema.rb file

* APPEALS-43598 Fix schema.rb file

* APPEALS-43598 Refactoring QuarterlyNotificationsJob for readability

* APPEALS-43598 Refactoring QuarterlyNotificationsJob and removing extra methods

* [APPEALS-43598] Update method name

---------

Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-44007: Eliminate Transmission of Notifications to Deceased Veterans (#21481)

* APPEALS-44007: Writing tests to ensure adding the 'failure due to deceased' information is properly set and added to the db

* updates to pr

* pushing changes for tonight

* updating spec file to handle enabling and disabling feature flags

* Update format_message_status

* Lint roll

* fixing conflicts

* Updates to send notification spec

* Fix one of the legacy test cases

* Remove accidental push

* Fix remaining test

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-45235: Remove Temporary PDF Files From tmp Directory After All eFolder Upload Attempts (#21557)

* Cleanup files after uploading to VBMS

* Only delete file if it exists

* Resolve linter issue

* Update specs

* Trigger CodeClimate

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Add appeal alias for notifiable

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications (#21575)

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications

* fixing some errors

* updating factory

* updating tests

* updating tests and factory

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-43596 Adding JobMessageDeletionMiddleware to delete SQS messages for certain jobs

* APPEALS-43596 Adding tests

* APPEALS-43596 Fix codeclimate

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables (#21596)

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables

* pushing changes

* updating tests

* rubocop

* rubocop'n

* deleting repeat constants

* removing file in favor of EVENT_TYPE_FILTERS.json

* removing instances of using VA_NOTIFY_TEMPLATE_NAMES and using EVENT_TYPE_FILTERS instead

* replacing all instances of strings with constants

* fixing bug

* rubocop'n

* rubocop'n

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Clean notification_events after notification report specs finish (#21662)

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-43725: Extract `notify_appellant` Call from `QuaterlyNotificationsJob` to Decrease Runtime (#21643)

* Group notification types as scopes

* Add new job

* Fix typo

* Add back batching

* Batch send messages

* Multithread job queueing

* Reconfigure bulk enqueueing to utilize send_notifications.fifo queue

* Update the comment on QuaterlyNotificationsJob#perform

to adhere to the RDoc standard

* Use constants for template name

* Provide a more descriptive var name

* Remove unused env var

* Fix linting issues

* Prevent error from being thrown early in init job

* Add RDoc comments to appeal_state

* Add rdoc comment to init job

* Add another rdoc comment to the init job

* Use a more specific error class whenever an appeal

cannot be located within the init job

* Add a more specific error to CaseflowJob#enqueue_batch_of_jobs

* Add test for SendNotificationJob.queue_name_suffix

* Update QuarterlyNotificationsJob tests

* Update appeal_state_spec.rb to cover new scopes

* Add spec file for NotificationInitializationJob

* Add CaseflowJob specs

* Add CaseflowJob specs

* Address rubocop issue (by ignoring it)

* Kicking off CodeClimate

* Fix some lint issues

* Freeze constant

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Move spec file to proper location

* APPEALS-43599 (#21696)

* APPEALS-43599 Refactoring SendNotificationJob

* APPEALS-43599 Remove comments

* APPEALS-43599 Suppress code smells from reek

* APPEALS-43599 Suppress code smells from reek

* jcohen/APPEALS-43727 (#21589)

* APPEALS-43727 Branch created. Extracted all the 'when' conditions in the case statement within appellant_notification.rb update_appeal_state method.

* APPEALS-43727 appellant_notification_service is created, logic from crowded method in appellant_notificaion.rb placed in newly created file, allowing redability.

* APPEALS-43727 added logic to appeal_state.rb, appellant_notification.rb updated with less logic, readable code through well named methods.

* APPEALS-43727 commit before merge from teammates work

* APPEALS-43727 removed freeze method on default status hash in appeal_state.rb. removed some rubocop disabling in appellant_notificaion.rb

* APPEALS-43727 extracted more logic from the appellant_notification module and placed it into the appeal_state class. Also got rid of rubocop declarations in app_notif and app_state as well. finally removed feature_toggle calls in appell_notif.

* APPEALS-43727 tests passing, code works

* APPEALS-43727 adding tests to appeal_state_spec to test functionality

* APPEALS-43727 rspec tests in appeal_state.

* APPEALS-43727 tests pass.

* Fixing code climate duplicate code issue

* fixing case statement

* code climate things

* rubocop

* APPEALS-43727 work completed.

* APPEALS-43727 PR comments applied. tests not in a working state.

* APPEALS-43727 PR comments applied. appeal_state_spec in working state.

* APPEALS-43727 PR comments applied. appellant_notification_spec.rb all green.

* Adjust spacing of comments in appeal_state.rb

* Utilize #external_id method over ternary

* Swap or conditional for blank?

* Fix another whitespace gap

* APPEALS-43727 PR comments applied. again after reset.

* APPEALS-43727 PR comments applied. flipped conditionals in appeal_state.rb

* Update app/models/concerns/appeal_concern.rb

* APPEALS-43727 code/test edits

* APPEALS-43727 bulk_task_reasssignment_spec reverted to orginal state, with the exception of an expectation that was on line 98

* APPEALS-43727 lint fix

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-46179 (#21712)

* APPEALS-46179 Create JobExecutionTimes table

* APPEALS-46179 Add comment

* APPEALS-46179 Update schema

* APPEALS-46193 (#21753)

* APPEALS-46193 Add record to JobExecutionTime table when job is performed

* APPEALS-46193 Updating JobExecutionTimes table with an upsert query

* APPEALS-46193 Ignore JobExecutionTimes for certain jobs

* APPEALS-46193 Update ignore_job_execution_time? method

* APPEALS-46193 Adding tests

* Fix lint issues

* Update AWS dependencies

* Rollback gem reduction due to UAT issue

* Alter queue priority

* Forward error in SendNotificationJob

* Allow for notification audit records to remain in ProdTest

* Fix spec

* Fix typo in test fixture's name

* Fix lint infraction related to re-raising exceptions

* Address duplication CC error

* Reenable-privacy-mail-notifications (#21859)

* Add conditional for FOIA and Privacy Act mail

task to receives 'Privacy Act Pending' notifications

* Update spec

* Adjust some specs

* Add missing param

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Remove byebug from spec

* Revert queue tweak

* Remove duplicate method

* APPEALS-47382: Refactor Job Behavior Filtering Boolean Methods (#21898)

* initial commit

* refactoring methods to have constants instead of methods

* adding comments back in

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* APPEALS-48342: Prevent Intentional Retries of SendNotificationJobs in ProdTest from Causing Duplicate Notification Table Entries (#21927)

* initial commit

* rubocop'n

* rubcop'n

* fixing tests

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Resolve missed conflict

* MattT/APPEALS-48514 (#21959)

* Prototype of privacy act fix

* Leave privacy act states intact upon decision mailed

* Remove unused param

* Attempt updating specs to cover new behavior

* Fix attr name typo

* Add missing bang

* Skip reek issue

The issue has been deemed to be minor enough to not warrant having to reinvent everything for now.

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix quarterly specs by add in necessary hearings

* Adjust spacing/ordering of gems (#21978)

* MattT/APPEALS-49085 (#21960)

* Filter out appeals whose hearings have been held from hearing_scheduled scope

* Fix whitespace issues

* Fix failing specs caused by an oversight on my part

* Fix lint issue

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-49212 (#21991)

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add step to NightlySyncsJob to sync hearing dispositions and appeal stateS

* Add comment to new method

* Use constant for disposition type

* Fix typo in accessor

* Add spec for new appeal state action

* Create user in top scope

* Expand nighlty syncs job to check all scheduled hearing disposition types.

No show was left off as we don't have a requirement around it yet.

* Add nightly sync job spec

* Add disp task spec

* Add specs targeting the hearings controller

* Add sync script

* Eager load constants

* Add distinct

* Remove appeal_docketed from being reset

* Add script to adjust ama hearing statuses

* Correct mistype

* Add appeal_type clause

* Fix specs

* Lint fixes

* Flip conditionals in specs

* Fix var name

* Fix var

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Backfill addition to script

* Add AppealState record for newly docketed LegacyAppeals (#21999)

* APPEALS-48966 Adding AppealState record for recently docketed appeals

* APPEALS-48966 Refactor code and add comments

* Delete extraneous files

* Revert to using constants value

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix typo

---------

Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Feature/appeals 43597 release candidate (#22004)

* APPEALS-36759 Add sms_response_content and sms_response_time notifications table

* APPEALS-37003 First pass at job refactor

* APPEALS-37003 Add comments and update kwargs for va notify service

* APPEALS-37003 Update spec files

* APPEALS-37003 Update spec

* APPEALS-37003 Ensure user in job and create email_enabled method

* APPEALS-37003 Remove question mark

* Limit max retry attempts to 5

* Add ? to boolen return methods

* jcohen/APPEALS-43706 (#21444)

* APPEALS-43706 macros added to each model file for the polymorphic relationship to be setup.

* APPEALS-43706 migration made and yet to be run.

* APPEALS-43706 migrations ran and expected columns and indexes are in table.

* Fix some spec failures unrelated to this branch

* Limit schema diff

* Add a missing tab

* Fix more unrelated failures. Also prevent ACD lever seeds from overwriting spec output

* Fix last unrelated failure.

* APPEALS-43706 linting issues in va_notify_service fixed.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* [APPEALS-43598] Quarterly Notification Job refactoring (#21505)

* Quarterly Notification Job refactoring

* APPEALS-43598 Fix lint issues for QuarterlyNotificationsJob refactor

* APPEALS-43598 Fix db schema.rb file

* APPEALS-43598 Fix schema.rb file

* APPEALS-43598 Refactoring QuarterlyNotificationsJob for readability

* APPEALS-43598 Refactoring QuarterlyNotificationsJob and removing extra methods

* [APPEALS-43598] Update method name

---------

Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-44007: Eliminate Transmission of Notifications to Deceased Veterans (#21481)

* APPEALS-44007: Writing tests to ensure adding the 'failure due to deceased' information is properly set and added to the db

* updates to pr

* pushing changes for tonight

* updating spec file to handle enabling and disabling feature flags

* Update format_message_status

* Lint roll

* fixing conflicts

* Updates to send notification spec

* Fix one of the legacy test cases

* Remove accidental push

* Fix remaining test

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-45235: Remove Temporary PDF Files From tmp Directory After All eFolder Upload Attempts (#21557)

* Cleanup files after uploading to VBMS

* Only delete file if it exists

* Resolve linter issue

* Update specs

* Trigger CodeClimate

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Add appeal alias for notifiable

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications (#21575)

* APPEALS-45346: Populate Polymorphic Association Columns When Creating New Notifications

* fixing some errors

* updating factory

* updating tests

* updating tests and factory

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-43596 Adding JobMessageDeletionMiddleware to delete SQS messages for certain jobs

* APPEALS-43596 Adding tests

* APPEALS-43596 Fix codeclimate

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables (#21596)

* APPEALS-43714: Refactor VANotify Modules to Not Rely on Class Variables

* pushing changes

* updating tests

* rubocop

* rubocop'n

* deleting repeat constants

* removing file in favor of EVENT_TYPE_FILTERS.json

* removing instances of using VA_NOTIFY_TEMPLATE_NAMES and using EVENT_TYPE_FILTERS instead

* replacing all instances of strings with constants

* fixing bug

* rubocop'n

* rubocop'n

* rubocop

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Clean notification_events after notification report specs finish (#21662)

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-43725: Extract `notify_appellant` Call from `QuaterlyNotificationsJob` to Decrease Runtime (#21643)

* Group notification types as scopes

* Add new job

* Fix typo

* Add back batching

* Batch send messages

* Multithread job queueing

* Reconfigure bulk enqueueing to utilize send_notifications.fifo queue

* Update the comment on QuaterlyNotificationsJob#perform

to adhere to the RDoc standard

* Use constants for template name

* Provide a more descriptive var name

* Remove unused env var

* Fix linting issues

* Prevent error from being thrown early in init job

* Add RDoc comments to appeal_state

* Add rdoc comment to init job

* Add another rdoc comment to the init job

* Use a more specific error class whenever an appeal

cannot be located within the init job

* Add a more specific error to CaseflowJob#enqueue_batch_of_jobs

* Add test for SendNotificationJob.queue_name_suffix

* Update QuarterlyNotificationsJob tests

* Update appeal_state_spec.rb to cover new scopes

* Add spec file for NotificationInitializationJob

* Add CaseflowJob specs

* Add CaseflowJob specs

* Address rubocop issue (by ignoring it)

* Kicking off CodeClimate

* Fix some lint issues

* Freeze constant

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Move spec file to proper location

* APPEALS-43599 (#21696)

* APPEALS-43599 Refactoring SendNotificationJob

* APPEALS-43599 Remove comments

* APPEALS-43599 Suppress code smells from reek

* APPEALS-43599 Suppress code smells from reek

* jcohen/APPEALS-43727 (#21589)

* APPEALS-43727 Branch created. Extracted all the 'when' conditions in the case statement within appellant_notification.rb update_appeal_state method.

* APPEALS-43727 appellant_notification_service is created, logic from crowded method in appellant_notificaion.rb placed in newly created file, allowing redability.

* APPEALS-43727 added logic to appeal_state.rb, appellant_notification.rb updated with less logic, readable code through well named methods.

* APPEALS-43727 commit before merge from teammates work

* APPEALS-43727 removed freeze method on default status hash in appeal_state.rb. removed some rubocop disabling in appellant_notificaion.rb

* APPEALS-43727 extracted more logic from the appellant_notification module and placed it into the appeal_state class. Also got rid of rubocop declarations in app_notif and app_state as well. finally removed feature_toggle calls in appell_notif.

* APPEALS-43727 tests passing, code works

* APPEALS-43727 adding tests to appeal_state_spec to test functionality

* APPEALS-43727 rspec tests in appeal_state.

* APPEALS-43727 tests pass.

* Fixing code climate duplicate code issue

* fixing case statement

* code climate things

* rubocop

* APPEALS-43727 work completed.

* APPEALS-43727 PR comments applied. tests not in a working state.

* APPEALS-43727 PR comments applied. appeal_state_spec in working state.

* APPEALS-43727 PR comments applied. appellant_notification_spec.rb all green.

* Adjust spacing of comments in appeal_state.rb

* Utilize #external_id method over ternary

* Swap or conditional for blank?

* Fix another whitespace gap

* APPEALS-43727 PR comments applied. again after reset.

* APPEALS-43727 PR comments applied. flipped conditionals in appeal_state.rb

* Update app/models/concerns/appeal_concern.rb

* APPEALS-43727 code/test edits

* APPEALS-43727 bulk_task_reasssignment_spec reverted to orginal state, with the exception of an expectation that was on line 98

* APPEALS-43727 lint fix

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* APPEALS-46179 (#21712)

* APPEALS-46179 Create JobExecutionTimes table

* APPEALS-46179 Add comment

* APPEALS-46179 Update schema

* APPEALS-46193 (#21753)

* APPEALS-46193 Add record to JobExecutionTime table when job is performed

* APPEALS-46193 Updating JobExecutionTimes table with an upsert query

* APPEALS-46193 Ignore JobExecutionTimes for certain jobs

* APPEALS-46193 Update ignore_job_execution_time? method

* APPEALS-46193 Adding tests

* Fix lint issues

* Update AWS dependencies

* Rollback gem reduction due to UAT issue

* Alter queue priority

* Forward error in SendNotificationJob

* Allow for notification audit records to remain in ProdTest

* Fix spec

* Fix typo in test fixture's name

* Fix lint infraction related to re-raising exceptions

* Address duplication CC error

* Reenable-privacy-mail-notifications (#21859)

* Add conditional for FOIA and Privacy Act mail

task to receives 'Privacy Act Pending' notifications

* Update spec

* Adjust some specs

* Add missing param

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Remove byebug from spec

* Revert queue tweak

* Remove duplicate method

* APPEALS-47382: Refactor Job Behavior Filtering Boolean Methods (#21898)

* initial commit

* refactoring methods to have constants instead of methods

* adding comments back in

---------

Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* APPEALS-48342: Prevent Intentional Retries of SendNotificationJobs in ProdTest from Causing Duplicate Notification Table Entries (#21927)

* initial commit

* rubocop'n

* rubcop'n

* fixing tests

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>

* Resolve missed conflict

* MattT/APPEALS-48514 (#21959)

* Prototype of privacy act fix

* Leave privacy act states intact upon decision mailed

* Remove unused param

* Attempt updating specs to cover new behavior

* Fix attr name typo

* Add missing bang

* Skip reek issue

The issue has been deemed to be minor enough to not warrant having to reinvent everything for now.

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix quarterly specs by add in necessary hearings

* Adjust spacing/ordering of gems (#21978)

* MattT/APPEALS-49085 (#21960)

* Filter out appeals whose hearings have been held from hearing_scheduled scope

* Fix whitespace issues

* Fix failing specs caused by an oversight on my part

* Fix lint issue

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* MattT/APPEALS-49212 (#21991)

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add module to set hearing_scheduled to false whenever hearings are marked as held

* Add step to NightlySyncsJob to sync hearing dispositions and appeal stateS

* Add comment to new method

* Use constant for disposition type

* Fix typo in accessor

* Add spec for new appeal state action

* Create user in top scope

* Expand nighlty syncs job to check all scheduled hearing disposition types.

No show was left off as we don't have a requirement around it yet.

* Add nightly sync job spec

* Add disp task spec

* Add specs targeting the hearings controller

* Add sync script

* Eager load constants

* Add distinct

* Remove appeal_docketed from being reset

* Add script to adjust ama hearing statuses

* Correct mistype

* Add appeal_type clause

* Fix specs

* Lint fixes

* Flip conditionals in specs

* Fix var name

* Fix var

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Backfill addition to script

* Add AppealState record for newly docketed LegacyAppeals (#21999)

* APPEALS-48966 Adding AppealState record for recently docketed appeals

* APPEALS-48966 Refactor code and add comments

* Delete extraneous files

* Revert to using constants value

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Fix typo

* Fix typo

* Fix seed script

* Fix seed script

* Ensure cleanup

* Change copy for Appeal Docketed status (#22006)

* Change copy for Appeal Docketed status

* Change case

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Use status text value instead of key

---------

Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-44916 seed data update (#22008)

* APPEALS-44956: Add AppealAffinity model and database table (#21526)

* add migration for appeal_affinities

* add AppealAffinity model and associations, update migration for new column

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

* add new job, update affinity model validation and after save hook

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

* add return in job if no query results, tests for no query results

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

* remove comment, fix hearing factory, disable some seeds for testing

* add more tests

* test refactor

* update appeals for dist query to add affinity start, add seed file, fix hearing factory, add stat to dist factory

* disable new seed on reset

* update seed file with vet names, add another seed category

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* APPEALS-44959: Modify affinity date checks to use appeal_affinity (#21611)

* swap distribution queries from distribution_task to appeal_affinities

* update seed files to use appeal affinities instead of distribution task

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

* fix user seed, fix date format in distribution task instructions

* fix tests for date format update

* Calvin/APPEALS-44957-rake-affinity (#21577)

* grabbed receipt dates from distributed cases

* refactored for functionality + added method to grab appeals that match

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

* if appeal affinity is nil, it will now be updated

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

* updated start date to receipt date instead of Time.now

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

* APPEALS-46016: Add Affinity Start Date to the Explain Page (#21660)

* add affinity start date to explain page

* add feature test to verify dates display

* update rake task and spec (#21731)

* APPEALS-46325: Add Seeds for AOD Appeals and Update Dates to Match CAVC (#21730)

* add aod hearing cases to ama affinity cases seed

* fix lever spec

* APPEALS-45148: Hook to clear saved affinity date (#21623)

* initial imp. idea

* AC1: check for affinity_start_date on assignment

* AC2/3: update affinity start date  w/ instr.

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

* add case dist lever to new tests (#21776)

* remove unnecessarily included module from job (#21827)

* APPEALS-47211: Improve Performance of Distribution Queries (#21840)

* rework ready_for_distribution scope

* fix non-hearing docket distribution bug

* restart tests

* added null checks for appeal affinity in distribution queries, update tests (#21893)

* add check for appeal being active to distribution and associated slack message (#21902)

* prelim work on 48033

* refactored code a bit, working on data creation now

* created ama_affinity data

* fixing mispelt variable

* add back line that was removed

* updated users_spec to now pass

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: Calvin <Calvin.Costa@va.gov>

* fixed merge conflict

---------

Co-authored-by: alex-guanipatin <143651918+alex-guanipatin@users.noreply.github.com>
Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>
Co-authored-by: slwallerBAH <161883271+slwallerBAH@users.noreply.github.com>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Matt Roth <roth_matthew@bah.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jeff Marks <jeff.t.marks@gmail.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: Noah Hansen <nhansen@Noahs-MacBook-Pro.local>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: Calvin <Calvin.Costa@va.gov>

* Revert "APPEALS-46087 fix css table width issues for case distribution lever history table (#22024)"

This reverts commit 05896d32fa0510bf76101dff689ad05187dc7ccf.

* Add unit testing around push priority distributions with Docket Levers (#22078)

Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-50756: Fix for Appeals Ready to Distribute Query includes dates that are NA (#22090)

* APPEALS-50756 fix appeals ready for distribution csv report to exclude place holder dates for non priority appeals

* fix linting issues of feature branch

* fix rubocop offenses from feature branch

* APPEALS-50756 updated login in ama rows method

* APPEALS-50756 fix lint issues

* APPEALS-50756 The Appeals Ready to Distribute Query includes dates that are NA (#22183)

* APPEALS-50756 fix appeals ready for distribution csv report to exclude place holder dates for non priority appeals

* fix linting issues of feature branch

* fix rubocop offenses from feature branch

* APPEALS-50756 updated login in ama rows method

* AP…
HunJerBAH added a commit that referenced this pull request Aug 26, 2024
…ing “view documents” (#22595)

* finished link to veteran docs page.

* APPEALS-55525: Disable tests for seed files and lock Chrome version to v127 in Github Actions (#22567)

* add exclude pattern to github actions rspec command

* add test file exclude pattern constant

* lock chrome version to 127.0.6533.119

* Correspondence and Appeal Tasks: Related Appeals: Can view tasks added from Correspondence to existing appeals (#22332)

* stable rendering and backend data

* fixed null errors

* fixed typo

* frontend populating correctly with the exception of num_of_issues

* removed console.log

* Fixed docket num column

* stable checkpoint for tasks added to appeal

* added missing bolded text

* fixed border and badge

* fixed veteran naming

* style and html changes

* quick styling fix

* off color fix

* updated the way tasks are handed, changed serializer and added new one.

* added all functionality

* fixed css issue and empty variable controller issue

* fixed failing jest tests

* final jest test changes

* APPEALS-42531 - Correspondence Cases: Pending tab: FOIA request link (#22329)

* update schema

* updating task_url

* create folder, file and test coverage for FOIA Request

* Fix minor lint error

* Revert "update schema"

This reverts commit d358e142c2fb86472459c335622705457c51e36e.

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* Fix for Inbound Ops Team shows in Assign to team Task action (#22349)

* Fix for Inbound Ops Team shows in Assign to team Task action

* codeclimate fix

* APPEALS-51237, APPEALS-51536: Optimize feature tests in intake/appeal/edit_spec.rb and optimize automatic case distribution tests (#22280)

* refactoring edit_spec

* move one assertion and remove duplicate test

* refactor withdraw issues context

* move duplicate test assertions

* move duplicate test assertions to existing tests and remove duplicate tests

* move assertion and remove duplicate test

* consolidate SCT appeal tests

* refactor SCT tests to use step blocks

* consolidate a individual test into a step

* move CC appeal task tests to appeals_controller_spec intead of a feature test

* remove unnecessary code comments

* consolidate member not admin tests

* remove commented portions of test

* move tests from affinity_days_levers_spec.rb

* move tests from affinity_days_levers_spec.rb, last commit was from audit_lever_history_table_spec.rb

* remove ama_np_dist_goals_by_docket_lever_spec.rb

* remove batch_size_levers_spec.rb

* remove inactive_data_elements_levers_spec.rb

* remove lever_buttons_spec.rb

* refactor

* move jest file for convention, add snapshot

* move test for admin ui not interactable for non-admins to a jest test

* remove unnecessary comments, whitespace

* restore jest folder structure

* modify edit spec to use case details page instead of searching again

* modify assertions

* remove TODO comment

* add assertion to allow async save actions to be executed

* add check to ensure banner is gone before trying to save

* refactor assertions for lever history display

* fix failing dependency report tests

* APPEALS-53151: Update ECR Workflow to Utilize OIDC Flow (#22348)

* Reconfigure ECR login workflow to utilize Github's OIDC flow

* Add permissions

* Update AWS account number to one for VAEC

* Update account number for main CI workflow

* Try using a separate secret in test

* Try using a separate secret in test

* Change name of secret

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Added a space between the intake and create record buttons (#22360)

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* Color fix (#22369)

* APPEALS-42525 - Package Details: General Information (#22350)

* APPEALS-42525 - Added General Information, Styling

* APPEALS-42525 - Updated Tests, Linting

* Correspondence and Appeal Tasks: Tasks not related to an Appeal - fix (#22330)

* removed duplicate row

* fixed task text and improved code reability

* enhanced key, isolated serializer issue

* added filtering of additional types

* APPEALS-42531 - Correspondence Cases: Pending tab: FOIA request link (#22329)

* update schema

* updating task_url

* create folder, file and test coverage for FOIA Request

* Fix minor lint error

* Revert "update schema"

This reverts commit d358e142c2fb86472459c335622705457c51e36e.

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* reworked data source for available actions

* fixed lint offense

* removed binding.pry

* made changes to serializer and correspondence model

* Fix for prettier offense

* fixed linting issues

---------

Co-authored-by: IsaiahBar <107133331+IsaiahBar@users.noreply.github.com>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* Code climate fix (#22377)

* Code climate fix

* Rubocop fix

---------

Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* Color fix (#22379)

* Color fix

* Lint fix

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* update mail_task.rb (#22376)

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* Revert "update mail_task.rb (#22376)" (#22385)

This reverts commit 2e4fbef953eb48d7e31ceb22ec0a850ff1205c75.

* APPEALS-42525 - Switching tests to Jest (#22392)

* Correspondence and Appeal Tasks: Tasks not related to an Appeal (#22394)

* removed duplicate row

* fixed task text and improved code reability

* enhanced key, isolated serializer issue

* added filtering of additional types

* APPEALS-42531 - Correspondence Cases: Pending tab: FOIA request link (#22329)

* update schema

* updating task_url

* create folder, file and test coverage for FOIA Request

* Fix minor lint error

* Revert "update schema"

This reverts commit d358e142c2fb86472459c335622705457c51e36e.

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* reworked data source for available actions

* fixed lint offense

* removed binding.pry

* made changes to serializer and correspondence model

* Fix for prettier offense

* fixed linting issues

* removed unused method.

* fixed correspondence_serializer calling the wrong method.

* Correspondence and Appeal Tasks: Tasks not related to an Appeal - fix (#22330)

* removed duplicate row

* fixed task text and improved code reability

* enhanced key, isolated serializer issue

* added filtering of additional types

* APPEALS-42531 - Correspondence Cases: Pending tab: FOIA request link (#22329)

* update schema

* updating task_url

* create folder, file and test coverage for FOIA Request

* Fix minor lint error

* Revert "update schema"

This reverts commit d358e142c2fb86472459c335622705457c51e36e.

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* reworked data source for available actions

* fixed lint offense

* removed binding.pry

* made changes to serializer and correspondence model

* Fix for prettier offense

* fixed linting issues

---------

Co-authored-by: IsaiahBar <107133331+IsaiahBar@users.noreply.github.com>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* Code climate fix (#22377)

* Code climate fix

* Rubocop fix

---------

Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* Color fix (#22379)

* Color fix

* Lint fix

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* update mail_task.rb (#22376)

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* Revert "update mail_task.rb (#22376)" (#22385)

This reverts commit 2e4fbef953eb48d7e31ceb22ec0a850ff1205c75.

---------

Co-authored-by: IsaiahBar <107133331+IsaiahBar@users.noreply.github.com>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>
Co-authored-by: divyadasari-va <135847343+divyadasari-va@users.noreply.github.com>

* IsaiahB/APPEALS-53208 (#22410)

* update mail_task.rb

* added method override for verifying user in correspondence mail task model

* fix spec tests

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: HunJerBAH <Jeremy.Hunton@va.gov>

* adding all correspondences table (#22415)

* adding all correspondences table

* added jest tests

* spec fix

* Rspec test fixes  (#22411)

* Correspondence Cases page Banner alert for approval and reject request approve request to reassign test fix

* Correspondence Cases page Banner alert for approval and reject request approve request to reassign test fix modifications

* Fix for banner warning message for efolder

* Add skips to MST PACT test to skip temporarily

---------

Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* APPEALS-42525 - Update Styling (#22424)

* Sivakesh/Appeals-42642 - Associate Prior Mail to only show Pending or Completed Correspondences (#22374)

* #48957 - Add Correspondences' Status to Intake Form

* #48672 - Added a spec

* #42642 - updated status in spec

* Caceves/appeals 53755 code climate fixes (#22427)

* Code climate fixes initial commit

* Added proptypes to tooltiphelper file

* Jest fixes

* Updated jest snap shots

* Fix for dentical blocks of code being found in multiple locations for radio input field

* Lint fixes

* Jest fixes

* Jest fixes updating the snapshots

* Codeclimate fixes for const props

* testing the duplication error fix for jest

* User tests 'FeatureToggle.enabled?(:correspondence_queue)' at least 3 times

* Add ignore for pdf offense

* Complexity fixes

---------

Co-authored-by: divyadasari-va <divya.dasari@va.gov>
Co-authored-by: divyadasari-va <135847343+divyadasari-va@users.noreply.github.com>

* Sivakesh/appeals 51904 - 508: Jaws doesn't read options on the correspondence type dropdown (#22333)

* #51904 - added aria attributes

* #51904 - added aria attributes

* #51904 - added aria attributes

* #51904 - added conditional aria label

* #51904 - removed aria attributes

* Remove aria label by

* #51904 - updated snapshots to have aria-label

* #51904 - updated snapshots to have aria-label

* #51904 - updated jest tests

* #51904 - updated jest tests

* #51904 - updated jest tests

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* CodeClimate fixes for User tests 'correspondence_queue_enabled?' at least 3 times (#22444)

* Fix for Inbound Ops Team shows in Assign to team Task action (#22349)

* Fix for Inbound Ops Team shows in Assign to team Task action

* codeclimate fix

* Code climate fix (#22377)

* Code climate fix

* Rubocop fix

---------

Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* Feature/appeals 43179 (#21665)

* Calvin/APPEALS-43852-cavc-levers (#21441)

* enabled cavc affinity levers in UI

* updated rspec

* [APPEALS-43849]Update CAVC Affinity Implementation for AMA Dockets to… (#21456)

* [APPEALS-43849]Update CAVC Affinity Implementation for AMA Dockets to Account for Omit/Infinity

* Affinity rules applied to non genpop

* Addressed comments

* Addressed comments

* fixed rubocop issues + added clarity to where clause

---------

Co-authored-by: Calvin <Calvin.Costa@va.gov>

* APPEALS-44956: Add AppealAffinity model and database table (#21526)

* add migration for appeal_affinities

* add AppealAffinity model and associations, update migration for new column

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

* add new job, update affinity model validation and after save hook

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

* add return in job if no query results, tests for no query results

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

* remove comment, fix hearing factory, disable some seeds for testing

* add more tests

* test refactor

* update appeals for dist query to add affinity start, add seed file, fix hearing factory, add stat to dist factory

* disable new seed on reset

* update seed file with vet names, add another seed category

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* [Appeals 43850] Update Legacy Docket Queries to Account for the Previous Decision Judge and Type Action  (#21556)

* test changes for seans ticket

* test changes

* added joins to all required methods

* fixed lint

* fixed column ambiguity errors

* cleaned up naming scheme

* Documentation for JOIN_PREVIOUS_APPEALS constant

---------

Co-authored-by: Calvin <Calvin.Costa@va.gov>

* APPEALS-44959: Modify affinity date checks to use appeal_affinity (#21611)

* swap distribution queries from distribution_task to appeal_affinities

* update seed files to use appeal affinities instead of distribution task

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

* fix user seed, fix date format in distribution task instructions

* fix tests for date format update

* APPEALS-44187: Factory Bot Additions (#21438)

* AC1: values for bfddec and bfmpro

* AC2: case issues updated to '3'

* AC3-4: attorney and judge additions

* ac 5: bfdpdcn addition

* AC6: case type action addition

* ac7: new folder match to original

* ac8: case issues set to original

* AC 3/4: added associations to original

* ac3/4: updated logic to handle no args

* ac3/4: return sattyid

* ac7:updating folder assignment

* ac7: added bfkey to except block

* ac7/8: update to case issue list and validations dismissed

* removed byebug

* ac7: added 'ticknum' to except

* lint fixes

* lint fixes

* lint fixes

* lint fixes

* nested trait into form_9 factory

* new addtions

* added .save to case issues

* resolving correspondent and titrnum associations

* fixed bfdc typo

* factory additions

* added ssn to associated corr.

* removed transient and added .save

* added after create to corr factory

* veteran lookup check prior to create

* committing missed 'end'

* moved over veteran create to case fact.

* move corr. association field to case fact.

* lint issues + corres. save

* Calvin/APPEALS-44957-rake-affinity (#21577)

* grabbed receipt dates from distributed cases

* refactored for functionality + added method to grab appeals that match

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

* if appeal affinity is nil, it will now be updated

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

* updated start date to receipt date instead of Time.now

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

* APPEALS-46016: Add Affinity Start Date to the Explain Page (#21660)

* add affinity start date to explain page

* add feature test to verify dates display

* Sudhir/appeals 43851 (#21613)

* Implement CAVC + AOD Affinity Lever for AMA Dockets

* addressed comments

* addressed comments

* Addressed comments

* added cavc_aod_affinity in case distribution lever model

* addressed comments

* addressed comments

* updated specs

* Updated specs

* specs changes reverted

* ama_aod and ama_non_aod queries updated

* change the assertion in docket spec

* Craig/appeals 46196 (#21689)

* fix query, tested locally

* add basic test to verify csv downloads aren't broken

* APPEALS-43851: Add test to validate CAVC+AOD behavior on hearing docket appeals affinities (#21678)

* add test to validate cavc+aod on hearing docket appeals

* lint, test case_docket_spec fix

* modify case_docket_spec again

* more test fix testing

* attempt to fix test again

* test removing prev appeals from nonpriority queries

* more test tests

* feature toggle change in test

* reorder new portions of query

* remove unused portions of queries in case_docket

* revert unneeded change to query order

* revert unneeded change to query order

* update rake task and spec (#21731)

* APPEALS-46325: Add Seeds for AOD Appeals and Update Dates to Match CAVC (#21730)

* add aod hearing cases to ama affinity cases seed

* fix lever spec

* APPEALS-45148: Hook to clear saved affinity date (#21623)

* initial imp. idea

* AC1: check for affinity_start_date on assignment

* AC2/3: update affinity start date  w/ instr.

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

* add case dist lever to new tests (#21776)

* fix tests, add lever to factory, fix dist scopes (#21779)

* fix rubocop warning

* Acd/appeals 43853 43854 (#21971)

* Calvin/appeals 43853 (#21723)

* initial updates

* removing unnecessary variable

* focused in on priority

* removing non priority stuff

* added general comments

* added BFAC and AOD to cavc aod lever query

* adding judge vacols id to query

* aod affinity_start_date filter initial changes

* fixed sorting

* fixed rubocop issues

* updated filter method

* error handling

* added ineligibility to queries for PREV_DECIDING_JUDGE

* fixed SQL query + added comments

* added exclude from affinity check into the case docket queries

* error handling + fixing sql queries

* rejects appeals without affinity_start_dates and nonmatching judges

* fixing rubocop offenses

* fixed inconsistencies between methods

* fixed conditions for rejecting appeals

* refactored cavc aod affinity filter to make it much easier to read

* refactored code to account for AC6

* error handling for empty exclude from affinity

* reverted next if block to old logic to ensure it works

* added PREV_DEC_JUDGE is not null

* case.rb factory changes

* added more options to legacy_cavc_appeal creation

* cleaned up code for simpler reading

* fix for aod legacy cavc creation

* added tied to option to legacy cavc appeal factory

* limits are now handled correctly in query

* replaced return false to next if, as return false was causing unexpected behavior

* fix rspecs + one edge case

* added cavc aod lever creation to rspecs

* removed bfac and aod from nonpriority query

* cavc aod appeals w/excluded judges are now properly being filtered

* refactored excluded judges check

* added to old query to fix rspec errors

* modified case factory bot

* query now handles when prev_deciding_judge is nil

* removed unnecessary condition

* fixed case factory to now have tied_to attatched to orig appeal

* fixed next if block within filter

* handles omit scenarios + correctly rejects with next

* working on rspec (still failing)

* fix for ineligble VLJ when infinite

* fixed rspec suite for cavc aod filters

* fixed omit scenario in cavc aod affinity filter

* consolidation & readability refactor

* rubocop fixes

* fixed spec error

* Implement CAVC Affinity for Legacy Docket (#21706)

* Implement CAVC Affinity for Legacy Docket

* addressed comments

* Added BFAC in the query

* code changes for affinitty date

* Added affinity code

* code refactor and removed non priority code changes

* fixed syntax change

* Addressed comments

* refactor cavc affinity filter

* refactored code

* code refactor

* code refactor

* Updated existing specs

* code refactor

* Added new rspecs

* code refactor and added test  cases

* code refactor

* added test cases

* fixes push_priority_spec

* fixed rubocop issues

* rubocop issue fixed

* refactored code to make it easier to understand

* refactored + fixed rspec and lint errors

---------

Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>

* basic creation of legacy affinity cases seed data

* bug fixes, added bfcorlid with veterans, fully runs now

* added new appeals for affinity_and_tied_to_judge

* made data have realistic bfcorlids

* changes document sequence to use less digits

* added new file numbers for tied_to cases to make them easier to identify

---------

Co-authored-by: samasudhirreddy <108430298+samasudhirreddy@users.noreply.github.com>

* APPEALS-50692: Update Appeals Ready to Distribute CSV to include CAVC remand original judge (#22070)

* CSV download functional

* add tests, fix CSV query in CaseDocket

* fix lint

* Calvin/appeals 44313 (#22119)

* initial seed data file

* added legacy cavc and cavc aod affinity cases

* update

* fixed tied to for legacy appeals

* added AOD versions of appeals

* small lint fixes

* ensured AOD cases for legacy hearings with exluded or ineligible judge

* added vacols staff record creation for users without it

* APPEALS-47741: Update the UpdateAppealAffinityDatesJob to add appeal_affinity records for Legacy Appeals (#22023)

* AC1: changes and respective tests

* adjustements after refactoring

* identifier mismatch

* name update

* name update

* added appeal affinity filter

* updated comment

* remove byebug

* update rspec to handle hash input

* added no start date test case

* updated process method test

* removed 'todo' comment

* dried up query string

* aligned conditions

* update to hash quotations

* update to hash quotations

* added legacy to priority receipt dates from dist.

* moved append to resulting list

* added legacy receipt date to push job hash

* uncomment call to legacy

* updated dist.id to @dist_id

* uncomment call to process legacy appeals

* handling update to legacy docket type

* current rspec status

* fixed typo

* fix rspec

* legacy spec additions

* legacy spec additions

* added legacy dist. case factory

* removed vacols_judge ref

* updates for spec

* final review

* removed comment

* rubocop fixes

* fix rubocop warnings (#22225)

* Fix rubocop and tests (#22231)

* Calvin/appeals 52551 (#22293)

* age_of_n_oldest_priority_appeals_available_to_judge time out changes

* fixed timeout issue for distribute_priority_appeals

* fixed lint errors

* Craig/case docket optimization (#22294)

* age_of_n_oldest_priority_appeals_available_to_judge time out changes

* fixed timeout issue for distribute_priority_appeals

* optimize case docket priority distribution methods

* fix das deprecation distribution spec

---------

Co-authored-by: Calvin <Calvin.Costa@va.gov>

* Update admin_ui_spec.rb for CAVC levers being enabled

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: samasudhirreddy <108430298+samasudhirreddy@users.noreply.github.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: seanrpa <155660052+seanrpa@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* APPEALS-46266, APPEALS-46239: ACD Stats and Slack message updates (#22388)

* APPEALS-42221 Distribution Stats: Break statistics into columns (#21717)

* rebuild branch

* Create 20240506140249_add_cols_to_distribution_stats.rb

* unit tests and linting

* APPEALS-46244, APPEALS-46245 (#22077)

* remove unnecessary reporting

* send slack message to console if on local or demo

* add excluded judges to slack report

* reporting method cleanup

* added affinity date stats to distribution_stats for each docket

* Update docket.rb

* Update distribution_scopes.rb

* unit tests and linting

* unit tests and linting

* Slack message update

* Update push_priority_appeals_to_judges_job.rb

* Update push_priority_appeals_to_judges_job_spec.rb

* code climate and code review changes (#22148)

* code climate and code review changes

* move code out to its own class

* lint fixes

* revert

* disable reek checks

* fix method calls

* Hotfix/appeals 46639 prodtest (#22389)

* Initial commit and turning off queue tab variables used for the frontend pagination for the bulk assign tab for the specialty case team.

* Altered the queue actions to work with the new task selection action and a new redux action to remove tasks from a cached queue state. Also updated queue table to work with the redux caching instead of local state caching.

* Added in task selection function changes to TaskTable to work
with the altered task selection redux action. Also added the ability to pass down the redux cache property to queue table. Refactored the UnassignedCasesPage to allow for backend pagination of queue table instead of only working via frontend loaded data from the redux store.

* Added the queueTableCache reducer slice. Added a :advanced_on_docket trait to the task factory for specialty_case_team_assign_tasks. Added the caching combined reducer to the queue table reducers.

* Moved columnsFromConfig and createColumnObject functions out of QueueTableBuilder.jsx into a utils file so it can be used in multiple components around the app.

* Updated the setSelectionOfTaskOfUser to work with the new action and data that it should be expecting.

* Updated the selectedTasksSelector to work with the new task selection reducer and action.

* Added a parameter for useReduxCache for TaskTable to send down to queue table instead of always setting it to true. Removed some comments from the queueTableCacheSlice removeTaskIdsFromCache reducer method/action. Passed in the new useReduxCache property to TaskTable in the UnassignedCasesPage component for the sct bulk assign queue.

* Removed code out of QueueTableBuilder that is now in queueTableUtils.js.

* Fixed a bug if queueConfig was an empty hash in the UnassignedCasesPage component.

* Serializer optimizations for contested issues and issue categories. Also included request issues in the includes for the sct queue to take advantage of these optimizations.

* Fixed a bug where clear filters was not properly updating the get parameters anymore for queue table.

* Added cavc_type trait to the sct assign task factory.

* Fix code climate issues.

---------

Co-authored-by: = <tyler.broyles@va.gov>

* Updates key on line 63 to the correct value. (#22267)

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>

* Hotfix/appeals-42846 Fixes incorrect spelling of SupervisorySeniorCounsel across project (#22391)

* Repushing branch to fix CodeClimate and Rspec issue

* Attempt to fix failed Rspec.

* Revert Schema changes

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>

* consolidate individual RO accessors into a single test for each RO (#22407)

* Revert "Updates key on line 63 to the correct value. (#22267)" (#22417)

This reverts commit def10f5556a8d04b8b8125e00eb35bf0d56d1c8c.

* Revert "Feature/appeals 43179 (#21665)" (#22425)

This reverts commit 7613209eac2913058a6a2c52ddc21194c23ab80f.

* Ki/APPEALS-48371 - Refactor correspondence_cases_spec.rb (#22474)

* APPEALS-48371 - Correspondence Cases Spec Updates

* Moved user/super to helper

* Fix for rubocop violations

---------

Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* Div/appeals 42524 (#22471)

* Initial commit for Response letters

* codeclimate fix for correspondence_details_controller

* Fixes the lint issues and removed unnessary code

* Added feature test cases for response letters

* Adding the wait time for spec for get success

* Spec fix by increasing the wait time

* Spec fixes for correspondence details response letter tab

* Spec modification

* Spec modification

* Spec modification

* Adding sleep for the spec helper

* Changing the vist link from helper to spec file

* lint fix

* Codeclimate fixes

* Spec fixes

* Spec fix

* Spec fix

* fixed new props data breaking component

* Fix lint error

* updated labels

* changed docket number to caps

* git redo

* working link

* made changes based on github feedback.

* fixed linter issue

---------

Co-authored-by: IsaiahBar <107133331+IsaiahBar@users.noreply.github.com>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>
Co-authored-by: divyadasari-va <135847343+divyadasari-va@users.noreply.github.com>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Ki Mau <ki.mau@va.gov>
Co-authored-by: HunJerBAH <Jeremy.Hunton@va.gov>
Co-authored-by: vinner57 <128258952+vinner57@users.noreply.github.com>
Co-authored-by: psivakeshva <168677299+psivakeshva@users.noreply.github.com>
Co-authored-by: divyadasari-va <divya.dasari@va.gov>
Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: samasudhirreddy <108430298+samasudhirreddy@users.noreply.github.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: seanrpa <155660052+seanrpa@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Matt Roth <roth_matthew@bah.com>
Co-authored-by: Brandon Lee Dorner <Brandondorner@yahoo.com>
Co-authored-by: = <tyler.broyles@va.gov>
Co-authored-by: VaForceZ <149601263+VaForceZ@users.noreply.github.com>
Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>

* APPEALS-53014 and APPEALS-53057: Correspondence Details Pending Status Doesn't Align with Completed Tab Status (#22368)

* created correspondence statuses and created correspondence status methods.

* work in progress task not related to an appeal method

* updated correspondence status methods

* fixed bug with completed status not showing correctly

* removed old comment

* reverted name change

* work in progress moving logic from correspondence to root task.

* created correspondence status method

* put back in correspondence status check

* added scopes to correspondence task model

* moved root task as source of truth for correspondence status and task management

* fixed correspondence status names

* defined new correspondence task scopes

* created root task test coverage

* added open package action test

* test coverage for task_not_related_to_an_appeal

* updated tasks_not_related_to_an_appeal test

* fixed bug where mail tasks didn't inherit from correspondence and created test coverage.

* created tests for correspondence_status

* added in progress tests

* added completed task status test

* refactored test

* refactored package task check and tests

* refactored completed task tabs

* created logic for user in progress tasks

* refactored assigned tasks tab logic

* reworked unassigned, action required, and pending task tabs in organization queue

* fixed linting issues

* fixed failing correspondence details tests

* created correspondence status traits in seed file

* removed unused attribute check from controller spec

* updated failing tests

* fixed code climate issues

* fixed issue with failing test

* added back in assigned to for correspondence helper

* fix seed data that caused failing intake test

* fixed failing tests on intake_spec

* updated seed data

* reworked assigned tasks tab to not include action required tasks

* freeze active task names

* DRY'ed up the constants in intake processor

* refactored methods for code climate offenses

* resolved code climate issues

* Divya fix for correspondence case timeline actions

* fixed linting errors and added response letter safety opperator

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* Create Associated Prior Mail: Can view all associated prior mail  (#22542)

* resolving conflicts with feature branch

* resolving conflicts with feature branch

* resolvong conflicts

* resolving conflicts

* adding the seed data

* fix lint issues

* fix lint errors

* fix rubocop issues

* refactoring code

* fix rubocop issues

* spec fix

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* Release R2.3.0 FY24Q4.3.0 (#22517)

* Hotfix/appeals 45 2 (#22198)

* Trigger Build

* Update email address from Hearings to Decisions

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>

* APPEALS-46269: Remove the ability to enable proportions code (#22499)

* remove conditional for selecting distribution algorithm

* fix tests which broke when removing the toggle

* Feature/appeals 42187 (#22522)

* cmartine/APPEALS-42621 (#21599)

* Add remove_comp_and_pen_intake feature toggle to intakes controller

* Add new compensation and pension removal message to COPY.json

* Disable comp and pen radio buttons if remove_comp_and_pen_intake toggle is on

* Frontend test updates

* Add tooltip checks for review page integration tests

* fix frontend test lint errors

* frontend tests changes

* Fix linter errors

---------

Co-authored-by: kshiflett88 <kodishiflett@gmail.com>
Co-authored-by: root <root@DESKTOP-IBDKNPF>

* nrithner/APPEALS-45263 (#21617)

* Add remove_comp_and_pen_intake feature toggle to intakes controller

* Add new compensation and pension removal message to COPY.json

* Disable comp and pen radio buttons if remove_comp_and_pen_intake toggle is on

* Frontend test updates

* Add tooltip checks for review page integration tests

* fix frontend test lint errors

* frontend tests changes

* Add banner for non-vha

* Add banner for VHA employee

* Refactor conditionals

* Refactor logic for banners to display

* Add dangerouslySetHtml to banner

* Add test for no VHA employee

with vha_claim_review_establishment disabled.

* Add VHA employee scenario to display REMOVE_INTAKE_COMP_AND_PEN

* Complete non vha user scenarios

* Complete VHA employee scenarios

* Remove comments

* Fix linter errors

* Remove spaces preceding question marks

* Correct linting errors

---------

Co-authored-by: Chris-Martine <christopher.martine@va.gov>
Co-authored-by: kshiflett88 <kodishiflett@gmail.com>
Co-authored-by: root <root@DESKTOP-IBDKNPF>

---------

Co-authored-by: Chris-Martine <135330019+Chris-Martine@users.noreply.github.com>
Co-authored-by: kshiflett88 <kodishiflett@gmail.com>
Co-authored-by: root <root@DESKTOP-IBDKNPF>
Co-authored-by: nicorithner-bah <148365039+nicorithner-bah@users.noreply.github.com>
Co-authored-by: Chris-Martine <christopher.martine@va.gov>

* Feature/appeals 51138.rc.4.3.0 (#22523)

* APPEALS-36339 (#21436)

* Updated to remove obsolete levers of ACD Disable Legacy Distributions and ACD Disable Non-priority Distributions

* Fixed redundant linting issue

* Fixed empty line linting issue

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* mbeard/APPEALS-44379 (#21451)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44417 Seeds for Docket Lever Demo (#21534)

Co-authored-by: Christopher Detlef <>

* APPEALS-36345-updated (#21537)

* Refactored exclusion table

* Fixed ordering issue and testing

* mbeard/APPEALS-44379 (#21530)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

* first new commit with new args

* updates methods and test query

* updates age_of_oldest methods params

* cleans up method removes args and updates tests, fixes linting

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-44346 Demo Docket Goal Lever Test Seed Data (#21524)

Co-authored-by: Christopher Detlef <>

* Chrisbdetlef/appeals 40705 (#21535)

* Chris backend Work

* APPEALS-44441. Added initial changes for individual seed

* WIP

* APPEALS-44441. Fixed the table css

* APPEALS-44441. Added Custom and Scenario Seed components and jest tests

* APPEALS-44441. Fix ScenarioSeeds jest test

* APPEALS-44441. Fix CustomeSeeds Jest test

* init commit

* fixes linting issues

* capybara test init

* APPEALS-44441. Backend Integration API changes

* APPEALS-44441_1. Matched the constant keys in the backend

* APPEALS-44441_1. Update the param to match the backend and fixed spec

* APPEALS-44441. lint fixes

* APPEALS-44441. linting fixes

* sharsha/APPEALS-44441. fixed the route and tests

* Change route

* Change variables to match front and back end

* CustomSeed Jest test fix

* Fix issues

* Fix rubocop issues

* Use existing method in the controller

---------

Co-authored-by: Christopher Detlef <>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Michael Beard <michael.beard@va.gov>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 (#21566)

* Fixed rspec failures on constants

* APPEALS-45531. Remove dead code

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Updated lever history to handle null unit values from docket levers (#21567)

Co-authored-by: 631966 <amy.detwiler@va.gov>

* Sharsha/appeals 45531_1 (#21573)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Sharsha/appeals 45531 1 (#21609)

* APPEALS-45531. Add the controller which is used in the route

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

* TEST FOR FIX

* MORE TESTING

* Fixed rspec issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45502. Organize route and fix the controller (#21595)

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* Ricky/APPEALS-36345.fixes (#21612)

* Updated lever history to handle null unit values from docket levers

* Updated member view of exclusion table with proper text display and fixed missing css

* Updated unit test and test data to test rendering of exclusionTable

---------

Co-authored-by: 631966 <amy.detwiler@va.gov>

* ricky/APPEALS-44053 (#21587)

* init commit, adds conditional to check for docket_type ama to method, fixes json constants to snakecase

* puts statements testing

* updates seeds for evidence_submission, adds method to hearing_request_docket.rb and dist_concern.rb

* updated appeals dsit

* final fix for PR

* updates spec to reflect changes in hearing_request_docket

* uncomments seeds

* Ricky/appeals 43523 (#21649)

* Added Assignment Queue link to Switch Users test page

* Updated controller to validate role and redirect

* Updated error information

* Updated rspec tests

---------

Co-authored-by: 631068 <rickybmanus@gmail.com>

* APPEALS-45898. Updated the lever_group_order values (#21639)

* APPEALS-45898. Updated the lever_group_order values

* APPEALS-45898. Updated order of the evidence submission priority and non-priority

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-40646 (#21645)

* Init commit

* adds methods and useffect first pass

* fixes isIdle warning

* removes important from scss

* refined handleToggleChange method

* updates font color for h4

* adds keys to the td and fixed proptype for loadAcdExcludeFromAffinity in casedistributionapp

* Chrisbdetlef/appeals 43117.cleanup (#21671)

* APPEALS-43421: Attorney Selection Sticking on Dropdown after Assignment (#21401)

* redo init commit

* updated imp. logic

* attorney widget fix

---------

Co-authored-by: Calvin <Calvin.Costa@va.gov>

* Add ruby CE API Gem

* remove correspondence changes from schema.rb (#21468)

* Revert "Add ruby CE API Gem" (#21479)

This reverts commit c78afe30620716d59d2ac31ad6eed71585d78a98.

* Override SCT Bulk Assign Page task limit (#21465)

* Override SCT Bulk Assign Queue 15 case limit & Adjust SCT attorney assign task action label

* feature/APPEALS-35707-29633-29632 (prodtest) (#21485)

* 🔀 Squash merge AlecK/APPEALS-35707 - Replace `database_cleaner` with `database_cleaner-active_record`

* 🔀 Squash merge jcroteau/APPEALS-29632-fix-deprecation-action-view-base-instances

* 🔀 Squash merge jcroteau/APPEALS-29633-fix-deprecation-warning-active_record-result-to_hash

* feature/APPEALS-44871 Steps for installing node in the Caseflow demo environment  (#21483) (#21484)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Revert "feature/APPEALS-44871 Steps for installing node in the Caseflow demo …" (#21489)

This reverts commit a6262001f9bedabca60598c82bfe1b803f0f16c7.

* Sbashamoni/appeals 44871 node14 demo fixes (#21490) (#21495)

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* add error rules to demo builds (#21496) (#21498)

Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>

* APPEALS-43117 Add QA Users for testing

* Fix rspecs

* Fix issues with attorneys and judge teams

* Fix org count

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: youfoundmanesh <maneshreddy.kommidi@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: davis-dwayne <47563178+davis-dwayne@users.noreply.github.com>
Co-authored-by: Christopher Detlef <>

* Minor fixes (#21694)

* Minor fixes

* Fix rspec tests and properly check for judge css id

* Fix lint issue

---------

Co-authored-by: Christopher Detlef <>

* Fix Legacy Case issues (#21747)

Co-authored-by: Christopher Detlef <>

* APPEALS-46037. Fix padding in the lever history table (#21725)

* APPEALS-46037. Fix padding in the lever history table

* APPEALS-46037. Fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Fix Lauren Roth issue (#21813)

* Users with a VACOLS::Staff entry no longer get created with the default name of Lauren Roth

Co-authored-by: Christopher Detlef <>

* ricky/APPEALS-44044 (#21814)

* first pass at legacy_docket method and spec

* second iteration of legacy_docket and spec

* adds method to age_of_oldest methods and updates test scenarios

* Updated testing and expanded method missing logic

* Updated legacy_docket_spec file and tests

* Updated boolean logic, updated rspecs and factories

* Updated rspec tests to include factories

* updates docket_spec line 317 and factory for disable_ama_non_priority_direct_review

---------

Co-authored-by: Michael Beard <michael.beard@va.gov>

* updates ready_priority_nonpriority_appeals to public_send, updates test (#21844)

* APPEALS-36333 first iteration of docket time goal and prior to goal (#21523)

* APPEALS-36333 first iteration of docket time goal and prior to goal

* APPEALS-36333 address pr comments and moved the logic to docket model

* APPEALS-36333 Added specs for docket and hearing request docket models

* refactored code and moved it to distribution scopes

* APPEALS-36333 address pr comments and refactor code

* APPEALS-43996 updated lever name in all the required files to fix spec failures

* APPEALS-44000 revert hearing request docket model changes to keept it in sync with feature

* APPEALS-44000 updated hearing request docket model specs

* APPEALS-44000 fixed jest tests

* APPEALS-44000 fixed broken rspecs

* APPEALS-43996 fix rubocop warnings

* APPEALS-43996 fix push priority job spec failures

* APPEALS-43996 Updated case distribution lever and docker model and refactor specs

* APPEALS-43996 added rake task to update case distribution lever item in db

* APPEALS-43996 update docket model to handle the scenario when the lever being disabled by a user via the UI

* APPEALS-43996 update section title

* APPEALS-43996 revert rake task

* APPEALS-43996 add new factories to case distribution lever and fix spec failures

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks (#21834)

* APPEALS-45191. Added columns to the appeals ready to distribute query and made some tweaks

* APPEALS-45191. Refactor and fix lint issues

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* refactor the logic and fix docket spec failures

* changed the call times to 3 times

* APPEALS-36333 fixed the docket time goal to check the existence of the item before using the public send to get the value

---------

Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: 631966 <amy.detwiler@va.gov>

* updated the seeds to align with the work completed

* Updated Toggle Switch behavior when clicked while idle (#21874)

* Csv research (#21892)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

* csv and etc

* CSS for buttons

* jest tests for the reducer and action types

* Jest test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-46057. CleanUP (#21914)

* more jest tests

* Disable scenario seeds

* Lint fixes

* APPEALS-46057. disable all scenario seeds

* APPEALS-46057. Refactor the TestSeed wrapper to be a functional component and fixed jest test

* APPEALS-46057. Jest job in GHA complaining on test

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* updates line of test to correctly build lever item (#21918)

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-45191. Updated the query to return the date based on the calculation (#21928)

* APPEALS-45191. Updated the query to return the date based on the calculation

* APPEALS-45191. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisharsha/appeals 43962 (#21929)

* Sharsha/appeals-44911_1 (#21784)

* APPEALS-44911. Change the pure react components to functional components

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Chrisbdetlef/appeals 44910 (#21838)

* Initial

* Add JSON parsing and multiple calls to rake tasks

* Pre-caby tets

* Add capybara tests and add IDs to buttons

---------

Co-authored-by: Christopher Detlef <>

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: cdetlefva <133903625+cdetlefva@users.noreply.github.com>

* APPEALS-43962. Lint fixes (#21932)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* Ricky/APPEALS-47293 (#21925)

* First pass implementation of fixing seeding rspecs

* Second pass at fixing errors in rspecs

* Revert updates to test if rspec passes

* Fixed linting issues in test_docket_seeds_controller_spec

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-48292 updated the column to be a string (#21954)

* APPEALS-48292 updated the column to be a string

* APPEALS-48292 added comment to the control_group field in the migration

* APPEALS-48292 added column comment to the schema, changed migration so that it can be rolled back

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false (#21948)

* APPEALS-48598 fix logic when Start Distribution Prior to Docket Time Goal toggle is false

* APPEALS-49004 added spec to check when Start Distribution Prior to Docket Time Goal toggle is on

* APPEALS-49004 fixed lint issues in docket.rb

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query (#21949)

* APPEALS-48898. Created Distributable AMA Non-priority Appeals Query

* APPEALS-48898. Renamed the column and update the method

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-49100. getting value from the start_distribution_prior_to_goal (#21968)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-46257 (#21976)

* updates routes and frontend urls to namespace

* removes superfluous <a> tags

* Ensure that legacy appeals are being created (#21981)

* Ensure that legacy appeals are being created

* Remove puts

---------

Co-authored-by: Christopher Detlef <>

* APPEALS-49403. Added buttons Docket Lever Seed (#21989)

* APPEALS-49403. Added buttons Docket Lever Seed

* sharsha/APPEALS-49403. Updated the endpoint URL path

* APPEALS-49403. Lint fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-44000 added check to skip priority appeals in docket model (#21992)

* Feature/appeals 36234 masterupgrade (#22003)

* sbashamoni/APPEALS-43724 Node 16 version upgrade changes (#21966) (#21975)

* Update node verstion to 16 in git workflow

* Update node verstion to 16 in nvm and dockerfile for demo

* Update node version in yarn.lock and package.json and .nvmrc file

* Update node's version path to node16 in docker-bin/env.sh

* Update and upgrade to node16 in client

* More updates to yarn.lock and package.json

* Fix tests by Adam Shaw

* Upadate snapshot for ScheduleVeteran.test.js.snap

* Doing some code clean up

* Doiing some more clean up

* Add and remove spaces to match master

* One more space to take care of

* One more space to take care of again

* One more space to take care of again

---------

Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* init master merge branch

---------

Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: ramon-chavez <Ramon.Chavez@va.gov>

* Remove AOD trait from non-priority legacy appeal creation (#22013)

Co-authored-by: Christopher Detlef <>

* Sharsha/appeals 49461 (#22018)

* sharsha/APPEALS-49461. initial commit

* sharsha/APPEALS-49461. fix

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49421 (#22014)

* init commit fixes ama_np_ capybara test to expect user as admin, and first attempt  test_docket_seeds test

* removes previous chane for TASKS_LOADED

* fixes capybara for test seeds controller button ids

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-49403. Updated the buttons label (#22025)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* mbeard/APPEALS-49585 (#22020)

* init commit for non member view input

* fixes css issue for docket-lever-right

* Added a hyphen between value and unit for member only view

* replaces hyphen with comma

* Init commit replaces th with div for 508 compliance (#22036)

* Chrisbdetlef/appeals 47008 1 (#22040)

* Allow judges to see legacy cases and attorneys to be assigned cases

* Remove testing function

* Update spec to reflect new user count in seed file

---------

Co-authored-by: Christopher Detlef <>

* got rid of extraneous file

* got rid of yarn lock orig

* APPEALS-50734. Remove Legacy appeals from the query (#22071)

Co-authored-by: SHarshain <spoosa@razortalent.com>

* APPEALS-46087 fix css table width issues for case distribution lever history table (#22024)

* Feature/appeals 36234.merge master.20240701 (#22075)

* APPEALS-47277 remove Vegas office (#21876)

* APPEALS-47277 remove Vagas office

* Removed Texas ID from other files and updated tests

* Snapshot update

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* hotfix/APPEALS-22403 (#21942)

* add identifier for filenumber or ssn in filenumber search

* linting

* codeclimate linting

* update match call to return boolean

---------

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* APPEALS-46907: Update to Determination of Gen Pop Legacy Cases (#21986)

* Isaiah/merge 46910 (#21983)

* removed BFHINES checks and modified tests

* removed lingering bfhines test

* modified test

* most recent updates on tests for passing status

* removed refs to cavc updates

* Skip flaky test ro_viewhearsched_spec

---------

Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* APPEALS-44916: Case Distribution Affinity Calculations (#21899)

* APPEALS-44956: Add AppealAffinity model and database table (#21526)

* add migration for appeal_affinities

* add AppealAffinity model and associations, update migration for new column

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

* add new job, update affinity model validation and after save hook

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

* add return in job if no query results, tests for no query results

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

* remove comment, fix hearing factory, disable some seeds for testing

* add more tests

* test refactor

* update appeals for dist query to add affinity start, add seed file, fix hearing factory, add stat to dist factory

* disable new seed on reset

* update seed file with vet names, add another seed category

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* APPEALS-44959: Modify affinity date checks to use appeal_affinity (#21611)

* swap distribution queries from distribution_task to appeal_affinities

* update seed files to use appeal affinities instead of distribution task

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

* fix user seed, fix date format in distribution task instructions

* fix tests for date format update

* Calvin/APPEALS-44957-rake-affinity (#21577)

* grabbed receipt dates from distributed cases

* refactored for functionality + added method to grab appeals that match

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

* if appeal affinity is nil, it will now be updated

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

* updated start date to receipt date instead of Time.now

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

* APPEALS-46016: Add Affinity Start Date to the Explain Page (#21660)

* add affinity start date to explain page

* add feature test to verify dates display

* update rake task and spec (#21731)

* APPEALS-46325: Add Seeds for AOD Appeals and Update Dates to Match CAVC (#21730)

* add aod hearing cases to ama affinity cases seed

* fix lever spec

* APPEALS-45148: Hook to clear saved affinity date (#21623)

* initial imp. idea

* AC1: check for affinity_start_date on assignment

* AC2/3: update affinity start date  w/ instr.

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

* add case dist lever to new tests (#21776)

* remove unnecessarily included module from job (#21827)

* APPEALS-47211: Improve Performance of Distribution Queries (#21840)

* rework ready_for_distribution scope

* fix non-hearing docket distribution bug

* restart tests

* added null checks for appeal affinity in distribution queries, update tests (#21893)

* add check for appeal being active to distribution and associated slack message (#21902)

* Update users_spec.rb

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* hotfix/APPEALS-45177: TaskTable Default Sorting Fix (#21772)

* Updated the TaskTable component to use the defaultSort property instead of the defaultSortIdx property for queue table since that property is not used anywhere. Added a default sorting hash to the UnassignedCasesPage component and now pass that down to TaskTable. Removed references to defaultSortIdx.

* Added the type column default sort to the AssignedCasesPage widget as well.

* Added a parenthesis for clarity around a boolean. Moved the defaultSortingHash out into a constants file.

---------

Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>

* APPEALS-47106 Caseflow Swagger (#21993)

* Add Rswag and convert existing API documentation (#21778)

* add rswag

* Update Gemfile.lock

* Setup yaml UI

* remove and reroute old swagger files

* update format and servers values

* Update route_docs_controller.rb

* Update cmp_controller.rb

* cmp endpoint yaml

* cmp endpoint to return 501

* CMP endpoint swagger flies

* update swagger files

* adjust server order, add auth token

* cmp parameter name change

* add comments

* Update users_controller.rb

* unit tests and linting

* lint fixes

* Update swagger_helper.rb

* APPEALS-48048 Swagger Updates (#21909)

* update servers to not include a host

* remove host for server

* remove generated swaggers from definitions

* remove internal API endpoints from having generated swagger

* IDT servers fixes

* disable CMP swagger in prod and prodtest

* set authorization correctly

* fix what is required for CMP upload

* fix linting issues, update lint rake task to autocorrect for rubocop, add rubocop make command

* Update decision_reviews.yaml

* Update ama_issues.yaml

* Update vacols_issues.yaml

* Update swagger.yaml

* fix check failures

* Update docs_controller_spec.rb

* fix unit tests

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update rswag_ui.rb

* Update lint.rake

* Update decision_reviews_spec.rb

* Update fetch_all_active_legacy_a…
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.

2 participants