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

APPEALS-53603: Modify logic to always show recipient information if present #22414

Merged
merged 5 commits into from
Aug 8, 2024

Conversation

noahhansen-gov
Copy link
Contributor

@noahhansen-gov noahhansen-gov commented Aug 6, 2024

Resolves Modify logic to always show recipient information if present

Description

Please explain the changes you made here.
The logic in NotificationTableColumns.jsx is modified to show recipient information if it is present in the database.
The recipientInformationColumn valueFunction no longer relies on notification status when determining whether to show the recipient information or a dash.
See implementation note for suggestion.

Acceptance Criteria

  • Code compiles correctly

Testing Plan

  1. Go to https://jira.devops.va.gov/browse/APPEALS-53933

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

Copy link

codeclimate bot commented Aug 6, 2024

Code Climate has analyzed commit 1ae812f and detected 2 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 2

View more on Code Climate.

@noahhansen-gov noahhansen-gov marked this pull request as ready for review August 7, 2024 13:08
@msteele96 msteele96 changed the base branch from master to feature/APPEALS-50887 August 7, 2024 13:39
@msteele96 msteele96 merged commit bdf4c10 into feature/APPEALS-50887 Aug 8, 2024
17 checks passed
@msteele96 msteele96 deleted the noah/APPEALS-53603 branch August 8, 2024 13:57
ThorntonMatthew added a commit that referenced this pull request Aug 31, 2024
* Remove transaction_wrapper

* Remove extra newline

* APPEALS-51045: Remove ReceiveNotificationJob (#22207)

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* MattT/APPEALS-51115: Initialize FIFO SQS Queues Locally (#22182)

* Set local env to utilize FIFO queues where appropriate

FIFO queues are configured with the same attributes as our queues in higher environments.

* Resolve failing test

* Remove defunct test

* Update make commands

---------

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

* APPEALS-51847: Institute Database Migration for Establishing 'sms_status_reason' and 'email_status_reason' Columns (#22208)

* adding and running migration

* adding comments to migration and re running db:migrate

* pushing up original scheam

* committing schema

* small edit to migration and deleting unnecessary columns from schema

---------

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

* removing job and all mentions of job (#22212)

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

* MattT/APPEALS-51059: Alter Select Quarterly Statuses (#22239)

* Alter status messages

* Save more info in fake response

* Swap keys

* Add missing param

* Test fixes. Also, setting appeal_docketed to false whenever appeals are decided or cancelled

* Fix fasterer issue

---------

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

* MattT/APPEALS-51101: Rewrite ProcessNotificationStatusUpdateJob to Consume Messages from an SQS Queue (#22247)

* Update fake response body

* Try enabling localstack in CI

* Init SqsService and alter most/all of the ProcessNotificationStatusUpdatesJob

* Create SQS queues in test env

* Change port formatting

* Mount docker socket

* Try localstack hostname

* Wait for localstack in CI

* Add more yarddoc comments

* Log errors and number of messages processed

* Add custom error classes

* Add yarddoc comments to SqsService class

* Create SqsService spec file

* Redo much of ProcessNotificationStatusUpdatesJob's spec file

* Disable line length checks for yarddoc comments

---------

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

* APPEALS-51087: Rewrite Api::V1::VaNotifyController#notification_update Controller Action to No Longer Utilize Redis (#22295)

* initial push

* rubocop'n

* fixing tests?

* rubocop'n

* addressing most of matt's comments

* removing yard doc files and keeping comment

* rubocop

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* Remove extra attribute

* Fix incorrect log counts

* Fix log statement

* Fix typo

* APPEALS-53603: Modify logic to always show recipient information if present (#22414)

* initial commit

* making rspec tests happy

* linting

* adding tests back and refactoring

* small char error

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* Sync decided appeals with states table (#22434)

* APPEALS-52882 Sync decided appeals decision_mailed status

* APPEALS-52882 Fix lint issues

* APPEALS-52882 Fix codeclimate issues

* APPEALS-52882 Address PR feedback

* APPEALS-52882 Address PR feedback

* Jcohen/APPEALS-52861 (#22450)

* APPEALS-52861 Bug fix implemented.

* APPEALS-52861 cleaned up some code through aliasing a common method name between appeal_types, eliminating a check that we do in the AppealDecisionMailed module.

* APPEALS-52861 fixed method name error.

* APPEALS-52861 fixed some tests.

* APPEALS-52861 fixed More tests.

* APPEALS-52861 fixed More tests.

* APPEALS-52861 feature branch changes merged in with working branch and method name changes extracted.

* APPEALS-52861 feature branch changes merged in with working branch and method name changes extracted, included case statement.

* APPEALS-52861 moved case statement to another file to be the boolean check for constested status on an appeal.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-52892: For all legacy appeal states/notifications check status in VACOLS (#22455)

* initial commit

* addressing comments

* small change

* making tests
happy

* fixing spec tests

* rubocop'n

* reverting

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-55159: Parameter Requirements Are Too Stringent Given What We Will Expect from VA Notify (#22561)

* APPEALS-55159

* updating tests

* APPEALS-55159 Refactor permitted and required params

* APPEALS-55159 Fix linting issue

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: msteele <Marc.Steele@va.gov>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Adding rake task to sync decided appeals (#22492)

* APPEALS-52872 Add rake task to sync decided appeals

* APPEALS-52872 Remove byebug

* APPEALS-52872 Fixing lint errors

* APPEALS-52872 Addressing performance issues

* APPEALS-52872 Addressing performance issues

* APPEALS-52872 Fix ENV variable update

* APPEALS-52872 Parallelizing AppealState updates

* APPEALS-52872 Remove byebug

---------

Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Prevent Prodtest from contacting VA Notify Staging (#22629)

* APPEALS-54918 Update VA Notify fake service and initializer

* APPEALS-54918 Add CASEFLOW_BASE_URL env var in demo/dev

* APPEALS-54918 Add seed file for API Key and added to main seed execution

* APPEALS-54918 Add missing argument to method definition

* APPEALS-54918 Update "to" params and fix linting issues

* APPEALS-54918 Prevent post requests in test env

* Rename ApiKeys seed file

* Fix linting error on require statement

* Add argument for call within sync_review_job.rb and minor refactor

* Inherit seed from base, align with AMA for seed file placement

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: msteele <Marc.Steele@va.gov>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>
ThorntonMatthew added a commit that referenced this pull request Sep 4, 2024
* Remove transaction_wrapper

* Remove extra newline

* APPEALS-51045: Remove ReceiveNotificationJob (#22207)

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* MattT/APPEALS-51115: Initialize FIFO SQS Queues Locally (#22182)

* Set local env to utilize FIFO queues where appropriate

FIFO queues are configured with the same attributes as our queues in higher environments.

* Resolve failing test

* Remove defunct test

* Update make commands

---------

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

* APPEALS-51847: Institute Database Migration for Establishing 'sms_status_reason' and 'email_status_reason' Columns (#22208)

* adding and running migration

* adding comments to migration and re running db:migrate

* pushing up original scheam

* committing schema

* small edit to migration and deleting unnecessary columns from schema

---------

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

* removing job and all mentions of job (#22212)

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

* MattT/APPEALS-51059: Alter Select Quarterly Statuses (#22239)

* Alter status messages

* Save more info in fake response

* Swap keys

* Add missing param

* Test fixes. Also, setting appeal_docketed to false whenever appeals are decided or cancelled

* Fix fasterer issue

---------

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

* MattT/APPEALS-51101: Rewrite ProcessNotificationStatusUpdateJob to Consume Messages from an SQS Queue (#22247)

* Update fake response body

* Try enabling localstack in CI

* Init SqsService and alter most/all of the ProcessNotificationStatusUpdatesJob

* Create SQS queues in test env

* Change port formatting

* Mount docker socket

* Try localstack hostname

* Wait for localstack in CI

* Add more yarddoc comments

* Log errors and number of messages processed

* Add custom error classes

* Add yarddoc comments to SqsService class

* Create SqsService spec file

* Redo much of ProcessNotificationStatusUpdatesJob's spec file

* Disable line length checks for yarddoc comments

---------

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

* APPEALS-51087: Rewrite Api::V1::VaNotifyController#notification_update Controller Action to No Longer Utilize Redis (#22295)

* initial push

* rubocop'n

* fixing tests?

* rubocop'n

* addressing most of matt's comments

* removing yard doc files and keeping comment

* rubocop

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* Remove extra attribute

* Fix incorrect log counts

* Fix log statement

* Fix typo

* APPEALS-53603: Modify logic to always show recipient information if present (#22414)

* initial commit

* making rspec tests happy

* linting

* adding tests back and refactoring

* small char error

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* Sync decided appeals with states table (#22434)

* APPEALS-52882 Sync decided appeals decision_mailed status

* APPEALS-52882 Fix lint issues

* APPEALS-52882 Fix codeclimate issues

* APPEALS-52882 Address PR feedback

* APPEALS-52882 Address PR feedback

* Jcohen/APPEALS-52861 (#22450)

* APPEALS-52861 Bug fix implemented.

* APPEALS-52861 cleaned up some code through aliasing a common method name between appeal_types, eliminating a check that we do in the AppealDecisionMailed module.

* APPEALS-52861 fixed method name error.

* APPEALS-52861 fixed some tests.

* APPEALS-52861 fixed More tests.

* APPEALS-52861 fixed More tests.

* APPEALS-52861 feature branch changes merged in with working branch and method name changes extracted.

* APPEALS-52861 feature branch changes merged in with working branch and method name changes extracted, included case statement.

* APPEALS-52861 moved case statement to another file to be the boolean check for constested status on an appeal.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-52892: For all legacy appeal states/notifications check status in VACOLS (#22455)

* initial commit

* addressing comments

* small change

* making tests
happy

* fixing spec tests

* rubocop'n

* reverting

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-55159: Parameter Requirements Are Too Stringent Given What We Will Expect from VA Notify (#22561)

* APPEALS-55159

* updating tests

* APPEALS-55159 Refactor permitted and required params

* APPEALS-55159 Fix linting issue

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: msteele <Marc.Steele@va.gov>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Adding rake task to sync decided appeals (#22492)

* APPEALS-52872 Add rake task to sync decided appeals

* APPEALS-52872 Remove byebug

* APPEALS-52872 Fixing lint errors

* APPEALS-52872 Addressing performance issues

* APPEALS-52872 Addressing performance issues

* APPEALS-52872 Fix ENV variable update

* APPEALS-52872 Parallelizing AppealState updates

* APPEALS-52872 Remove byebug

---------

Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Prevent Prodtest from contacting VA Notify Staging (#22629)

* APPEALS-54918 Update VA Notify fake service and initializer

* APPEALS-54918 Add CASEFLOW_BASE_URL env var in demo/dev

* APPEALS-54918 Add seed file for API Key and added to main seed execution

* APPEALS-54918 Add missing argument to method definition

* APPEALS-54918 Update "to" params and fix linting issues

* APPEALS-54918 Prevent post requests in test env

* Rename ApiKeys seed file

* Fix linting error on require statement

* Add argument for call within sync_review_job.rb and minor refactor

* Inherit seed from base, align with AMA for seed file placement

* APPEALS-57210 Add ssl cert file to request in fake service

* Dst_test_fix (#22708)

* Feature/appeals 47313.bugfix (#22702)

* Remove and reinstall pdfjs-dist@2.6.347 and use cdn to get rid of fake worker warning

* Comment out pdfjs worker lines in documentViewer.js to get rid of fake worker warning

* Add PdfDocument component with no batching

* Add MVP working reader prototype 2.0

* Add reader prototype warning on toolbar

* Add MVP zoom function

* Add prototype route

* Fix next and previous doc links with prototype path

* Extract toolbar buttons out to ReaderToolbar component

* Fix prop type in PdfDocument

* Remove prototype logic

* Clean up prototype with utils

* Fix scroll issue on document list view for Reader

* APPEALS-46785. Add text layer to prototype.

* Revert pdf-annotate changes

* Revert PdfFile imports and comment out pdfjs imports

* Remove extra sidebar html in PdfDocument

* Remove unnecessary props from PdfDocument

* Add WIP rotate function

* Clean up components and css

* Add pageUtil and clean up PdfDocument

* Update rotate function

* Fix sidebar css to dynamically shrink

* APPEALS-46785. Add test coverage for pageUtil#renderPage.

* APPEALS-46785. Search functionality for Reader prototype.

* Update yarn.lock after rebasing.

* APPEALS-48219. Prototype version of issue tags.

* Update css for page rotate function

* Remove and reinstall pdfjs-dist@2.6.347 and use cdn to get rid of fake worker warning

* APPEALS-46785. Add text layer to prototype.

* Add current page display functionality

* Fix getPageNumFromScrollTop function for when document has been rotated

* Fix getPageNumFromScrollTop function to have max page number

* Fix css for rotation

* Add sidebar categories

* APPEALS-49501. Fix keyboard shortcut modal.

* APPEALS-49501. Make pageUtil into Page component for React efficiency.

* APPEALS-49501. Comments rework.

* APPEALS-49501. Fix test/lint errors.

* APPEALS-515895. Add back-to-documents-list hotkey.

* Layout cleanup and add toggle menu function

* Add MVP WIP DocumentInfo

* Refactor redux appeal and fix Sidebar CSS to scroll

* Update vacolsId proptype to string

* APPEALS-52496. Update layout of Reader Prototype to match original layout.

* Cleaning up imports and removing glamor.

* Potential fix for double render error.

* Add reader prototype feature toggle

* Fix same canvas render error

* Add Fake PDFJS Worker solution

* Add pdfjs worker to intializers assets

* Remove ocr path from documents controller

* Add WIP load document error handling

* Add error handling for PdfDocument when document load failure

* Remove logic to access prototype through url

* Update page title for Reader

* Revert schema

* Extract logic to DocumentLoadError component

* Move banner/format.js to caseflow util directory

* Remove 2.0 components, screens, routes directories and get successful compile

* Remove 2.0 layouts directory

* Remove 2.0 Router component

* Move ErrorBoundary and Loadable components to client/app/components

* Remove 2.0/components/shared directory

* Move 2.0 store

* Remove vscode settings

* Remove 2.0 path lines

* Delete 2.0 path lines in webpack config

* Add back in vscode files

* Fix text layer error. Fix pages leaking between documents.

* Add max width to sidebar css to fix long document type overflow

* Update element name for jump to page function

* Remove scroll into view smooth

* Update current page calculation

* Hide search bar when switching documents.

* Add IntersectionObserver logic to Page

* Add useState

* Add IntersectionObserver logic

* Revert current page logic to use page size estimations instead of IntersectionObserver

* Remove pdfjs imports from documentViewer.js and PdfFile.jsx

* Add page number validation for ReaderFooter page input field

* Cleanup

* Disable previous/next buttons while pdf downloads. (#22511)

* Remove canvas and test relying on it. (#22495)

* Use intersection observer to hide offscreen pages.

* Replace observer with content-visibility css.

* Address comments from code review.

* Davywentwortht2it/fix failures (#22631)

* Remove linting errors.

* Fix broken specs.

* Comment out failing reader tests.

* Update reviewer.scss to fix lint errors

* Add space in reviewer.scss to fix lint error

* Update css name

---------

Co-authored-by: laurenyj <44596134+laurenyj@users.noreply.github.com>

* Re-enable failing specs. (#22666)

* Re-enable failing specs.

* Reduce flakiness of specs.

* Reduce flakiness of specs.

* Reduce flakiness of specs.

* Reduce flakiness of specs.

---------

Co-authored-by: Davy Wentworth <david.wentworth@va.gov>

* Laurenyj/update prototypefooter (#22677)

* fix PdfUIPageNumInput page width bug

* Update prototype reader footer to match original reader footer css updates

* Revert reviewer changes

* move styles to the correct place to override width:100

* Remove unused prototype css

* Update page input test snap

* Revert Page component changes and update with ctx options

---------

Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: mikefinneran <110622959+mikefinneran@users.noreply.github.com>

* Add assets folder to public (#22701)

Co-authored-by: laurenyj <44596134+laurenyj@users.noreply.github.com>

---------

Co-authored-by: laurenyj <44596134+laurenyj@users.noreply.github.com>
Co-authored-by: Davy Wentworth <david.wentworth@va.gov>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>

* Have feature test account for DST

* AM/PM (#22709)

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

---------

Co-authored-by: mikefinneran <110622959+mikefinneran@users.noreply.github.com>
Co-authored-by: laurenyj <44596134+laurenyj@users.noreply.github.com>
Co-authored-by: Davy Wentworth <david.wentworth@va.gov>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@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: mikefinneran <110622959+mikefinneran@users.noreply.github.com>
Co-authored-by: laurenyj <44596134+laurenyj@users.noreply.github.com>
Co-authored-by: Davy Wentworth <david.wentworth@va.gov>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
mikefinneran added a commit that referenced this pull request Sep 5, 2024
* removed not null value on special_issue_changes table.

* Hotfix/appeals 13161 (#22442)

* fix(request issue spec): description validation

* fix(request issue): add description validation

* fix(request issue): add validation to desc input

* fix(request issue): rubocop formatting

* feat(request issue): verbage fix

* fix(request issue): update variable usage

* fix(request issue): add additional characters to negative test

* fix(request issue): add positive rspec test

* fix(request issue): add negative UI test

* fix(request issue): add positive UI test

* fix(request issue): negative UI test checks error message

* fix(request issue): grammar edit

* fix(request issue): minor

* fix(request issue): minor

* fix(request issue): code climate fix

* fix(request issue): code climate fix

* fix(requst issue): extract description validator

* fix(request issue): add input validation to unidentified issue modal

* fix(unidentified issue modal): test update minor

* fix(unidentified issues modal): description happy path test

* fix(unidentified issues modal): add failing description test

* fix(request issues): linting

* hotfix/APPEALS-53209 (#22393)

* add a check to make sure the DistributionTask has been completed

* add testing for move_review_to_distribution bug

* fix lint issues

* fix a couple of the failing tests

* remove comment / fix spacing

* fix codeclimate issues

* fix test

* fix edit_spec.rb test

* revert test changes

* adjust split_appeal_controller_spec and add a distribution_task check

* refactors distributed? function

* reverts refactor

* attempts refactor

* revert the refactor 2.0

---------

Co-authored-by: Zackary Borges-Rowe <borges-rowe_zackary@bah.com>
Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>

* hotfix/APPEALS-36540

Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>

* Revert "Hotfix/appeals 13161 (#22442)" (#22681)

This reverts commit d9419ba7e2a1caa1bf20859d367922526a667b72.

* Feature/appeals-47313 (#22680)

* Remove and reinstall pdfjs-dist@2.6.347 and use cdn to get rid of fake worker warning

* Comment out pdfjs worker lines in documentViewer.js to get rid of fake worker warning

* Add PdfDocument component with no batching

* Add MVP working reader prototype 2.0

* Add reader prototype warning on toolbar

* Add MVP zoom function

* Add prototype route

* Fix next and previous doc links with prototype path

* Extract toolbar buttons out to ReaderToolbar component

* Fix prop type in PdfDocument

* Remove prototype logic

* Clean up prototype with utils

* Fix scroll issue on document list view for Reader

* APPEALS-46785. Add text layer to prototype.

* Revert pdf-annotate changes

* Revert PdfFile imports and comment out pdfjs imports

* Remove extra sidebar html in PdfDocument

* Remove unnecessary props from PdfDocument

* Add WIP rotate function

* Clean up components and css

* Add pageUtil and clean up PdfDocument

* Update rotate function

* Fix sidebar css to dynamically shrink

* APPEALS-46785. Add test coverage for pageUtil#renderPage.

* APPEALS-46785. Search functionality for Reader prototype.

* Update yarn.lock after rebasing.

* APPEALS-48219. Prototype version of issue tags.

* Update css for page rotate function

* Remove and reinstall pdfjs-dist@2.6.347 and use cdn to get rid of fake worker warning

* APPEALS-46785. Add text layer to prototype.

* Add current page display functionality

* Fix getPageNumFromScrollTop function for when document has been rotated

* Fix getPageNumFromScrollTop function to have max page number

* Fix css for rotation

* Add sidebar categories

* APPEALS-49501. Fix keyboard shortcut modal.

* APPEALS-49501. Make pageUtil into Page component for React efficiency.

* APPEALS-49501. Comments rework.

* APPEALS-49501. Fix test/lint errors.

* APPEALS-515895. Add back-to-documents-list hotkey.

* Layout cleanup and add toggle menu function

* Add MVP WIP DocumentInfo

* Refactor redux appeal and fix Sidebar CSS to scroll

* Update vacolsId proptype to string

* APPEALS-52496. Update layout of Reader Prototype to match original layout.

* Cleaning up imports and removing glamor.

* Potential fix for double render error.

* Add reader prototype feature toggle

* Fix same canvas render error

* Add Fake PDFJS Worker solution

* Add pdfjs worker to intializers assets

* Remove ocr path from documents controller

* Add WIP load document error handling

* Add error handling for PdfDocument when document load failure

* Remove logic to access prototype through url

* Update page title for Reader

* Revert schema

* Extract logic to DocumentLoadError component

* Move banner/format.js to caseflow util directory

* Remove 2.0 components, screens, routes directories and get successful compile

* Remove 2.0 layouts directory

* Remove 2.0 Router component

* Move ErrorBoundary and Loadable components to client/app/components

* Remove 2.0/components/shared directory

* Move 2.0 store

* Remove vscode settings

* Remove 2.0 path lines

* Delete 2.0 path lines in webpack config

* Add back in vscode files

* Fix text layer error. Fix pages leaking between documents.

* Add max width to sidebar css to fix long document type overflow

* Update element name for jump to page function

* Remove scroll into view smooth

* Update current page calculation

* Hide search bar when switching documents.

* Add IntersectionObserver logic to Page

* Add useState

* Add IntersectionObserver logic

* Revert current page logic to use page size estimations instead of IntersectionObserver

* Remove pdfjs imports from documentViewer.js and PdfFile.jsx

* Add page number validation for ReaderFooter page input field

* Cleanup

* Disable previous/next buttons while pdf downloads. (#22511)

* Remove canvas and test relying on it. (#22495)

* Use intersection observer to hide offscreen pages.

* Replace observer with content-visibility css.

* Address comments from code review.

* Davywentwortht2it/fix failures (#22631)

* Remove linting errors.

* Fix broken specs.

* Comment out failing reader tests.

* Update reviewer.scss to fix lint errors

* Add space in reviewer.scss to fix lint error

* Update css name

---------

Co-authored-by: laurenyj <44596134+laurenyj@users.noreply.github.com>

* Re-enable failing specs. (#22666)

* Re-enable failing specs.

* Reduce flakiness of specs.

* Reduce flakiness of specs.

* Reduce flakiness of specs.

* Reduce flakiness of specs.

---------

Co-authored-by: Davy Wentworth <david.wentworth@va.gov>

* Laurenyj/update prototypefooter (#22677)

* fix PdfUIPageNumInput page width bug

* Update prototype reader footer to match original reader footer css updates

* Revert reviewer changes

* move styles to the correct place to override width:100

* Remove unused prototype css

* Update page input test snap

* Revert Page component changes and update with ctx options

---------

Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: mikefinneran <110622959+mikefinneran@users.noreply.github.com>

---------

Co-authored-by: laurenyj <44596134+laurenyj@users.noreply.github.com>
Co-authored-by: Davy Wentworth <david.wentworth@va.gov>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>

* feature/APPEALS-32376 (Release Candidate) (#22673)

* APPEALS-36751 deleted set_time_zone.rb file

* APPEALS-37039 branch init.

* APPEALS-36751 deleted set_time_zone.rb file (#20493)

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

* APPEALS-36751 delete hearing_for_hearing_day_serializer.rb for code pruning

* APPEALS-37039 migrations made. up and down methods need to be completed.

* APPEALS-37039 migrations ran. schema updated.

* APPEALS-37039 applied expected fixes

* APPEALS-37039 schema changes.

* [APPEALS-36748] Passing timezone context during Schedule Veteran form submission

* [APPEALS-36748] Adding comments about timezone conversions

* [APPEALS-36748] Updating Hearing Time dropdown values

* [APPEALS-36748] Display Hearing Times in the correct timezone on the Daily Docket

* [APPEALS-36748] Fixing codeclimate errors

* APPEALS-37127 created new middleware class and spec file

* [APPEALS-36748] Fixing codeclimate and jest errors

* [APPEALS-36748] Fixing codeclimate and jest errors

* APPEALS-37127 added middleware to shoryuken file

* APPEALS-37561 new branch init. serializers updated.

* APPEALS-37561 spec/serializers/api/v2/hearing_serializer_spec.rb updated to test functionality with added attribute to serializer file.

* APPEALS-37127 switched to time.use_zone

* APPEALS-37039 branch init.

* APPEALS-37039 migrations made. up and down methods need to be completed.

* APPEALS-37039 migrations ran. schema updated.

* APPEALS-37039 applied expected fixes

* APPEALS-37039 schema changes.

* APPEALS-36751 deleted set_time_zone.rb file

* APPEALS-36751 delete hearing_for_hearing_day_serializer.rb for code pruning

* APPEALS-37561 new branch init. serializers updated.

* APPEALS-37561 spec/serializers/api/v2/hearing_serializer_spec.rb updated to test functionality with added attribute to serializer file.

* [APPEALS-36748] Fixing jest errors

* APPEALS-37127 updated rspec file, moved rspec file to correct directory, updated middleware file to always change timezone regardless

* APPEALS-37127 updated comment for middleware

* APPEALS-37095 branch init. New attribute added to factories/hearing.rb

* APPEALS-37095 New attribute added to factories/legacy_hearing.rb

* Add jest debugger

* [APPEALS-36748] Addressing PR feedback

* Update snapshot

* APPEALS-37127 fixed linter issues with method parameters

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

* APPEALS-37127 change use_zone call to fix rubocop issues

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

* [APPEALS-37094] Updating regional_office_timezone method

* APPEALS-37615 persisted scheduled_in_timezone attribute for ama and legacy hearings

* APPEALS-37615 schema update

* [APPEALS-37094] Fixing tests

* APPEALs-37095 2/02/24 EOD.Hearings Factory set for more dynamic info in regards to the timezone of the hearing.

* [APPEALS-37094] Fixing tests

* [APPEALS-37094] Updating snapshots

* APPEALS-37615 added rspec tests and bug fixes discovered from said tests

* [APPEALS-37094] Fixing tests

* Remove UAT block

* APPEALS-37615 failing rspec test fixes part 1

* [APPEALS-37094] Addressing PR feedback

* APPEALS-37095 Successfully updated both factories to dynamically produce appropriate values of timezones in relation to hearing locations.

* Update snapshot

* [APPEALS-37094] Addressing PR feedback

* APPEALS-37615 updated more rspec files to fix errors

* APPEALS-37615 removed byebug

* APPEALS-37095 working through fixing tests.

* Add some unit tests

* APPEALS-37615 made rubocop fixes and changed string to only have timezone

* APPEALS-37615 updated schema file to be same as feature branch's

* APPEALS-37615 removed newline that was messing things up

* APPEALS-37615 undo last commit

* APPEALS-37095 Tests in both models are now all passing. Going to add one more to keep context relevant in one of the legacy_hearing_spec tests.

* APPEALS-37095 additional test added to legacy_hearing_spec.

* Rubocop fixes

* A couple more Rubocop fixes

* More rubocop fixes

* APPEALS-37095 made adjustments per TL comments

* Revert "Rubocop fixes"

This reverts commit 18018fa79771ad1588c0dbdb0f6baad9765b3440.

* Fix spacing

* Add back in Rubocop fix

* Add back in another Rubocop fix

* Wmedders21/appeals 37096 (#21823)

* Use new db timezone comlumn value unless it is nil

* update comments to reflect new functionality

* Update test expectations to follow new functionality

* include missing schema update

* add spaces for readability

* Piedram/appeals 39890 (#21879)

* skip the functionality from this spec

* modified spec

* Wmedders21/appeals 37040 (#21890)

* Fix: incorrect proptype causing error in console

* Feature: HearingTimeScheduledInTimezone

* Render HearingTimeScheduledInTimezone if scheduledInTimezone value exists

* Add style to stylesheet instead of using glamor css

* Update jest snapshot

* Remove px for lint error

* ETL Migration scheduled_in_timezone on hearings (#21952)

* ETL Migration scheduled_in_timezone on hearings

* Change to inherit from caseflow migration

* APPEALS-39997 spec fixes (#21845)

* APPEALS-39997 spec fixes

* APPEALS-39997 spec fix in build_hearsched_spec

* APPEALS-39997 fix schedule time string

* Appeals-39997 spec fix in virtual hearing time slots

---------

Co-authored-by: Jim Foley <james.foley4@va.gov>

* Wmedders21/appeals 49036 (#21990)

* Add scheduled_in_timezone to mirrored_hearing_attributes

* Refactor status string to fit within 32 char limit set by appeals table on ETL schema

* Add expections to include scheduled_in_timezone in ETL hearing records

---------

Co-authored-by: Jim Foley <james.foley4@va.gov>

* Piedram/appeals 37103 (#21997)

* update jest and stories tets

* remove space

* remove empty line

---------

Co-authored-by: Jim Foley <james.foley4@va.gov>

* APPEALS-49793 rspec fix in hearing repository and filled hearing slot controller (#22026)

* Fix test flakiness due to async banners not being found by capybara a… (#22035)

* Fix test flakiness due to async banners not being found by capybara and dropdown selector strings.

* Test fix: Reload hearing before sending to method

* Test fix: Reload virtual_hearing before sending to method

* Test fix: use wait to allow db transaction to process

* Test fix - move links check to the end to allow time for db transaction to process

* APPEALS-50289 rspec fix in assign hearing disposition task spec (#22048)

Co-authored-by: Jim Foley <james.foley4@va.gov>

* Update shoryuken.rb

remove merge conflict message

* fix hearing_mailer.rb (#22065)

* Wmedders21/appeals 50767 (#22091)

* Fixed TimeSlot test

* update comment in test

* fix schedule veteran form test

* fix jest test from erroring out

* APPEALS-37051 ETLBuilderJob test data for hearings (#22118)

Co-authored-by: Jim Foley <james.foley4@va.gov>

* Process scheduled_time_string before creating a hearing via ScheduleHearingTask (#22152)

* Process scheduled_time_string before creating a hearing via ScheduleHearingTask

* Push up legacy time formatting fix

* Separate time object and original time string

* Centralize scheduled_time_string processing

* Unprivatize method

* Set expectation back

---------

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

* APPEALS-51555 (BUG): Hearing Time Options Not Reflecting Persisted Values (#22184)

* pushing up

* cleaning up code

* pushing up

* pushing up

* rubocopn

* fixing rspec tests

* fixing rspec tests

* pushing tests

* rubocop

* Lint roll

* Remove zero padding from times

* Remove hardcoded tz

* Test fixes

* Fix expected error class

* Fix unrelated failing test

---------

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

* APPEALS-51447 Scheduled time showed in the left view is updated (#22162)

* APPEALS-51447 Scheduled time showed in the left view is updated

* Jest test fix in HearingTimeScheduledInTimezone

* APPEALS-51447 Add date to time conversion

* APPEALS-51447 Jest and Rspec fixed

---------

Co-authored-by: Jim Foley <james.foley4@va.gov>

* Create rake task to seed UAT (#22317)

* Create rake task to seed UAT

* change how to get the user and the veterant file_number

---------

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

* Create a Rails Migration to Add a 'scheduled_datetime'  (#22408)

* Create a Rails Migration to Add a 'scheduled_datetime' Column of Type timestamptz to the Postgres hearing Table

* include the schema.rb file

* Change comment in the migration

* Wmedders21/appeals 53522 (#22412)

* Test: Hearings::TimeService

* New service: Hearings::TimeService

* Add YARD documentation to  Hearings::TimeService

* Fix test expectation for no dst offset in winter

* Rename Hearings::TimeService to HearingDatetimeService

* Rubocop fixes in hearing_datetime_service_spec.rb

* Update HearingDatetimeService comments and spec expectations

* Add DST edge case testing for hearing datetime service

* Refactor prepare_time_for_storage to follow DRY

* Create rake task to seed UAT-Legacy (#22346)

* Create rake task to seed UAT-Legacy

* fix lint errors

* Change the user to work in UAT

* Modified file to run in UAT

* Fix the type of appeals and lint errors

* Changes needed to execute in UAT

* fix lint error in Seed AMA appeal

* Change parameter in function

* Update lib/tasks/seed_legacy_hearing.rake

---------

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

* APPEALS-53674 scheduled_for is Able to Account for scheduled_in_timez… (#22447)

* APPEALS-53674 scheduled_for is Able to Account for scheduled_in_timezone Values

* APPEALS-53674 spec coverage

* APPEALS-53674 updated spec

* Update app/models/hearing.rb

---------

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

* Wmedders21/appeals 53660 (#22431)

* LegacyHearing#scheduled_for WIP

* Define scheduled_for in legacy hearing and update hearing_day_id_refers_to_vacols_row? to prevent infinite loop

* Change legacy hearing factory to not supply scheduled_in_timezone by default

* Test: LegacyHearing #scheduled_for

* Rubocop style fixes

* Add YARD documentation to LegacyHearing#scheduled_for

* spec fixes

* revert to feature branch

* fix spec after changes to legacy hearing factory

* update spec for code changes in legacy appeal scheduled_for

* update spec to mock hearing more accurately

* rubocop fixes

---------

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

* Wmedders21/appeals 53688 (#22435)

* Add instance methods to HearingDatetimeService

* Rubocop fixes

* Add YARD documentation to instance methods

* Reformat HearingDatetimeService#central_office_timestring to match HearingTimeService#central_office_time_string

* add validation for scheduled_in_timezone

* update tests for validations and testing on different hearing days

* rubocop fixes

---------

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

* APPEALS-53536 new method to check the hearing date time service and h… (#22418)

* APPEALS-53536 new method to check the hearing date time service and hearing time service

* APPEALS-53536 added YARD Doc

* APPEALS-53536 scheduled_in_timezone nil by default in hearing and legacy hearing factories

* APPEALS-53536 spec fixes

* APPEASL-53536 YARD doc formatting

* Retriggering CI

* Update app/models/legacy_hearing.rb

* Update spec/models/hearing_spec.rb

---------

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

* Wmedders21/appeals 54461 (#22487)

* Add poa_time and appellant_time to HearingTimeConcern

* Replace HearingTimeService #poa_time and #appellant_time with HearingTimeConcern versions

* rubocop fixes

* update yard comments

* Remove outdated test from hearing_time_service_spec

* Adjust slot_hearing in HearingRepository to Utilize New HearingDateti… (#22491)

* Adjust slot_hearing in HearingRepository to Utilize New HearingDatetimeService

* fix lint errors

* Revert 'Schedule Veteran For A Hearing' expected times to what they are in master

* remove convert_scheduled_time_to_utc function, fix lint error and refactor some code

* Update spec/services/hearing_time_service_spec.rb

---------

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

* Update spec to use scheduled_in_timezone and scheduled_datetime

* Rubocop fix

* APPEALS-54170 Conditional Pre-Processing of scheduled_time_strings in HearingUpdateForm

* Change central office time string to always be in eastern time explicitly

* update Hearing#scheduled_for to have correct fallback logic

* revert expectation in daily_docket/build_hearsched_spec 'User can update fields'

* revert specs in hearing_mailer_spec

* revert spec changes

* revert spec changes

* MattT/APPEALS-54184: Introduce Conditional Pre-Processing of scheduled_time_strings in LegacyHearingUpdateForm (#22478)

* Set legacy hearing time updates to be processed by the HearingDatetimeService

* Remove unnecessary attr

* Fix attr name

* Build facade for processing incoming hearing time updates

* Update YARD docstring

* Some temp fix that will be replaced with future work

* Fix method names for tests

* Remove accidental change

* Remove tests for methods that no longer exist

* Add HearingTimeService#process_legacy_scheduled_time_string specs

* Remove problematic type since it's going away anyways

* Introduce some funky feature tests

* Fix recursive factory call

* Change expectations of tests to be more easily matched

* Fix feature tests

* Add a unit test

* Fix failing spec

* Fix flakey tests

* Update hearings seed

* Adjust hearing times in seed file

* Fix HearingDispositionChangeJob spec

---------

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

* Reconfigure placement of some methods. Reintroduce old Hearing#scheduled_for method

* Unskip a test

* Ooops! It needs to be a class method

* Fix typo

* Fix test

* Fix a silly spec typo

* Fix hearing_Spec

* MattT/APPEALS-53800: Replace all instances of 'America/Anchorage' with 'America/Juneau' (#22507)

* Replace all instances of 'America/Anchorage' with 'America/Juneau'

* Replace all instances of 'America/Anchorage' with 'America/Juneau'

* Update snapshots

---------

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

* Fix HearingTime offset on Schedule Veteran form

* Fix TimeSlot offsets when scheduling virtual hearings

* Fixes how offsets are displayed in the following areas:

Appellant TZ + Representative TZ dropdowns
Email Confirmation Modal
Daily Docket page dropdowns
Virtuah Hearing Conversion Form
Add Hearing Day page
Edit Docket page

* Push up some stragglers

* fix showing CORS errors on the frontend in development instead of the javascript error

* Fix DocketStartTimes offsets

* Fix VSO participant section timezone dropdowns

* Fix Storybook file

* Update spec to use scheduled_in_timezone and scheduled_datetime (#22502)

* Update spec to use scheduled_in_timezone and scheduled_datetime

* Rubocop fix

* Change central office time string to always be in eastern time explicitly

* update Hearing#scheduled_for to have correct fallback logic

* revert expectation in daily_docket/build_hearsched_spec 'User can update fields'

* revert specs in hearing_mailer_spec

* revert spec changes

* revert spec changes

* Update app/models/hearing.rb

Co-authored-by: Stephen E Baier <19843225+kilian-prime@users.noreply.github.com>

---------

Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Stephen E Baier <19843225+kilian-prime@users.noreply.github.com>

* Kamalam7/appeals 54170 (#22516)

* APPEALS-54170 spec fix

* APPEALS-54170 Add nil return type in YARD doc

* Fix test

---------

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

* Address some Storybook issues

* Remove accidental code additions

* Add back in missing code

* Fix linting error

* Add buildDatetimeString function

* Utilize buildDatetimeString function

* Add jsdoc param

* The juice was not worth the squeeze

* Revert other change too

* Fix radio field options in DocketStartTimes

* Fix test

* Fix fields on Hearing Details page

* Update Field.test.js

* Update snapshot temporarily

* Fix snapshots for Timezone

* Lint fix

* Update modalForms/HearingTime snapshots

* Fix TimeSlotButton tests

* Fix TimeSlot tests

* Fix AppellantSection tests and snapshots

* Fix rep section tests

* Fix DocketStartTimes tests

* Fix Fields tests

* Fix DailyDocketRow tests

* Fix EmailConfirmationModal tests

* Fix Timezone tests

* Fix CaseWorkerIndex snapshot

* Remove extra space

* Update ScheduleVeteranForm tests

* Add back in the newline

* Add spaces back in

* Add one more space

* Remove 3 spaces

* Add debugging output for CI troubleshooting

* Fix PropType issues

* Adjust expectation in Fields.test.js

* Alter expectations

* Revert tests

* Resolve double alert banners on Case Details page

* Add RO times to Previously Scheduled section of Daily Docket pages (#22649)

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

* MattT/APPEALS-56861 (#22650)

* Add RO times to Previously Scheduled section of Daily Docket pages

* Use RO tz over complex logic

* Update snapshot

---------

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

* Prototype/recipient timezone fallback (#22568)

* Update recipient timezone to look through appeal if nil elsewhere

* Remove redundant conditional from serializers and always pass representative_tz

* Refactor for readability

* update hearing mailer spec to account for recipient timezone fallback logic

* remove empty line

---------

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

* Revert "MattT/APPEALS-56861 (#22650)"

This reverts commit 08c952825ab3a5e3331d9001e72ab296a630cd9b.

* Remove duplicate line

* Sort by scheduled_for instead on Assign Hearings page (#22674)

* Sort by scheduled_for instead on Assign Hearings page

* Update snapshot

---------

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

* Address failures in spec

* Lint fix

---------

Co-authored-by: j-n-t-l <611441@bah.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Janet Lu <93942793+j-n-t-l@users.noreply.github.com>
Co-authored-by: Prerna Devulapalli <prerna.devulapalli@va.gov>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: Will Medders <93014155+wmedders21@users.noreply.github.com>
Co-authored-by: piedram <110848569+piedram@users.noreply.github.com>
Co-authored-by: Jim Foley <james.foley4@va.gov>
Co-authored-by: Kamala Madamanchi <110078646+kamala-07@users.noreply.github.com>
Co-authored-by: msteele <Marc.Steele@va.gov>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: William Medders <medders_william@bah.com>
Co-authored-by: Kamala Madamanchi <kamala.madamanchi@va.gov>
Co-authored-by: Clay Sheppard <csheepy@gmail.com>
Co-authored-by: Stephen E Baier <19843225+kilian-prime@users.noreply.github.com>

* Feature/appeals 28087 36678 phase 1 merge (#22676)

* APPEALS-36688- Build out Decision Review Created API route & Controller (#20569)

* added skeleton for api route

* removed duplicate code

* removed development envs for api and moved to creating an ApiKey

* removing any changes to development.rb

* removed extra auth code

* removed before action

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* APPEALS-38232 -Build out Decision Review Created Event Failure API route & Controller (#20601)

* APPEALS-38232 - renamed controller to AC req, added decision_review_created_error endpoint, added decision_review_created_error method, and added RSpec for new method

* APPEALS-38232 - add comments to RSpec

* Jonathan/appeals 36684 (#20516)

* initial Events migration and model creation

* created model for DecisionReviewCreatedEvent

* updated comment with example

* added spec for DRCE model

* APPEALS-36684 created event_records migration and added polymorphic associations to specific models, and added rspec for the event_record model

* APPEALS-36684 - Updated RSpec tests and updated variables and got unhappy path to pass

* cleaned lint

* saving DRCE spec changes

* fixed spec test

* changed has_many to has_one

* updated event model spec

* added validation for ER poly associations

* changed association to has_one

* added new method and updated tests

* added foreign key after running checks

* some PR comment changes

* refactored methods in EventConcern

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>
Co-authored-by: Enrilo Ugalde <ugalde_enrilo@bah.com>

* added migration, scopes and specs for events (#20707)

* fixed migration to update existing events table

* rollbacked to fix schema

* schema fixes

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* Jr/APPEALS-38926  (#20714)

* APPEALS-38926 - Created DecisionReviewCreatedError Service Class, added logic for handling service error, updated DecisonReviewCreatedController, and DecisionReviewCreatedController spec, with the updated service logic

* APPEALS-38926- created RSpec Test for DecisionReviewCreatedError Service Class and edited the Rails.logger for the service class

* APPEALS-38926 Added new info column to update transaction and added it to the RSpec test

* APPEALS-38926 - added comments to the Service Class

* APPEALS-38926 - Code Changes from TL Code Review, added rescues and fails

* APPEALS-38926 - fixed lint

* Jonathan/appeals 36689 (#20671)

* created new service class

* add rspec test cases

* service class methods

* controller action and spec

* controller update

* CC fixes

* removed accidental line

* changed to find_or_create_by

* reworked error for redis lock

* additional rspec for controller

* fixed test

* rspec fix

* delete lock key afterwards

* moved Event creation back into lock block

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* APPEALS-39663 Create CreateUserOnEvent service class and add logic to create user if needed (#20838)

* added user creation class & test

* removed extra lines

* add comment to class

* added context for args from avro

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Jr/APPEALS-39664 (#20898)

* APPEALS-39664 - Created updated_vacols_on_optin module class, and removed  extra private

* APPEALS-39664 - created UpdatedVacolsOnOptin module, RSpec file, as well as sudo code for SOC and SSOC optin check in main service class DecisionReviewCreated

* APPEALS-39664 - Created RSpec Test - PASS,  Updated method name.

* APPEALS-39664 - Added Error Handling to Sub Service Class

* APPEALS-39664 - Removed un-needed comments

* APPEALS-39664 - added include for the module UpdateVacolsOnOptin inside decision_review_created service

* APPEALS-39664 - Added Custom Error , and updated all .perform! to .process!

* APPEALS-39664 - Updated RSpec Test to reflect changes - all pass

* Updated comment for decision_review_created Service Class

* Will/appeals 36691 (#20909)

* Created attribute for failed claims on event and displaying failed claim

* passing all failed events back to serializer

* added controller tests for failed_claims and added class method for finding claims on events

* renamed failed_claims to claim_errors

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* JR/APPEALS-40954 Create CreateIntake service class and add logic to create Intake (#20967)

* APPEALS-40954 - Added Sudo Code for CreateIntake Logic

* APPEALS-40954 - added logic to CreateIntake module

* APPEALS-40954 - added Create Intake spec  with error handling - All pass

* APPEALS-40954 - Added CreateIntake Module to DecisionReviewCreated Main Service

* APPEALS-40954 - updated folder name and namespace

* APPEALS-40954 - Updated RSpec to match folder

* APPEALS-40954- Upated decision review created servie include to match folder

* Fixed failing test due to folder structure change

* Jonathan/appeals 40950 (#20965)

* Added new veteran creation module

* saving test changes

* rspec

* fixed datetime assign

* renamed var

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* APPEALS-40950 - update var veteran to vbms_veteran (#21050)

* APPEALS-40950 - update var veteran to vbms_veteran

* updated private method in controller to match happy path params dcr to drc

* Create CreateClaimantOnEvent service class and add logic to create claimant if needed (#21044)

* created service class and basic unit tests

* added conditionals for veteran claimants and will create veteran claimant now

* modified create claimant to use eventing data

* change to a class

* creating claimant correctly

* test fixes

* removed old comments

* fixed type for veteran_is_not_claimant

* changed specs to match pulling out hash params and removed event.reference id

* moved back to dot notation

* updated comments

* fixed create claimant issue

* updated process to use bang method and returning claimant

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* APPEALS-41968 Modify Issues Endpoints & Update Metric Service Logic (#21108)

* moved metricsService call to top of method

* modified rspec case

* moved metric logging spec case higher up

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Resolved merge conflicts while merging master into feature/APPEALS-28… (#21167)

* Jonathan/APPEALS-41957 (#21171)

* added interface + parser class

* edited veteran parse methods

* renamed var to "payload"

* started refactor

* more refactor + rspec

* added EPE attr

* dateTime conversions

* added class comments

* rubocop lint changes

* fixed test case

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Jr/appeals 41931 (#21192)

* APPEALS-41931 - Created create_ep_establishment file and class

* APPEALS-41931 - added process! method that creates epe from payload

* APPEALS-41931 - added logic for EventRecord being created and error handling

* APPEALS-41931 - added comments to process method

* APPEALS-41931 - set up rspec test

* APPEALS-41931 - removed lint

* APPEALS-41931-created Rspec and Test Pass

* APPEALS-41931 - cleaned lint and added error test 100% code coverage

* APPEALS-41931- fixed lint

* APPEALS-41931- fixed lint and fixed %100 code cov

* APPEALS-41931 - cleaned up lint and warn for Service Class

* APPEALS-41931 - Added CreateEpEstablishment.process! to the decision_review_created Parent Service Class

* APPEALS-41931 - refactor code to implement new parser

* fixed linting issues

* APPEALS-41931 - Updated Comments for CreateEpEstablishment

* APPEALS-41931 - moved logical date int to parser and refactored code in Class and RSepc

* edits

* Will/appeals 41929 (#21205)

* added an error and commented out call for createclaim

* added new parser logic

* merge request changes

* fixed rubocop issues and added checks for claim review attributes

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* APPEALS-42631- Create Rspec for Parser with sample payload method, and add additional parser methods  (#21294)

* APPEALS-42631 - create example.json

* APPEALS-42631 - implemented example_response and load_example method and works as expected

* APPEALS-42631 - created RSpec for DecisionReviewCreatedParser

* APPEALS-42631 - Refactored parser and Added RSpec for current praser

* APPEALS-42631 - added methods to parser for intake, claimant, and claim_review and added matching rspec for new methods

* APPEALS-42631 - updated code per TL Comments

* APPEALS-421631- added additional comments and fixing lint

* APPEALS-41934 (#21251)

* initial commit

* implementation & error

* renamed method

* rspec

* saving refactor progress

* finished refactoring class

* added comment

* minor parser/rspec updates

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* added RI parser methods to rspec (#21322)

* added RI parser methods to rspec

* updated config for Consumer

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Update DecisionReviewCreated to make all calls and link all intake records (#21334)

* updated decision review created to uncomment actions and updated specs

* remove binding.pry

* removed comments

* fixed a bunch of broken tests

* fixed last broken tests

* fixed params for methods and specs

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* APPEALS-43446- Change name of BackfillRecord polymorphic model to EventedRecord (#21382)

* APPEALS-43446 - renamed columns for backfill record to evented record migrate and rollback work as intended

* APPEALS-43446 replaced all backfill_record with evented_record within the models associations and updated Rspec tests

* APPEALS-43446 fixed error message

* Jr/ama controller refactor (#21365)

* fixed test and refactored controller

* saving changes

* init commit passing all the way to request_issues

* all pass and functions as expected

* lint

* lint

* updated initializer to use deep_symbolize_keys

* updated headers to be more dry

* added missing Intake attributes

* fixed failing tests

* updated createIntake test

* fixed veteran rspec

* fixed RI test

* APPEALS-43446- Change name of BackfillRecord polymorphic model to EventedRecord (#21382)

* APPEALS-43446 - renamed columns for backfill record to evented record migrate and rollback work as intended

* APPEALS-43446 replaced all backfill_record with evented_record within the models associations and updated Rspec tests

* APPEALS-43446 fixed error message

* updated intake

* modified intake

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* redo init commit

* updated imp. logic

* attorney widget fix

* Create end to end , happy path rspec's for Decision Created event Feature (#21395)

* updated more tests and fixed user creation

* added in person creation

* corrected headers and fixed broken tests

* added type

* fixed failing spec

* creating event when person is created

* updated spec to account for both events being created

* ignored long lines for spec file

* linting fixes

* fixed more linting errors/ ignored long lines

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* Jonathan/appeals 43589 (#21397)

* saving

* saving user class error progress

* error handling for user creation

* updated error handling/raises

* validator methods

* validations

* update logical date converter

* changed veteran service class to use file_number

* added fields to hlr

* updated epe data

* removed byebug

* fixed typos

* Edit 5: adding detail_id to Intake

* EDIT 6: add claimant_participant_id to epe

* Edit 8: Intake is correctly linked to veteran

* Edit 7: RI additions

* fixed spacing

* fixed typo

* saving rspec changes

* rspec updates

* added datetime conversion for person dob

* fixed rspec

* remove unused methods

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* feature/APPEALS-35707-29633-29632 (uat) (#21435)

* 🔀 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

* awillis/APPEALS-45152 (#21506)

* APPEALS-45152 Updated the logic in create_claimant_on_event.rb to always generate a claimant record.  Updated RSPEC.

* APPEALS-45152 Cleaned up RSPEC.

* APPEALS-45152 Fixed Failing RSPEC within decision_review_created_spec.rb

* APPEALS-45152 Updated RSPEC within decision_review_created_spec.rb with addtional checks.

* APPEALS-44319 (#21449) (#21541)

* added logic for legacy issues in DRC

* more legacy logic

* updated rspec context lang

* error cov

---------

Co-authored-by: Jonathan Tsang <98970951+jtsangVA@users.noreply.github.com>
Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Konstantin/APPEALS-45175 (#21517)

* logical_date_converter re-written to work with yyyymmdd numbers from json payload

* comments removed

* comments removed2

* method rewitten

* json example fixed

* date in scenario_b_spec.rb replaced by valid ones, additional check for empty string parameter added to the logical_date_converter

* removed filter for non rating request issue dropdown (#21480)

* removed filter for non rating request issue dropdown

* removed excluded types as we don't need to check this anymore

* fixed broken test

* added category back

* no longer need test to check for missing categories since we're returning them all.

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* Column added to RequestIssues table (#21578)

* added migration and simple spec to test

* fixed schema deleted issues

* updated spec to verify data being set

* error was no longer trigger from update. removed check and passed in correct variable

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>
Co-authored-by: TuckerRose <tuckerrose@TuckerRoses-MacBook-Pro.local>

* added bgs_source to parser, controller and serializer along with specs (#21621)

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* Konstantin/appeals 45180 (#21591)

* bug is fixed, condition added to DecisionReviewCreatedController

* rspec test added

* json message updated

* comment added

* Update decision_review_created_controller.rb

comment updated

---------

Co-authored-by: Nader Kutub <nader.kutub@va.gov>

* Konstantin/appeals 45149 (#21644)

* RequestIssueSerializer attributes added

* development_item_reference_id, same_office, legacy_opt_in_approved attributes were added

* merge conflicts resolved

* merge conflict resolved

* fixed

* all datapoints were added

* empty line removed

* comment removed

* refactored

* app/controllers/api/docs/v3/ama_issues.yaml updated with new attributes

* example of request issue updated app/controllers/api/docs/v3/ama_issues.yaml

* null to nil edited in example ama_issues.yaml

* example ama_issues.yaml updated

* example ama_issues.yaml updated2

* linters fixed

* linters fixed2

* linters are fixed

* APPEALS-45883 - Remove End Product Establishment records within the Event Records table in Caseflow (#21745)

* APPEALS-45883 - changes to remove the creating of Event Records for epe

* APPEALS-45883 - remove removed event params from method calls

* APPEALS-45883 removed Event Double

* APPEALS-48553 updated event_record spec

* removed eventing from create claim review (#21718)

* removed eventing from create claim review

* checking why file is not being found for event_record

* removed event var and require dependency

* spec fixes

* updated specs

* fixed revert

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>
Co-authored-by: Nader Kutub <nader.kutub@va.gov>

* Nrithner/appeals 45913 (#21716)

* Convert from milliseconds to datetime

* Add expection to have datetime after parsing

* Fix linting issues

* APPEALS - 45914 & 45915  (#21744)

* Decision review parser and spec changes

* remove byebug

* Added db seed and testing (#21284)

* Added db seed and testing

* Change ApiKey seed name to ConsumerApiKey, and associated changes

---------

Co-authored-by: Matt Ray <matthew.ray@va.gov>
Co-authored-by: Chris-Martine <christopher.martine@va.gov>
Co-authored-by: Nader Kutub <nader.kutub@va.gov>

* re-merge Cmartine/appeals 46861 (#21855)

* Edit DecisionReviewCreatedController to respond with ok status if event exists and is completed, edit test

* Move checking if event exists and is completed into event model, edit tests

* Fix linter errors

---------

Co-authored-by: Chris-Martine <christopher.martine@va.gov>

* Nrithner/appeals 46860 (#21856)

* Set event info back to default

default state for info is an empty
json object

* Correct linting errors

* Test happy path with rspec

* Refactor rspec example

* Converte module to class

* Remove module import

---------

Co-authored-by: Nico Rithner <nicolas.rithner@va.gov>

* Jonathan/appeals 45899/45878 (#21714)

* add "from event" value to Store

* updated setup guide for M3

* added new badges

* added jest

* storybook file

* additional story

* bugfix

* snap update

* Konstantin/appeals 46175 (#21768)

* draft processor method done

* process_nonrating method moved to DecisionReviewCreated service

* json example added, process_nonrating method updated

* 4 rspec test added

* useless json example removed

* commented lines removed

* condition added

* condition added.

* test updated

* first condition moved out of the method

* process_nonrating method call moved down

* 1 comment removed, 1 added

* process nonrating method rafactored, logic transferred into the parser

* method refactored, rspec tests updated

* rspec test slightly refactored

---------

Co-authored-by: Nader Kutub <nader.kutub@va.gov>

* Edit Issues screen update (#21907)

* Edit Issues screen update

* relocated row

* updated capybara test

* updated capybara to check for new added text

* cmartine/APPEALS-46905 (#21884)

* Remove cache updating call for veteran when veteran is being created for an event

* Change seeds api_key.rb to consumer_api_key.rb

---------

Co-authored-by: Matt Ray <108031363+mattray-gov@users.noreply.github.com>

* Update process_nonrating to process_nonrationg_issue_category

Remove extra logic

* Update rspec. Remove unused example

* Change edited_by_css_id to return users css_id

* Konstantin/appeals 48306 (#21998)

* ama_eventing_enabled feature check added

* toggle renamed

* rspec tests added

* 2 comments added

* toggle renamed, logic trasferred into controller, tests updated

* empty line removed

---------

Co-authored-by: Matt Ray <108031363+mattray-gov@users.noreply.github.com>

* 930 code updates

* remove byebug

* Change edited_by_css_id to return users css_id (#22062)

Co-authored-by: Matt Ray <108031363+mattray-gov@users.noreply.github.com>

* Nrithner/appeals 49245 (#22107)

* Update process_nonrating to process_nonrationg_issue_category

Remove extra logic

* Update rspec. Remove unused example

---------

Co-authored-by: Matt Ray <108031363+mattray-gov@users.noreply.github.com>

* fix extra commas from merge

* APPEALS-51223: Disable ClaimantValidator for DecisionReviewCreatedEvents (#22132)

* APPEALS-51223 refactored the claimant_validator class method claimant_details_required? to consider the conditional statement

* APPEALS-51223 updated Rspec to confirm claimant address_line_1 is nil and error is empty

* APPEALS-51223 made changes to to claimant_validator to have all Unit test passing

* APPEALS-51223 added suggested changes

* Revert "fix merge conflict with AMA"

This reverts commit 6775316c85e2c3d8cd94c1baae6d29d75503163d, reversing
changes made to 66cf311d1ddb18d11137b173b94ecbafaa022e2b.

* added comments

* Delete docker-bin/build.sh, I didnt make these changes

* Revert "Delete docker-bin/build.sh, I didnt make these changes"

This reverts commit 03a3830c5df26e9d4830fcf1d66ea77af4703346.

---------

Co-authored-by: nader k <nader@nkconsulting.net>

* Jonathan/appeals 51926 (#22215)

* Hide UI changes behind featureFlag

* fixed lint spacing warnings

* code climate spec fix (#22211)

* code climate spec fix

* up argument count

* created a parser helper for reusable methods

* reset codeclimate back to original and added issue parser

* modified methods to take in a hash instead of multiple params

* reduced create params down to 3 params

* added space inside

* swapped to safe navigator for intake check

* fixed spec

* fixed linting issue

* fixed failing spec

* fixed merge conflicts with code changes for helper

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>
Co-authored-by: TuckerRose <tuckerrose@TuckerRoses-MacBook-Pro.local>
Co-authored-by: Nader Kutub <nader.kutub@va.gov>

* Konstantin/appeals 52321 (#22363)

* utc conversion method added in app/serializers/api/v3/issues/ama/request_issue_serializer.rb

* set_contested_rating_issue_profile_date method updated in RequestIssue model, updated contested_rating_issue_profile_date in  DecisionIssue model

* decision issue updated, tests added

* tests added, converters improve app/models/decision_issue.rb app/serializers/api/v3/issues/ama/request_issue_serializer.rb

* set_contested_rating_issue_profile_date restored in request issue model

* uneccessary logic removed

* 3 more tests added

* test added, error handling aaded in format_rating_profile_date method

* Update decision_issue.rb

* Update request_issue.rb

* Appeals 52317 (#22321)

* wip

* added the parser to skeleton

* removed commented code

* added in parser logic

* added dru_error route, error handling and params

* added rspecs and fixed routing for update error to be a post

* added empty spec

* updated dru params to match intake json

* rubocop fixes

* more rubocop fixes

* fixed routing to post now and updated specs

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* fixed logic for AMA issues API serializer attributes (#22358)

* fixed logic for added_by fields

* methods for fetching removed_by user

* withdrawn_by methods

* methods for edited_by & instance vars

* more logic for added_by methods

* fixed failing tests

* rspec updates

* rspec for RIU addition

* small changes

* fix test failure

* Revert "Appeals 52317 (#22321)"

This reverts commit 7e3426e620f559d81b1e4aa0837785cb581c3424.

* Bug Fix for APPEALS-44115 (#22538)

* running ci

* testing category

* ci with conditional

* set back to false

* reverted to original spec

* running ci

* updated intake helpers to account for using none of these match option

* ignored metrics abc size

* removed from helper

* removed comments

* updated spec to check on each category

* removed single quotes

* fixed a flakey test that was failing on a duplicate key

* linting fix

* pushed up feature flag

* lint clean up

* swapped to different featureflag

* fixing spec feature toggle param

* added feature flags back

* checking if label is there

* flipped feature test to correct order

---------

Co-authored-by: TuckerRose <tuckerrose@TuckerRoses-MBP.lan>

* fix for contested_issue_description test on decision review created

* fix api keey spec

* fix API Key seed

---------

Co-authored-by: Will Love <wlove29@gmail.com>
Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>
Co-authored-by: Enrilo Ugalde <71367882+Jruuuu@users.noreply.github.com>
Co-authored-by: Jonathan Tsang <98970951+jtsangVA@users.noreply.github.com>
Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>
Co-authored-by: Enrilo Ugalde <ugalde_enrilo@bah.com>
Co-authored-by: isaiahsaucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: Craig Reese <Reese_Craig@bah.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: (Jeffrey) Aaron Willis <98484567+Aaron-Willis@users.noreply.github.com>
Co-authored-by: Konstantin Shevtsov <166068160+KonstantinShevtsov@users.noreply.github.com>
Co-authored-by: TuckerRose <tuckerrose@TuckerRoses-MacBook-Pro.local>
Co-authored-by: nicorithner-bah <148365039+nicorithner-bah@users.noreply.github.com>
Co-authored-by: Kodi Shiflett <kodishiflett@gmail.com>
Co-authored-by: Matt Ray <matthew.ray@va.gov>
Co-authored-by: Chris-Martine <christopher.martine@va.gov>
Co-authored-by: Nico Rithner <nicolas.rithner@va.gov>
Co-authored-by: Chris-Martine <135330019+Chris-Martine@users.noreply.github.com>
Co-authored-by: Matt Ray <108031363+mattray-gov@users.noreply.github.com>
Co-authored-by: Nader Kutub <NaderKutub@Take2ITs-MacBook-Pro.local>

* Feature Tracking PR for APPEALS-50887 (#22244)

* Remove transaction_wrapper

* Remove extra newline

* APPEALS-51045: Remove ReceiveNotificationJob (#22207)

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* MattT/APPEALS-51115: Initialize FIFO SQS Queues Locally (#22182)

* Set local env to utilize FIFO queues where appropriate

FIFO queues are configured with the same attributes as our queues in higher environments.

* Resolve failing test

* Remove defunct test

* Update make commands

---------

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

* APPEALS-51847: Institute Database Migration for Establishing 'sms_status_reason' and 'email_status_reason' Columns (#22208)

* adding and running migration

* adding comments to migration and re running db:migrate

* pushing up original scheam

* committing schema

* small edit to migration and deleting unnecessary columns from schema

---------

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

* removing job and all mentions of job (#22212)

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

* MattT/APPEALS-51059: Alter Select Quarterly Statuses (#22239)

* Alter status messages

* Save more info in fake response

* Swap keys

* Add missing param

* Test fixes. Also, setting appeal_docketed to false whenever appeals are decided or cancelled

* Fix fasterer issue

---------

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

* MattT/APPEALS-51101: Rewrite ProcessNotificationStatusUpdateJob to Consume Messages from an SQS Queue (#22247)

* Update fake response body

* Try enabling localstack in CI

* Init SqsService and alter most/all of the ProcessNotificationStatusUpdatesJob

* Create SQS queues in test env

* Change port formatting

* Mount docker socket

* Try localstack hostname

* Wait for localstack in CI

* Add more yarddoc comments

* Log errors and number of messages processed

* Add custom error classes

* Add yarddoc comments to SqsService class

* Create SqsService spec file

* Redo much of ProcessNotificationStatusUpdatesJob's spec file

* Disable line length checks for yarddoc comments

---------

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

* APPEALS-51087: Rewrite Api::V1::VaNotifyController#notification_update Controller Action to No Longer Utilize Redis (#22295)

* initial push

* rubocop'n

* fixing tests?

* rubocop'n

* addressing most of matt's comments

* removing yard doc files and keeping comment

* rubocop

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* Remove extra attribute

* Fix incorrect log counts

* Fix log statement

* Fix typo

* APPEALS-53603: Modify logic to always show recipient information if present (#22414)

* initial commit

* making rspec tests happy

* linting

* adding tests back and refactoring

* small char error

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* Sync decided appeals with states table (#22434)

* APPEALS-52882 Sync decided appeals decision_mailed status

* APPEALS-52882 Fix lint issues

* APPEALS-52882 Fix codeclimate issues

* APPEALS-52882 Address PR feedback

* APPEALS-52882 Address PR feedback

* Jcohen/APPEALS-52861 (#22450)

* APPEALS-52861 Bug fix implemented.

* APPEALS-52861 cleaned up some code through aliasing a common method name between appeal_types, eliminating a check that we do in the AppealDecisionMailed module.

* APPEALS-52861 fixed method name error.

* APPEALS-52861 fixed some tests.

* APPEALS-52861 fixed More tests.

* APPEALS-52861 fixed More tests.

* APPEALS-52861 feature branch changes merged in with working branch and method name changes extracted.

* APPEALS-52861 feature branch changes merged in with working branch and method name changes extracted, included case statement.

* APPEALS-52861 moved case statement to another file to be the boolean check for constested status on an appeal.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-52892: For all legacy appeal states/notifications check status in VACOLS (#22455)

* initial commit

* addressing comments

* small change

* making tests
happy

* fixing spec tests

* rubocop'n

* reverting

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-55159: Parameter Requirements Are Too Stringent Given What We Will Expect from VA Notify (#22561)

* APPEALS-55159

* updating tests

* APPEALS-55159 Refactor permitted and required params

* APPEALS-55159 Fix linting issue

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: msteele <Marc.Steele@va.gov>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Adding rake task to sync decided appeals (#22492)

* APPEALS-52872 Add rake task to sync decided appeals

* APPEALS-52872 Remove byebug

* APPEALS-52872 Fixing lint errors

* APPEALS-52872 Addressing performance issues

* APPEALS-52872 Addressing performance issues

* APPEALS-52872 Fix ENV variable update

* APPEALS-52872 Parallelizing AppealState updates

* APPEALS-52872 Remove byebug

---------

Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Prevent Prodtest from contacting VA Notify Staging (#22629)

* APPEALS-54918 Update VA Notify fake service and initializer

* APPEALS-54918 Add CASEFLOW_BASE_URL env var in demo/dev

* APPEALS-54918 Add seed file for API Key and added to main seed execution

* APPEALS-54918 Add missing argument to method definition

* APPEALS-54918 Update "to" params and fix linting issues

* APPEALS-54918 Prevent post requests in test env

* Rename ApiKeys seed file

* Fix linting error on require statement

* Add argument for call within sync_review_job.rb and minor refactor

* Inherit seed from base, align with AMA for seed file placement

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: msteele <Marc.Steele@va.gov>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* hotfix/APPEALS-13161 (#22686)

* fix(request issue spec): description validation

* fix(request issue): add description validation

* fix(request issue): add validation to desc input

* fix(request issue): rubocop formatting

* feat(request issue): verbage fix

* fix(request issue): update variable usage

* fix(request issue): add additional characters to negative test

* fix(request issue): add positive rspec test

* fix(request issue): add negative UI test

* fix(request issue): add positive UI test

* fix(request issue): negative UI test checks error message

* fix(request issue): grammar edit

* fix(request issue): minor

* fix(request issue): minor

* fix(request issue): code climate fix

* fix(request issue): code climate fix

* fix(requst issue): extract description validator

* fix(request issue): add input validation to unidentified issue modal

* fix(unidentified issue modal): test update minor

* fix(unidentified issues modal): description happy path test

* fix(unidentified issues modal): add failing description test

* fix(request issues): linting

* allow_nil -> allow_blank allows the API to submit blank description fields for contested_claims

* Trigger Build

* Fixing a failing test

* Fixing failing tests

* Skipping failing tests

* Revert test fixes

---------

Co-authored-by: christian-cain-bah <cain_christian@bah.com>
Co-authored-by: Christian Cain <149622375+christian-cain-bah@users.noreply.github.com>

* feature/appeals-54131 (#22685)

* add Reader bandwidth alert banner in document list

* fix linting issue

* Updated displayBandwidthAlert

* bandwidth_banner feature toggle added

* added const

* linted as requested

* fixed linting issues

* code climate

---------

Co-authored-by: Daniel Mage <dmage20@gmail.com>
Co-authored-by: Anusha Palliyil <palliyil_anusha@bah.com>

* fixed bug where unidentified issues were able to go through intake with no MST or PACT status. (#22646)

* APPEALS-51865: Create Developer Command Line Testing Tools (#22508)

* APPEALS-50693: Create Bash Script to Run Tests on Git Commit and PR Review

* APPEALS-51866: Added CodeClimate CLI command to custom git actions (#22193)

* added command line option to run codeclimate locally

* added code climate option to clean-pr command

* created code climate command to run tests

* added code climate UI output for user.

* APPEALS-52246: Enable Git Test Commands to Autofix Issues (#22457)

* created auto fix option for git clean-pr

* changed variable name for autofix

* created autofix option for clean push

* added way to run feature tests headless in git clean-pr

* fixed headless test command

* increased code climate timeout for entire project to 1 hour from 15 mins

* Fix failing tests (#22687)

* Adding skips for tests

* Trigger Build

* Unskip tests for troubleshooting

* Have SqsService spec use its own queue

* Add back in DB persistence across threads in SyncDecidedAppealsHelper spec

* Set current_user in each parallel thread

* Wrap threads in executors

---------

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

* APPEALS-55521: Spelling Error in description of CAVC AOD Affinity Days lever

* APPEALS-25419: CAVC Remand Distribution Updates (#22472)

* 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 rep…
AdamShawBAH pushed a commit that referenced this pull request Sep 9, 2024
* Remove transaction_wrapper

* Remove extra newline

* APPEALS-51045: Remove ReceiveNotificationJob (#22207)

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* MattT/APPEALS-51115: Initialize FIFO SQS Queues Locally (#22182)

* Set local env to utilize FIFO queues where appropriate

FIFO queues are configured with the same attributes as our queues in higher environments.

* Resolve failing test

* Remove defunct test

* Update make commands

---------

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

* APPEALS-51847: Institute Database Migration for Establishing 'sms_status_reason' and 'email_status_reason' Columns (#22208)

* adding and running migration

* adding comments to migration and re running db:migrate

* pushing up original scheam

* committing schema

* small edit to migration and deleting unnecessary columns from schema

---------

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

* removing job and all mentions of job (#22212)

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

* MattT/APPEALS-51059: Alter Select Quarterly Statuses (#22239)

* Alter status messages

* Save more info in fake response

* Swap keys

* Add missing param

* Test fixes. Also, setting appeal_docketed to false whenever appeals are decided or cancelled

* Fix fasterer issue

---------

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

* MattT/APPEALS-51101: Rewrite ProcessNotificationStatusUpdateJob to Consume Messages from an SQS Queue (#22247)

* Update fake response body

* Try enabling localstack in CI

* Init SqsService and alter most/all of the ProcessNotificationStatusUpdatesJob

* Create SQS queues in test env

* Change port formatting

* Mount docker socket

* Try localstack hostname

* Wait for localstack in CI

* Add more yarddoc comments

* Log errors and number of messages processed

* Add custom error classes

* Add yarddoc comments to SqsService class

* Create SqsService spec file

* Redo much of ProcessNotificationStatusUpdatesJob's spec file

* Disable line length checks for yarddoc comments

---------

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

* APPEALS-51087: Rewrite Api::V1::VaNotifyController#notification_update Controller Action to No Longer Utilize Redis (#22295)

* initial push

* rubocop'n

* fixing tests?

* rubocop'n

* addressing most of matt's comments

* removing yard doc files and keeping comment

* rubocop

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* Remove extra attribute

* Fix incorrect log counts

* Fix log statement

* Fix typo

* APPEALS-53603: Modify logic to always show recipient information if present (#22414)

* initial commit

* making rspec tests happy

* linting

* adding tests back and refactoring

* small char error

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* Sync decided appeals with states table (#22434)

* APPEALS-52882 Sync decided appeals decision_mailed status

* APPEALS-52882 Fix lint issues

* APPEALS-52882 Fix codeclimate issues

* APPEALS-52882 Address PR feedback

* APPEALS-52882 Address PR feedback

* Jcohen/APPEALS-52861 (#22450)

* APPEALS-52861 Bug fix implemented.

* APPEALS-52861 cleaned up some code through aliasing a common method name between appeal_types, eliminating a check that we do in the AppealDecisionMailed module.

* APPEALS-52861 fixed method name error.

* APPEALS-52861 fixed some tests.

* APPEALS-52861 fixed More tests.

* APPEALS-52861 fixed More tests.

* APPEALS-52861 feature branch changes merged in with working branch and method name changes extracted.

* APPEALS-52861 feature branch changes merged in with working branch and method name changes extracted, included case statement.

* APPEALS-52861 moved case statement to another file to be the boolean check for constested status on an appeal.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-52892: For all legacy appeal states/notifications check status in VACOLS (#22455)

* initial commit

* addressing comments

* small change

* making tests
happy

* fixing spec tests

* rubocop'n

* reverting

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-55159: Parameter Requirements Are Too Stringent Given What We Will Expect from VA Notify (#22561)

* APPEALS-55159

* updating tests

* APPEALS-55159 Refactor permitted and required params

* APPEALS-55159 Fix linting issue

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: msteele <Marc.Steele@va.gov>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Adding rake task to sync decided appeals (#22492)

* APPEALS-52872 Add rake task to sync decided appeals

* APPEALS-52872 Remove byebug

* APPEALS-52872 Fixing lint errors

* APPEALS-52872 Addressing performance issues

* APPEALS-52872 Addressing performance issues

* APPEALS-52872 Fix ENV variable update

* APPEALS-52872 Parallelizing AppealState updates

* APPEALS-52872 Remove byebug

---------

Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Prevent Prodtest from contacting VA Notify Staging (#22629)

* APPEALS-54918 Update VA Notify fake service and initializer

* APPEALS-54918 Add CASEFLOW_BASE_URL env var in demo/dev

* APPEALS-54918 Add seed file for API Key and added to main seed execution

* APPEALS-54918 Add missing argument to method definition

* APPEALS-54918 Update "to" params and fix linting issues

* APPEALS-54918 Prevent post requests in test env

* Rename ApiKeys seed file

* Fix linting error on require statement

* Add argument for call within sync_review_job.rb and minor refactor

* Inherit seed from base, align with AMA for seed file placement

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: msteele <Marc.Steele@va.gov>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>
AdamShawBAH pushed a commit that referenced this pull request Sep 9, 2024
* Remove transaction_wrapper

* Remove extra newline

* APPEALS-51045: Remove ReceiveNotificationJob (#22207)

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* MattT/APPEALS-51115: Initialize FIFO SQS Queues Locally (#22182)

* Set local env to utilize FIFO queues where appropriate

FIFO queues are configured with the same attributes as our queues in higher environments.

* Resolve failing test

* Remove defunct test

* Update make commands

---------

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

* APPEALS-51847: Institute Database Migration for Establishing 'sms_status_reason' and 'email_status_reason' Columns (#22208)

* adding and running migration

* adding comments to migration and re running db:migrate

* pushing up original scheam

* committing schema

* small edit to migration and deleting unnecessary columns from schema

---------

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

* removing job and all mentions of job (#22212)

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

* MattT/APPEALS-51059: Alter Select Quarterly Statuses (#22239)

* Alter status messages

* Save more info in fake response

* Swap keys

* Add missing param

* Test fixes. Also, setting appeal_docketed to false whenever appeals are decided or cancelled

* Fix fasterer issue

---------

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

* MattT/APPEALS-51101: Rewrite ProcessNotificationStatusUpdateJob to Consume Messages from an SQS Queue (#22247)

* Update fake response body

* Try enabling localstack in CI

* Init SqsService and alter most/all of the ProcessNotificationStatusUpdatesJob

* Create SQS queues in test env

* Change port formatting

* Mount docker socket

* Try localstack hostname

* Wait for localstack in CI

* Add more yarddoc comments

* Log errors and number of messages processed

* Add custom error classes

* Add yarddoc comments to SqsService class

* Create SqsService spec file

* Redo much of ProcessNotificationStatusUpdatesJob's spec file

* Disable line length checks for yarddoc comments

---------

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

* APPEALS-51087: Rewrite Api::V1::VaNotifyController#notification_update Controller Action to No Longer Utilize Redis (#22295)

* initial push

* rubocop'n

* fixing tests?

* rubocop'n

* addressing most of matt's comments

* removing yard doc files and keeping comment

* rubocop

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* Remove extra attribute

* Fix incorrect log counts

* Fix log statement

* Fix typo

* APPEALS-53603: Modify logic to always show recipient information if present (#22414)

* initial commit

* making rspec tests happy

* linting

* adding tests back and refactoring

* small char error

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* Sync decided appeals with states table (#22434)

* APPEALS-52882 Sync decided appeals decision_mailed status

* APPEALS-52882 Fix lint issues

* APPEALS-52882 Fix codeclimate issues

* APPEALS-52882 Address PR feedback

* APPEALS-52882 Address PR feedback

* Jcohen/APPEALS-52861 (#22450)

* APPEALS-52861 Bug fix implemented.

* APPEALS-52861 cleaned up some code through aliasing a common method name between appeal_types, eliminating a check that we do in the AppealDecisionMailed module.

* APPEALS-52861 fixed method name error.

* APPEALS-52861 fixed some tests.

* APPEALS-52861 fixed More tests.

* APPEALS-52861 fixed More tests.

* APPEALS-52861 feature branch changes merged in with working branch and method name changes extracted.

* APPEALS-52861 feature branch changes merged in with working branch and method name changes extracted, included case statement.

* APPEALS-52861 moved case statement to another file to be the boolean check for constested status on an appeal.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-52892: For all legacy appeal states/notifications check status in VACOLS (#22455)

* initial commit

* addressing comments

* small change

* making tests
happy

* fixing spec tests

* rubocop'n

* reverting

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-55159: Parameter Requirements Are Too Stringent Given What We Will Expect from VA Notify (#22561)

* APPEALS-55159

* updating tests

* APPEALS-55159 Refactor permitted and required params

* APPEALS-55159 Fix linting issue

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: msteele <Marc.Steele@va.gov>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Adding rake task to sync decided appeals (#22492)

* APPEALS-52872 Add rake task to sync decided appeals

* APPEALS-52872 Remove byebug

* APPEALS-52872 Fixing lint errors

* APPEALS-52872 Addressing performance issues

* APPEALS-52872 Addressing performance issues

* APPEALS-52872 Fix ENV variable update

* APPEALS-52872 Parallelizing AppealState updates

* APPEALS-52872 Remove byebug

---------

Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Prevent Prodtest from contacting VA Notify Staging (#22629)

* APPEALS-54918 Update VA Notify fake service and initializer

* APPEALS-54918 Add CASEFLOW_BASE_URL env var in demo/dev

* APPEALS-54918 Add seed file for API Key and added to main seed execution

* APPEALS-54918 Add missing argument to method definition

* APPEALS-54918 Update "to" params and fix linting issues

* APPEALS-54918 Prevent post requests in test env

* Rename ApiKeys seed file

* Fix linting error on require statement

* Add argument for call within sync_review_job.rb and minor refactor

* Inherit seed from base, align with AMA for seed file placement

* APPEALS-57210 Add ssl cert file to request in fake service

* Dst_test_fix (#22708)

* Feature/appeals 47313.bugfix (#22702)

* Remove and reinstall pdfjs-dist@2.6.347 and use cdn to get rid of fake worker warning

* Comment out pdfjs worker lines in documentViewer.js to get rid of fake worker warning

* Add PdfDocument component with no batching

* Add MVP working reader prototype 2.0

* Add reader prototype warning on toolbar

* Add MVP zoom function

* Add prototype route

* Fix next and previous doc links with prototype path

* Extract toolbar buttons out to ReaderToolbar component

* Fix prop type in PdfDocument

* Remove prototype logic

* Clean up prototype with utils

* Fix scroll issue on document list view for Reader

* APPEALS-46785. Add text layer to prototype.

* Revert pdf-annotate changes

* Revert PdfFile imports and comment out pdfjs imports

* Remove extra sidebar html in PdfDocument

* Remove unnecessary props from PdfDocument

* Add WIP rotate function

* Clean up components and css

* Add pageUtil and clean up PdfDocument

* Update rotate function

* Fix sidebar css to dynamically shrink

* APPEALS-46785. Add test coverage for pageUtil#renderPage.

* APPEALS-46785. Search functionality for Reader prototype.

* Update yarn.lock after rebasing.

* APPEALS-48219. Prototype version of issue tags.

* Update css for page rotate function

* Remove and reinstall pdfjs-dist@2.6.347 and use cdn to get rid of fake worker warning

* APPEALS-46785. Add text layer to prototype.

* Add current page display functionality

* Fix getPageNumFromScrollTop function for when document has been rotated

* Fix getPageNumFromScrollTop function to have max page number

* Fix css for rotation

* Add sidebar categories

* APPEALS-49501. Fix keyboard shortcut modal.

* APPEALS-49501. Make pageUtil into Page component for React efficiency.

* APPEALS-49501. Comments rework.

* APPEALS-49501. Fix test/lint errors.

* APPEALS-515895. Add back-to-documents-list hotkey.

* Layout cleanup and add toggle menu function

* Add MVP WIP DocumentInfo

* Refactor redux appeal and fix Sidebar CSS to scroll

* Update vacolsId proptype to string

* APPEALS-52496. Update layout of Reader Prototype to match original layout.

* Cleaning up imports and removing glamor.

* Potential fix for double render error.

* Add reader prototype feature toggle

* Fix same canvas render error

* Add Fake PDFJS Worker solution

* Add pdfjs worker to intializers assets

* Remove ocr path from documents controller

* Add WIP load document error handling

* Add error handling for PdfDocument when document load failure

* Remove logic to access prototype through url

* Update page title for Reader

* Revert schema

* Extract logic to DocumentLoadError component

* Move banner/format.js to caseflow util directory

* Remove 2.0 components, screens, routes directories and get successful compile

* Remove 2.0 layouts directory

* Remove 2.0 Router component

* Move ErrorBoundary and Loadable components to client/app/components

* Remove 2.0/components/shared directory

* Move 2.0 store

* Remove vscode settings

* Remove 2.0 path lines

* Delete 2.0 path lines in webpack config

* Add back in vscode files

* Fix text layer error. Fix pages leaking between documents.

* Add max width to sidebar css to fix long document type overflow

* Update element name for jump to page function

* Remove scroll into view smooth

* Update current page calculation

* Hide search bar when switching documents.

* Add IntersectionObserver logic to Page

* Add useState

* Add IntersectionObserver logic

* Revert current page logic to use page size estimations instead of IntersectionObserver

* Remove pdfjs imports from documentViewer.js and PdfFile.jsx

* Add page number validation for ReaderFooter page input field

* Cleanup

* Disable previous/next buttons while pdf downloads. (#22511)

* Remove canvas and test relying on it. (#22495)

* Use intersection observer to hide offscreen pages.

* Replace observer with content-visibility css.

* Address comments from code review.

* Davywentwortht2it/fix failures (#22631)

* Remove linting errors.

* Fix broken specs.

* Comment out failing reader tests.

* Update reviewer.scss to fix lint errors

* Add space in reviewer.scss to fix lint error

* Update css name

---------

Co-authored-by: laurenyj <44596134+laurenyj@users.noreply.github.com>

* Re-enable failing specs. (#22666)

* Re-enable failing specs.

* Reduce flakiness of specs.

* Reduce flakiness of specs.

* Reduce flakiness of specs.

* Reduce flakiness of specs.

---------

Co-authored-by: Davy Wentworth <david.wentworth@va.gov>

* Laurenyj/update prototypefooter (#22677)

* fix PdfUIPageNumInput page width bug

* Update prototype reader footer to match original reader footer css updates

* Revert reviewer changes

* move styles to the correct place to override width:100

* Remove unused prototype css

* Update page input test snap

* Revert Page component changes and update with ctx options

---------

Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: mikefinneran <110622959+mikefinneran@users.noreply.github.com>

* Add assets folder to public (#22701)

Co-authored-by: laurenyj <44596134+laurenyj@users.noreply.github.com>

---------

Co-authored-by: laurenyj <44596134+laurenyj@users.noreply.github.com>
Co-authored-by: Davy Wentworth <david.wentworth@va.gov>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>

* Have feature test account for DST

* AM/PM (#22709)

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

---------

Co-authored-by: mikefinneran <110622959+mikefinneran@users.noreply.github.com>
Co-authored-by: laurenyj <44596134+laurenyj@users.noreply.github.com>
Co-authored-by: Davy Wentworth <david.wentworth@va.gov>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@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: mikefinneran <110622959+mikefinneran@users.noreply.github.com>
Co-authored-by: laurenyj <44596134+laurenyj@users.noreply.github.com>
Co-authored-by: Davy Wentworth <david.wentworth@va.gov>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
ThorntonMatthew added a commit that referenced this pull request Sep 11, 2024
Squashed commit of the following:

commit fbfaa44
Merge: f529eea 5ae099e
Author: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Date:   Tue Sep 10 10:22:10 2024 -0400

    Merge remote-tracking branch 'origin/master' into feature/APPEALS-50887

commit f529eea
Merge: bb4dd64 8eb1cce
Author: msteele <Marc.Steele@va.gov>
Date:   Fri Sep 6 09:22:08 2024 -0400

    Merge branch 'master' into feature/APPEALS-50887

commit bb4dd64
Merge: e86e8c9 99cb4c3
Author: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Date:   Fri Aug 30 20:11:56 2024 -0400

    Merge remote-tracking branch 'origin/release/FY24Q4.4.0' into feature/APPEALS-50887

commit e86e8c9
Author: msteele <Marc.Steele@va.gov>
Date:   Fri Aug 30 15:01:22 2024 -0400

    Inherit seed from base, align with AMA for seed file placement

commit 0e478a9
Author: msteele <Marc.Steele@va.gov>
Date:   Fri Aug 30 14:36:55 2024 -0400

    Add argument for call within sync_review_job.rb and minor refactor

commit e983678
Merge: f0f8a64 d229476
Author: Marc Steele <71673522+msteele96@users.noreply.github.com>
Date:   Fri Aug 30 13:04:35 2024 -0400

    Merge branch 'release/FY24Q4.4.0' into feature/APPEALS-50887

commit f0f8a64
Merge: c8e2c3f 6dd9870
Author: Marc Steele <71673522+msteele96@users.noreply.github.com>
Date:   Fri Aug 30 10:43:35 2024 -0400

    Merge branch 'master' into feature/APPEALS-50887

commit c8e2c3f
Author: msteele <Marc.Steele@va.gov>
Date:   Fri Aug 30 09:50:55 2024 -0400

    Fix linting error on require statement

commit a930bb6
Author: msteele <Marc.Steele@va.gov>
Date:   Fri Aug 30 09:43:48 2024 -0400

    Rename ApiKeys seed file

commit 009007e
Author: Marc Steele <71673522+msteele96@users.noreply.github.com>
Date:   Wed Aug 28 15:45:55 2024 -0400

    Prevent Prodtest from contacting VA Notify Staging (#22629)

    * APPEALS-54918 Update VA Notify fake service and initializer

    * APPEALS-54918 Add CASEFLOW_BASE_URL env var in demo/dev

    * APPEALS-54918 Add seed file for API Key and added to main seed execution

    * APPEALS-54918 Add missing argument to method definition

    * APPEALS-54918 Update "to" params and fix linting issues

    * APPEALS-54918 Prevent post requests in test env

commit af8c273
Author: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Date:   Wed Aug 28 15:44:32 2024 -0400

    Adding rake task to sync decided appeals (#22492)

    * APPEALS-52872 Add rake task to sync decided appeals

    * APPEALS-52872 Remove byebug

    * APPEALS-52872 Fixing lint errors

    * APPEALS-52872 Addressing performance issues

    * APPEALS-52872 Addressing performance issues

    * APPEALS-52872 Fix ENV variable update

    * APPEALS-52872 Parallelizing AppealState updates

    * APPEALS-52872 Remove byebug

    ---------

    Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

commit 20de61a
Author: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Date:   Thu Aug 22 13:34:11 2024 -0600

    APPEALS-55159: Parameter Requirements Are Too Stringent Given What We Will Expect from VA Notify (#22561)

    * APPEALS-55159

    * updating tests

    * APPEALS-55159 Refactor permitted and required params

    * APPEALS-55159 Fix linting issue

    ---------

    Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
    Co-authored-by: msteele <Marc.Steele@va.gov>
    Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

commit f315e1f
Merge: 45c73af 9cf0cfb
Author: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Date:   Thu Aug 22 08:50:38 2024 -0400

    Merge branch 'master' into feature/APPEALS-50887

commit 45c73af
Author: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Date:   Thu Aug 15 10:53:17 2024 -0600

    APPEALS-52892: For all legacy appeal states/notifications check status in VACOLS (#22455)

    * initial commit

    * addressing comments

    * small change

    * making tests
    happy

    * fixing spec tests

    * rubocop'n

    * reverting

    ---------

    Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
    Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

commit cc94990
Author: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Date:   Wed Aug 14 17:26:23 2024 -0400

    Jcohen/APPEALS-52861 (#22450)

    * APPEALS-52861 Bug fix implemented.

    * APPEALS-52861 cleaned up some code through aliasing a common method name between appeal_types, eliminating a check that we do in the AppealDecisionMailed module.

    * APPEALS-52861 fixed method name error.

    * APPEALS-52861 fixed some tests.

    * APPEALS-52861 fixed More tests.

    * APPEALS-52861 fixed More tests.

    * APPEALS-52861 feature branch changes merged in with working branch and method name changes extracted.

    * APPEALS-52861 feature branch changes merged in with working branch and method name changes extracted, included case statement.

    * APPEALS-52861 moved case statement to another file to be the boolean check for constested status on an appeal.

    ---------

    Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
    Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

commit ce63551
Merge: 6c30a90 e5563b2
Author: msteele <Marc.Steele@va.gov>
Date:   Tue Aug 13 16:46:01 2024 -0400

    Merge branch 'master' into feature/APPEALS-50887

commit 6c30a90
Author: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Date:   Fri Aug 9 10:02:59 2024 -0700

    Sync decided appeals with states table (#22434)

    * APPEALS-52882 Sync decided appeals decision_mailed status

    * APPEALS-52882 Fix lint issues

    * APPEALS-52882 Fix codeclimate issues

    * APPEALS-52882 Address PR feedback

    * APPEALS-52882 Address PR feedback

commit bdf4c10
Author: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Date:   Thu Aug 8 07:57:23 2024 -0600

    APPEALS-53603: Modify logic to always show recipient information if present (#22414)

    * initial commit

    * making rspec tests happy

    * linting

    * adding tests back and refactoring

    * small char error

    ---------

    Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

commit 9c983b8
Author: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Date:   Thu Aug 1 09:13:54 2024 -0400

    Fix typo

commit 082d94a
Author: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Date:   Thu Aug 1 09:09:03 2024 -0400

    Fix log statement

commit 1b965a4
Author: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Date:   Wed Jul 31 23:48:14 2024 -0400

    Fix incorrect log counts

commit 65cf66d
Merge: 4c23999 3367fbe
Author: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Date:   Wed Jul 31 14:22:23 2024 -0400

    Merge branch 'master' into feature/APPEALS-50887

commit 4c23999
Author: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Date:   Tue Jul 30 09:00:49 2024 -0400

    Remove extra attribute

commit 1a39343
Merge: 1e8ddee 4d1bfd3
Author: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Date:   Mon Jul 29 13:39:41 2024 -0400

    Merge branch 'master' into feature/APPEALS-50887

commit 1e8ddee
Author: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Date:   Fri Jul 26 09:23:40 2024 -0600

    APPEALS-51087: Rewrite Api::V1::VaNotifyController#notification_update Controller Action to No Longer Utilize Redis (#22295)

    * initial push

    * rubocop'n

    * fixing tests?

    * rubocop'n

    * addressing most of matt's comments

    * removing yard doc files and keeping comment

    * rubocop

    ---------

    Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

commit b4186e2
Merge: c60bf5f c2d5397
Author: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Date:   Fri Jul 26 08:51:28 2024 -0400

    Merge remote-tracking branch 'origin/master' into feature/APPEALS-50887

commit c60bf5f
Author: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Date:   Tue Jul 23 09:11:11 2024 -0400

    MattT/APPEALS-51101: Rewrite ProcessNotificationStatusUpdateJob to Consume Messages from an SQS Queue (#22247)

    * Update fake response body

    * Try enabling localstack in CI

    * Init SqsService and alter most/all of the ProcessNotificationStatusUpdatesJob

    * Create SQS queues in test env

    * Change port formatting

    * Mount docker socket

    * Try localstack hostname

    * Wait for localstack in CI

    * Add more yarddoc comments

    * Log errors and number of messages processed

    * Add custom error classes

    * Add yarddoc comments to SqsService class

    * Create SqsService spec file

    * Redo much of ProcessNotificationStatusUpdatesJob's spec file

    * Disable line length checks for yarddoc comments

    ---------

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

commit c312fec
Author: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Date:   Fri Jul 19 12:00:38 2024 -0400

    MattT/APPEALS-51059: Alter Select Quarterly Statuses (#22239)

    * Alter status messages

    * Save more info in fake response

    * Swap keys

    * Add missing param

    * Test fixes. Also, setting appeal_docketed to false whenever appeals are decided or cancelled

    * Fix fasterer issue

    ---------

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

commit 477a51a
Author: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Date:   Fri Jul 19 09:30:37 2024 -0600

    removing job and all mentions of job (#22212)

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

commit b950296
Author: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Date:   Thu Jul 18 12:25:59 2024 -0600

    APPEALS-51847: Institute Database Migration for Establishing 'sms_status_reason' and 'email_status_reason' Columns (#22208)

    * adding and running migration

    * adding comments to migration and re running db:migrate

    * pushing up original scheam

    * committing schema

    * small edit to migration and deleting unnecessary columns from schema

    ---------

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

commit 629796f
Author: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Date:   Wed Jul 17 13:27:17 2024 -0400

    MattT/APPEALS-51115: Initialize FIFO SQS Queues Locally (#22182)

    * Set local env to utilize FIFO queues where appropriate

    FIFO queues are configured with the same attributes as our queues in higher environments.

    * Resolve failing test

    * Remove defunct test

    * Update make commands

    ---------

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

commit f8d667b
Author: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Date:   Wed Jul 17 10:08:51 2024 -0600

    APPEALS-51045: Remove ReceiveNotificationJob (#22207)

    Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

commit c8cecb4
Merge: 4139ab3 95fec6f
Author: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Date:   Mon Jul 15 23:36:59 2024 -0400

    Merge remote-tracking branch 'origin/master' into feature/APPEALS-50887

commit 4139ab3
Author: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Date:   Thu Jul 11 23:32:08 2024 -0400

    Remove extra newline

commit a8dcdd2
Author: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Date:   Thu Jul 11 23:31:42 2024 -0400

    Remove transaction_wrapper
raymond-hughes pushed a commit that referenced this pull request Sep 13, 2024
* Remove transaction_wrapper

* Remove extra newline

* APPEALS-51045: Remove ReceiveNotificationJob (#22207)

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* MattT/APPEALS-51115: Initialize FIFO SQS Queues Locally (#22182)

* Set local env to utilize FIFO queues where appropriate

FIFO queues are configured with the same attributes as our queues in higher environments.

* Resolve failing test

* Remove defunct test

* Update make commands

---------

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

* APPEALS-51847: Institute Database Migration for Establishing 'sms_status_reason' and 'email_status_reason' Columns (#22208)

* adding and running migration

* adding comments to migration and re running db:migrate

* pushing up original scheam

* committing schema

* small edit to migration and deleting unnecessary columns from schema

---------

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

* removing job and all mentions of job (#22212)

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

* MattT/APPEALS-51059: Alter Select Quarterly Statuses (#22239)

* Alter status messages

* Save more info in fake response

* Swap keys

* Add missing param

* Test fixes. Also, setting appeal_docketed to false whenever appeals are decided or cancelled

* Fix fasterer issue

---------

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

* MattT/APPEALS-51101: Rewrite ProcessNotificationStatusUpdateJob to Consume Messages from an SQS Queue (#22247)

* Update fake response body

* Try enabling localstack in CI

* Init SqsService and alter most/all of the ProcessNotificationStatusUpdatesJob

* Create SQS queues in test env

* Change port formatting

* Mount docker socket

* Try localstack hostname

* Wait for localstack in CI

* Add more yarddoc comments

* Log errors and number of messages processed

* Add custom error classes

* Add yarddoc comments to SqsService class

* Create SqsService spec file

* Redo much of ProcessNotificationStatusUpdatesJob's spec file

* Disable line length checks for yarddoc comments

---------

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

* APPEALS-51087: Rewrite Api::V1::VaNotifyController#notification_update Controller Action to No Longer Utilize Redis (#22295)

* initial push

* rubocop'n

* fixing tests?

* rubocop'n

* addressing most of matt's comments

* removing yard doc files and keeping comment

* rubocop

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* Remove extra attribute

* Fix incorrect log counts

* Fix log statement

* Fix typo

* APPEALS-53603: Modify logic to always show recipient information if present (#22414)

* initial commit

* making rspec tests happy

* linting

* adding tests back and refactoring

* small char error

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* Sync decided appeals with states table (#22434)

* APPEALS-52882 Sync decided appeals decision_mailed status

* APPEALS-52882 Fix lint issues

* APPEALS-52882 Fix codeclimate issues

* APPEALS-52882 Address PR feedback

* APPEALS-52882 Address PR feedback

* Jcohen/APPEALS-52861 (#22450)

* APPEALS-52861 Bug fix implemented.

* APPEALS-52861 cleaned up some code through aliasing a common method name between appeal_types, eliminating a check that we do in the AppealDecisionMailed module.

* APPEALS-52861 fixed method name error.

* APPEALS-52861 fixed some tests.

* APPEALS-52861 fixed More tests.

* APPEALS-52861 fixed More tests.

* APPEALS-52861 feature branch changes merged in with working branch and method name changes extracted.

* APPEALS-52861 feature branch changes merged in with working branch and method name changes extracted, included case statement.

* APPEALS-52861 moved case statement to another file to be the boolean check for constested status on an appeal.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-52892: For all legacy appeal states/notifications check status in VACOLS (#22455)

* initial commit

* addressing comments

* small change

* making tests
happy

* fixing spec tests

* rubocop'n

* reverting

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-55159: Parameter Requirements Are Too Stringent Given What We Will Expect from VA Notify (#22561)

* APPEALS-55159

* updating tests

* APPEALS-55159 Refactor permitted and required params

* APPEALS-55159 Fix linting issue

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: msteele <Marc.Steele@va.gov>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Adding rake task to sync decided appeals (#22492)

* APPEALS-52872 Add rake task to sync decided appeals

* APPEALS-52872 Remove byebug

* APPEALS-52872 Fixing lint errors

* APPEALS-52872 Addressing performance issues

* APPEALS-52872 Addressing performance issues

* APPEALS-52872 Fix ENV variable update

* APPEALS-52872 Parallelizing AppealState updates

* APPEALS-52872 Remove byebug

---------

Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Prevent Prodtest from contacting VA Notify Staging (#22629)

* APPEALS-54918 Update VA Notify fake service and initializer

* APPEALS-54918 Add CASEFLOW_BASE_URL env var in demo/dev

* APPEALS-54918 Add seed file for API Key and added to main seed execution

* APPEALS-54918 Add missing argument to method definition

* APPEALS-54918 Update "to" params and fix linting issues

* APPEALS-54918 Prevent post requests in test env

* Rename ApiKeys seed file

* Fix linting error on require statement

* Add argument for call within sync_review_job.rb and minor refactor

* Inherit seed from base, align with AMA for seed file placement

* APPEALS-57351 Inactive Appeal Errors present when outcoding an appeal (#22721)

* APPEALS-57351 add template name check to handle errors

* APPEALS-57351 Add template_name argument to spec tests

* Update app/models/prepend/va_notify/appellant_notification.rb

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

* APPEALS-57351 Partial rspec updates, pushed before handing off

* APPEALS-57351 Add specs requested during review

* Update spec/controllers/idt/api/v2/appeals_controller_spec.rb

---------

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

* Remove unused variable with lint error. Re-introduce cert fixes

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
msteele96 added a commit that referenced this pull request Sep 16, 2024
* 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

* Remove transaction_wrapper

* Remove extra newline

* 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-51045: Remove ReceiveNotificationJob (#22207)

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* MattT/APPEALS-51115: Initialize FIFO SQS Queues Locally (#22182)

* Set local env to utilize FIFO queues where appropriate

FIFO queues are configured with the same attributes as our queues in higher environments.

* Resolve failing test

* Remove defunct test

* Update make commands

---------

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

* 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)

* APPEALS-51847: Institute Database Migration for Establishing 'sms_status_reason' and 'email_status_reason' Columns (#22208)

* adding and running migration

* adding comments to migration and re running db:migrate

* pushing up original scheam

* committing schema

* small edit to migration and deleting unnecessary columns from schema

---------

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

* Fix rubocop and tests (#22231)

* removing job and all mentions of job (#22212)

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

* MattT/APPEALS-51059: Alter Select Quarterly Statuses (#22239)

* Alter status messages

* Save more info in fake response

* Swap keys

* Add missing param

* Test fixes. Also, setting appeal_docketed to false whenever appeals are decided or cancelled

* Fix fasterer issue

---------

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

* MattT/APPEALS-51101: Rewrite ProcessNotificationStatusUpdateJob to Consume Messages from an SQS Queue (#22247)

* Update fake response body

* Try enabling localstack in CI

* Init SqsService and alter most/all of the ProcessNotificationStatusUpdatesJob

* Create SQS queues in test env

* Change port formatting

* Mount docker socket

* Try localstack hostname

* Wait for localstack in CI

* Add more yarddoc comments

* Log errors and number of messages processed

* Add custom error classes

* Add yarddoc comments to SqsService class

* Create SqsService spec file

* Redo much of ProcessNotificationStatusUpdatesJob's spec file

* Disable line length checks for yarddoc comments

---------

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

* 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>

* APPEALS-51087: Rewrite Api::V1::VaNotifyController#notification_update Controller Action to No Longer Utilize Redis (#22295)

* initial push

* rubocop'n

* fixing tests?

* rubocop'n

* addressing most of matt's comments

* removing yard doc files and keeping comment

* rubocop

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* Update admin_ui_spec.rb for CAVC levers being enabled

* Remove extra attribute

* Fix incorrect log counts

* Fix log statement

* Fix typo

* APPEALS-53603: Modify logic to always show recipient information if present (#22414)

* initial commit

* making rspec tests happy

* linting

* adding tests back and refactoring

* small char error

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* Sync decided appeals with states table (#22434)

* APPEALS-52882 Sync decided appeals decision_mailed status

* APPEALS-52882 Fix lint issues

* APPEALS-52882 Fix codeclimate issues

* APPEALS-52882 Address PR feedback

* APPEALS-52882 Address PR feedback

* Jcohen/APPEALS-52861 (#22450)

* APPEALS-52861 Bug fix implemented.

* APPEALS-52861 cleaned up some code through aliasing a common method name between appeal_types, eliminating a check that we do in the AppealDecisionMailed module.

* APPEALS-52861 fixed method name error.

* APPEALS-52861 fixed some tests.

* APPEALS-52861 fixed More tests.

* APPEALS-52861 fixed More tests.

* APPEALS-52861 feature branch changes merged in with working branch and method name changes extracted.

* APPEALS-52861 feature branch changes merged in with working branch and method name changes extracted, included case statement.

* APPEALS-52861 moved case statement to another file to be the boolean check for constested status on an appeal.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-52892: For all legacy appeal states/notifications check status in VACOLS (#22455)

* initial commit

* addressing comments

* small change

* making tests
happy

* fixing spec tests

* rubocop'n

* reverting

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-53993: Update Implementation of Legacy Appeals with Hearing Held (#22473)

* implement new hearing requirement and test

* first pass at seed data for testing

* add new case to test and seed, fix typo and comments

* update for new 8.2.1.1 requirement

* fix rubocop warning

* fix error in seed file

* add new affinity scenario to seed data

* make some seed methods private

* fix rubocop warnings

* APPEALS-55159: Parameter Requirements Are Too Stringent Given What We Will Expect from VA Notify (#22561)

* APPEALS-55159

* updating tests

* APPEALS-55159 Refactor permitted and required params

* APPEALS-55159 Fix linting issue

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: msteele <Marc.Steele@va.gov>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Adding rake task to sync decided appeals (#22492)

* APPEALS-52872 Add rake task to sync decided appeals

* APPEALS-52872 Remove byebug

* APPEALS-52872 Fixing lint errors

* APPEALS-52872 Addressing performance issues

* APPEALS-52872 Addressing performance issues

* APPEALS-52872 Fix ENV variable update

* APPEALS-52872 Parallelizing AppealState updates

* APPEALS-52872 Remove byebug

---------

Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Prevent Prodtest from contacting VA Notify Staging (#22629)

* APPEALS-54918 Update VA Notify fake service and initializer

* APPEALS-54918 Add CASEFLOW_BASE_URL env var in demo/dev

* APPEALS-54918 Add seed file for API Key and added to main seed execution

* APPEALS-54918 Add missing argument to method definition

* APPEALS-54918 Update "to" params and fix linting issues

* APPEALS-54918 Prevent post requests in test env

* Rename ApiKeys seed file

* Fix linting error on require statement

* Add argument for call within sync_review_job.rb and minor refactor

* Inherit seed from base, align with AMA for seed file placement

* added test cases for infinite and omit levers with desired outcomes

* add check for hearing date to levers being infinite

* fix lint

* feature/APPEALS-34124-43428-29105-28925-33581 - Rails 6.1 upgrade (release) (#22776)

* 🔧 Assume defaults for `config.action_dispatch.use_cookies_with_metadata` and `config.action_mailer.delivery_job`

The following config settings are not backwards compatible:

- config.action_dispatch.use_cookies_with_metadata
- config.action_mailer.delivery_job

Now that Rails 6.0 is stable on production, we can assume
their default values going forward.

* ✅ Fix flakey spec

* 🔧 Assume default for `config.action_dispatch.use_authenticated_cookie_encryption`

Since we are making other cookie configuration changes in this PR for Rails 6.0,
this is an opportune time to migrate this Rails 5.2 cookie setting to its
default value as well.

* ⏪️ Restore overrides for `config.action_dispatch.use_authenticated_cookie_encryption` and `config.action_dispatch.use_cookies_with_metadata`

While testing in PreProd, we discovered that, without these cookie config overrides,
re-authentication was broken -- after logging out, a user could not log back in.

Since the default settings are still optional going forward, we can restore these
overrides and devise a solution to migrate cookies later.

For more details, see Jira story APPEALS-54897:

https://jira.devops.va.gov/browse/APPEALS-54897

* ✨ Add new utility module for adding DB indexes concurrently

Introduces `Caseflow::Migrations::AddIndexConcurrently` as a replacement
for `Caseflow::Migration` for migrations on ActiveRecord 6.0 and beyond,
since `Caseflow::Migration` is forever coupled to ActiveRecord 5.1 due
to its extensive use on legacy migrations and should be deprecated moving
forward.

* 🗑️ Deprecate `Caseflow::Migration`

* 🔧 Add instructive error message for non-concurrent `add_index` migrations

* 🚨 Address linter / codeclimate complaints

* ✨ Introduce `SslRedirectExclusionPolicy`

To be used in the environment configuration settings for excluding exempt
request paths from SSL redirects when `config. force_ssl = true`

* ♻️ Replace deprecated controller-level `force_ssl`

Replace deprecated controller-level `force_ssl` with
equivalent configuration settings in preparation for
the Rails 6.1 upgrade.

* 🔥 Remove deprecated config setting `config.active_record.sqlite3.represent_boolean_as_integer`

This will have no implications for Caseflow, since we are only using the `sqlite3`
adapter nominally for the `demo_vacols` database, which is not actually being used
in our demo environments (demo environments are deployed as `development` envs).

* ⬆️ Update `caseflow-commons` to resolve sub-dependency conflicts

Removes unneeded gems `bourbon` and `neat`, which had a sub-dependency conflict on `thor`.

* ⬆️ Update rails and other gems as necessary

* 🐛 Fix 'uninitialized constant' error when loading app

* ⬆️ bin/rails app:update - Apply relevant changes

* 🔧 Override default for `config.active_record.has_many_inversing`

* 🔧 Assume default for `config.active_storage.track_variants`

We're not currently using ActiveStorage in Caseflow, so it
is safe to just assume the default here.

* 🔧 Override default for `config.active_job.retry_jitter`

The default jitter is probably safe, however, I'm not 100% sure that we
don't have any jobs that need to be requeued with exact wait times. So
we let's override this for now to stay on the safe side.

* 🔧 Assume default for `config.active_job.skip_after_callbacks_if_terminated`

We're not currently using `throw :abort` within any `before_enqueue`/`before_perform` 
callbacks on existing Caseflow jobs, so the default should be fine here.

For more background, see
https://lilyreile.medium.com/rails-6-1-new-framework-defaults-what-they-do-and-how-to-safely-uncomment-them-c546b70f0c5e#4c60

* 🔧 Assume default for `config.action_dispatch.cookies_same_site_protection`

This setting controls the `SameSite` optional attribute for the
`Set-Cookie` header.

`SameSite=Lax` means that the cookie is not sent on cross-site requests,
such as on requests to load images or frames, but is sent when a user is
navigating to the origin site from an external site (for example, when
following a link). This is the default behavior if the SameSite attribute
is not specified.

`Lax` is currently the default assumed by both Chrome and Edge browsers
when this attribute is left unspecified, so assuming this value
should be sensible. It allows us to have our cake (blocking CSRF attacks)
and eat it too (providing a logged-in experience when users navigate to
Caseflow  across origins).

For more background, see
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value
- https://lilyreile.medium.com/rails-6-1-new-framework-defaults-what-they-do-and-how-to-safely-uncomment-them-c546b70f0c5e#1f15

* 🔧 Assume default for `config.action_controller.urlsafe_csrf_tokens`

* 🔧 Assume default for `ActiveSupport.utc_to_local_returns_utc_offset_times`

We're not using `ActiveSupport::TimeZone.utc_to_local` anywhere,
so the default is safe to assume here.

* 🔧 Assume default for `config.action_dispatch.ssl_default_redirect_status`

The default is safe to assume.

For more background, see
https://lilyreile.medium.com/rails-6-1-new-framework-defaults-what-they-do-and-how-to-safely-uncomment-them-c546b70f0c5e#4c3e

* 🔧 Assume default for `config.active_record.legacy_connection_handling`

The default should be safe to assume here, as we do not do any
role or shard switching on database connections.

For more background, see
https://lilyreile.medium.com/rails-6-1-new-framework-defaults-what-they-do-and-how-to-safely-uncomment-them-c546b70f0c5e#8007

* 🔧 Assume default for `config.action_view.form_with_generates_remote_forms`

We don't use the `form_with` helper anywhere, so this behavior change is
inconsequential for us, and we can safely assume the new default.

* 🔧 Assume default for `config.active_storage.queues.analysis`

We do not use ActiveStorage, so the default is safe to assume here.

* 🔧 Assume default for `config.active_storage.queues.purge`

We do not use ActiveStorage, so the default is safe to assume here.

* 🔧 Assume default for `config.action_mailbox.queues.incineration`

We don't use ActionMailbox, so the new default is safe to assume here.

* 🔧 Assume default for `config.action_mailbox.queues.routing`

We do not use ActionMailbox, so the default is safe to assume here.

* 🔧 Assume default for `config.action_mailer.deliver_later_queue_name`

We're not using `ActionMailer::MessageDelivery #deliver_later` anywhere,
so the default is safe to assume.

* 🔧 Assume default for `config.action_view.preload_links_header`

This flag can be safely uncommented. Browsers that support Link
headers will get a performance boost. Browsers that don’t will
ignore them.

We override in `development` environments to avoid an edge case
leading to an HTTP response header overflow.

For more background, see
https://lilyreile.medium.com/rails-6-1-new-framework-defaults-what-they-do-and-how-to-safely-uncomment-them-c546b70f0c5e#3679

* 🔥 Remove 'new_framework_defaults_6_1.rb'

* 🔧 Load defaults for Rails 6.1

* ♻️ Extract constant

* ♻️ Migrate to new Rails deprecation config where applicable

* ♻️ Push members down now that there is only one subclass

* 🩹 Add forgotten disallowed deprecation warning

This deprecation warning was addressed by the following
PR, but we forgot to add it to the list of disallowed
deprecation warnings:

#21614

* 💡 Update comment

Task `rake routes` has been replaced with `rails routes`

* ✅ Update test to account for change to `ActionDispatch::Response#content_type` 

`ActionDispatch::Response#content_type` now returns the full Content-Type header

* 🚨 Exclude 'config.ru' from Rubocop cops

* 🚚 Move 'db/etl/migrate' to 'db/etl_migrate'

* 🚚 Move 'db/etl/schema.rb' to 'db/etl_schema.rb'

* ♻️ Arrange 'database.yml' configs by environment

Group DB configs by environment in anticipation of
reformatting for Rails 6+ multi-DB configuration.

* 🔧 Reformat 'database.yml' to Rails 6+ multi-DB conventions

* 🔧 Add etl migration paths to DB config

* 🔧 Update DB connection names in 'database_cleaner' config

* ♻️ Use new database-specific rake tasks

After migrating to the Rails 6+ native multi-database configuration,
the behavior of some DB management tasks, such as `rake db:migrate`
changed such that they now act on ALL databases and not just the
primary database. So we must replace the invocations of these
tasks with their new, database-specific counterparts.

* ➖ Remove 'multiverse' gem

Now that we have fiully transitioned to Rails-native
multi-database support, we are no longer reliant on
the 'multiverse' gem and can remove it.

* 🗃️ Prohibit execution of vacols DB and non-DB-specific rake tasks

After transitioning to Rails-native multi-DB support,
the behavior of some DB tasks changed such that they will now
act on ALL databases and not just the primary database
(ex. `rake db:migrate` will now migrate ALL databases).

To avoid accidents, we re-define these tasks here to no-op
and output a helpful message to redirect developers toward
using their new database-specific counterparts instead.

* ♻️ Create new environment for GH workflow 'Make-docs-to-webpage'

Instead of performing a bunch of hard-to-maintain `sed` gymnastics
to modify the existing 'test' environment, let's create a new
'make_docs' environment (based off of 'test') and configure it
appropriately for use by the 'Make-docs-to-webpage' GH workflow.

* 💚 Remove redundant DB migrations from CI workflow

Task `db:schema:load` already loads the checked in schema,
so there should be no need to run `db:migrate` afterwards.

* 🐛 Fix `spec/mailers/hearing_mailer_spec.rb` - `NoMethodError`

Addresses the following error:

  NoMethodError: undefined method `build_lookup_context' for ActionView::Base:Class

* 🐛 Fix `spec/workflows/post_decision_motion_updater_spec.rb` - `FrozenError`

Addresses the following error:

  FrozenError: can't modify frozen Hash: {}

* ✅ Add test for `RoSchedulePeriod`

* 🐛 Fix `spec/models/schedule_period_spec.rb` - `ActiveRecord::RecordInvalid`

Apparently, there were some changes to the inner workings of
`ActiveModel::Errors` in Rails 6.1, causing a model to be
considered invalid in the case that `errors[:base] == [[]]`.
This makes sense, as `[[]]` is not considered "empty".

Unfortunately, this was causing `RoSchedulePeriod #validate_spreadsheet`
to inadvertently mark the model as invalid upon creation.
`HearingSchedule::ValidateRoSpreadsheet #validate` returns an
empty array (`[]`) when valid, which gets pushes onto the
`RoSchedulePeriod` `errors[:base]` array, resulting in a
non-empty array (`[[]]`) and an erroneously invalid disposition.

Furthermore, calling `<<` to an `ActiveModel::Errors` message array
in order to add an error is a deprecated, so we can take this
opportunity to use the new `#add` API to hit two birds with one stone.

The change implemented here is not a pure refactoring, however the
end-user experience is unchanged in terms of how errors are presented
when attempting to upload a spreadsheet with multiple non-conformities.

Down the road, we may want to consider moving
`HearingSchedule::ValidateRoSpreadsheet` toward using
`ActiveModel::Validations` in order to leverage the
full `ActiveModel::Errors` API and construct the
errors object in the prescribed manner.

For more details see
- https://api.rubyonrails.org/v6.1.7.7/classes/ActiveModel/Validations.html
- https://api.rubyonrails.org/v6.1.7.7/classes/ActiveModel/Errors.html

* 🐛 Fix `spec/mailers/hearing_mailer_spec.rb` - `ActionView::Template::Error`

* ✅ Fix `spec/models/veteran_spec.rb`

* ✅ Fix `spec/sql/ama_cases_sql_spec.rb`

Addresses failures such as the below:

  0) AMA Cases Tableau data source expected report calculates age and AOD based on person.dob
     Failure/Error: expect(aod_case["aod_veteran.age"]).to eq("76")

       expected: "76"
            got: 0.76e2

* ✅ Fix multiple specs - `Minitest::UnexpectedError`

Test helper method `#perform_enqueued_jobs` now wraps exceptions
in an `Minitest::UnexpectedError`:

https://github.com/rails/rails/blob/914caca2d31bd753f47f9168f2a375921d9e91cc/activejob/lib/active_job/test_helper.rb#L591

So, to assert that a specific
exception is raised during execution of the `#perform_enqueued_jobs`
block, we must rescue the `Minitest::UnexpectedError` and make the
assertion on its error message instead.

* ✅ Fix `spec/lib/helpers/association_wrapper_spec.rb`

* ✅ Fix `spec/controllers/api/v1/jobs_controller_spec.rb`

In Rails 6.1, `ActiveJob #perform_now` was changed to
behave as it did once before (at the behest of GitHub),
returning the value fo the job instead of true/false.

See related GH issue: rails/rails#38040

* 🐛 Fix `spec/controllers/appeals_controller_spec.rb` - `NoMethodError`

Addresses error:

  NoMethodError: undefined method `workflow' for #<CaseSearchResultsForVeteranFileNumber:0x00007f9a030966c8>

  0) AppealsController GET appeals when current user is a System Admin when request header does not contain Veteran ID responds with an error
     Failure/Error: errors: errors.messages[:workflow],

     NoMethodError:
       undefined method `workflow' for #<CaseSearchResultsForVeteranFileNumber:0x00007f9a030966c8>
     # ./app/workflows/case_search_results_base.rb:31:in `search_call'

* 🐛 Fix `CaseSearchResultsBase` validations

Addresses test failures in `spec/controllers/appeals_controller_spec.rb`
similar to the below:

  AppealsController GET appeals when current user is a System Admin when request header does not contain Veteran ID responds with an error
     Failure/Error: expect(response_body["errors"][0]["title"]).to eq "Veteran file number missing"

       expected: "Veteran file number missing"
            got: nil

Using `ActiveModel::Errors` to store error data in an arbitrary format may have been
somewhat permissible in the past, but it is an abuse of the object's intended use and is
also proving incompatible with the more formalized `ActiveModels::Errors` API in Rails 6.1.

In order to preserve the existing response shape of the affected JSON endpoints,
we need to move away from the `ActiveModel::Validations` implementation on `CaseSearchResultsBase`
(and its descendent classes) to a more bespoke method of performing validations and aggregating
errors, since Rails 6.1 `ActiveModel::Errors` is no longer appropriate for  our needs here.

* ✅ Fix `spec/controllers/application_controller_spec.rb` -- Cache-Control error

Addresses the test failure below:

    ApplicationController no cache headers when toggle set sets Cache-Control etc
     Failure/Error: expect(response.headers["Cache-Control"]).to eq "no-cache, no-store"

       expected: "no-cache, no-store"
            got: "no-store"

       (compared using ==)
     # ./spec/controllers/application_controller_spec.rb:59:in `block (4 levels) in <top (required)>'

In Rails 6.1, the `no-store` directive is exclusive of any others
that are set on the `Cache-Control` header, which makes sense given
the specification https://datatracker.ietf.org/doc/html/rfc7234#section-3

This change was implemented in PR rails/rails#39461

Since it no longer makese sense to set both `no-store` and `no-cache` directives,
we will only set `no-store` here, as that is the stronger of the two.

* 🐛 Fix multiple specs - `ActiveRecord::EagerLoadPolymorphicError`

Addresses multiple test failures caused by the error below:

  QueueConfig.to_hash title when assigned to an org is formatted as expected
     Failure/Error:
       tasks.with_assignees.group("assignees.display_name").count(:all).each_pair.map do |option, count|
         label = self.class.format_option_label(option, count)
         self.class.filter_option_hash(option, label)
       end

     ActiveRecord::EagerLoadPolymorphicError:
       Cannot eagerly load the polymorphic association :appeal
     # ./app/models/queue_column.rb:110:in `assignee_options'

* 🐛 Fix `spec/models/task_spec.rb` - `update_all` clears query cache

In Rails 6.1.7.7, the method `ActiveRecord::Relation #update_all`
will now clear any records cached by the calling relation.

This was altering the behavior of `Task #cancel_task_and_child_subtasks`
and causing the following test failure:

  Task#cancel_task_and_child_subtasks cancels all tasks and child subtasks
     Failure/Error: expect(second_level_tasks[0].versions.count).to eq(initial_versions + 2)

       expected: 3
            got: 2

       (compared using ==)
     # ./spec/models/task_spec.rb:368:in `block (3 levels) in <top (required)>'

To remedy, we will now cache the necessary Task records in an Array, which can
be used for generating PaperTrail versions both before and after the `update_all`.

* 🐛 Fix `spec/services/hearings/calendar_service_spec.rb` - template rendering error

Addresses the following test failure:

  Hearings::CalendarService.confirmation_calendar_invite returns appropriate iCalendar event
     Failure/Error: expect(ical_event.description).to eq(expected_description)

       expected: "You're scheduled for a virtual hearing with a Veterans Law Judge of the Board of Veterans' Appeals.\...to reschedule or cancel your virtual hearing, contact us by email at bvahearingteamhotline@va.gov\n"
            got: #<Icalendar::Values::Text("You're scheduled for a virtual hearing with a Veterans Law Judge of the Bo... reschedule or cancel your virtual hearing, contact us by email at bvahearingteamhotline@va.gov\n")>

* 🐛 Fix YAML syntax error caused by whitespace in ENV var

Address the following error, found during demo deployment:

  rake aborted!
  Cannot load database configuration:
  YAML syntax error occurred while parsing /caseflow/config/database.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Error: (<unknown>): could not find expected ':' while scanning a simple key at line 49 column 5

* ⬆️ Update `caseflow-commons` dependency to latest ref

Removes `bourbon` and `neat` dependencies.

* APPEALS-57351 Inactive Appeal Errors present when outcoding an appeal (#22721)

* APPEALS-57351 add template name check to handle errors

* APPEALS-57351 Add template_name argument to spec tests

* Update app/models/prepend/va_notify/appellant_notification.rb

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

* APPEALS-57351 Partial rspec updates, pushed before handing off

* APPEALS-57351 Add specs requested during review

* Update spec/controllers/idt/api/v2/appeals_controller_spec.rb

---------

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

* feature/APPEALS-50882 - Open Telemetry configuration and implementation (#22787)

* feature/appeals-45972 (#21950)

* Remove UUID from attrs sent_to metrics. (#21630)

* Remove UUID from attrs sent_to metrics.

* pushing with some linting issues for visibility.

* Change config implementation.

* Remove UUID from spec

* remove uuid from update_appellant job

* diable rubocop for open_telemetry init

* OTEL fixes

* rescue, errors

---------

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

* add otel reqs

* Remove throw

* comment out otel file loop

* try vendor suggested config

* update otel config to match vendor

* update pg gem

* otel include dt_host file

* otel require bundler and rubygems

* otel subset of instrumentation

* Revert "update pg gem"

This reverts commit fc1a45d.

* update redis and minimize otel instrumentation to just rails, rack, and activerecord

* otel add use_all except pg and redis

* otel require instruments

* otel fix typo

* otel fix typo

* otel comment out net_http

* otel silence aws sdk internals

* otel silence aws sdk internals

* otel add net http

* Individually use OTEL instruments (#22082)

* Individually use OTEL instruments
with options.

* disable AwsSdk only. Checking Rack options.

* re-require awssdk even while disabled.

* disable awssdk

* disable datadog for testing

* change sequence factory to properly seed

* updated opentelemetry and datadog configs

* rack context getter initalizer

* use one at a time

* add curly braces

* Revert change

* revert change

* Revert change

* Revert change

* Remove gemfile grouping

* Remove datadog.

* ActionPack and Actionview changes

* APPEALS-44287: Excluding disposition held and select that appeal for distribution  (#22277)

* first run at an SQL query removing duplicate appeals from distribution

* code refactor and excluding disposition held and select that appeal for distribution

* automated test for the duplicate hearing bug

* fix rubocop offense SpaceInsideBlockBraces

---------

Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: samasudhirreddy <sudhirreddy.sama@va.gov>

---------

Co-authored-by: Noelle Adkin <98478937+NoelleAd@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>
Co-authored-by: Dani <danielle.coleman1@va.gov>
Co-authored-by: raymond-hughes <raymond.hughes2@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: samasudhirreddy <sudhirreddy.sama@va.gov>

* Update bundler to 2.4.22

* Updating OTEL to use all and remove new relic gem

* Remove calls to new relic

* removed id attrs in metrics service calls that were causing dimension errors

* Update config for otel

* Reorder gems to fix linting issues

* Updating config and refactoring verbose gems to add all

* Reinstall gems

* Adding all instruments

* Update config to only include basic instruments

* Update Gemfile.lock

* Adding rake to gemfile

* Adding instruments

* Comment out PG and ActiveSupport

* Suppress AWS logs

* Remove redis and turn on actionview

* Turn actionview off

* Add Redis instrumentation back

* Turn ActionPack back on

* Disable Redis

* Remove mentions of Datadog

* Removed extra mentions of Datadog

* removed newrelic references and yml file

* Test updating workflow

* Revert workflow change

* Adding simplecov back

* Fixing linting error

* Removing by: attribute after removing keyword in metric service

* Adding simplecov lcov gem and updating workflow

* Update workflow

* Updating simplecov

* Revert simple cov

* Adding featureenvy skip for reek

* Update service name. (#22762)

---------

Co-authored-by: mikefinneran <110622959+mikefinneran@users.noreply.github.com>
Co-authored-by: Noelle Adkin <98478937+NoelleAd@users.noreply.github.com>
Co-authored-by: Dani <danielle.coleman1@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: samasudhirreddy <sudhirreddy.sama@va.gov>
Co-authored-by: Andrew Hadley <hadley_andrew@bah.com>
Co-authored-by: alex-guanipatin <alex.guanipatin@va.gov>
Co-authored-by: Drew Hadley <50673809+VandelayUtd@users.noreply.github.com>

* Remove unused variable with lint error. Re-introduce cert fixes

* Remove references to x86

* Revert "Remove references to x86"

This reverts commit fda290d.

---------

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: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: seanrpa <155660052+seanrpa@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Craig Reese <Reese_Craig@bah.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@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: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>
Co-authored-by: mikefinneran <110622959+mikefinneran@users.noreply.github.com>
Co-authored-by: Noelle Adkin <98478937+NoelleAd@users.noreply.github.com>
Co-authored-by: Dani <danielle.coleman1@va.gov>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: samasudhirreddy <sudhirreddy.sama@va.gov>
Co-authored-by: Andrew Hadley <hadley_andrew@bah.com>
Co-authored-by: alex-guanipatin <alex.guanipatin@va.gov>
Co-authored-by: Drew Hadley <50673809+VandelayUtd@users.noreply.github.com>
AdamShawBAH pushed a commit that referenced this pull request Sep 20, 2024
* 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

* Remove transaction_wrapper

* Remove extra newline

* 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-51045: Remove ReceiveNotificationJob (#22207)

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* MattT/APPEALS-51115: Initialize FIFO SQS Queues Locally (#22182)

* Set local env to utilize FIFO queues where appropriate

FIFO queues are configured with the same attributes as our queues in higher environments.

* Resolve failing test

* Remove defunct test

* Update make commands

---------

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

* 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)

* APPEALS-51847: Institute Database Migration for Establishing 'sms_status_reason' and 'email_status_reason' Columns (#22208)

* adding and running migration

* adding comments to migration and re running db:migrate

* pushing up original scheam

* committing schema

* small edit to migration and deleting unnecessary columns from schema

---------

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

* Fix rubocop and tests (#22231)

* removing job and all mentions of job (#22212)

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

* MattT/APPEALS-51059: Alter Select Quarterly Statuses (#22239)

* Alter status messages

* Save more info in fake response

* Swap keys

* Add missing param

* Test fixes. Also, setting appeal_docketed to false whenever appeals are decided or cancelled

* Fix fasterer issue

---------

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

* MattT/APPEALS-51101: Rewrite ProcessNotificationStatusUpdateJob to Consume Messages from an SQS Queue (#22247)

* Update fake response body

* Try enabling localstack in CI

* Init SqsService and alter most/all of the ProcessNotificationStatusUpdatesJob

* Create SQS queues in test env

* Change port formatting

* Mount docker socket

* Try localstack hostname

* Wait for localstack in CI

* Add more yarddoc comments

* Log errors and number of messages processed

* Add custom error classes

* Add yarddoc comments to SqsService class

* Create SqsService spec file

* Redo much of ProcessNotificationStatusUpdatesJob's spec file

* Disable line length checks for yarddoc comments

---------

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

* 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>

* APPEALS-51087: Rewrite Api::V1::VaNotifyController#notification_update Controller Action to No Longer Utilize Redis (#22295)

* initial push

* rubocop'n

* fixing tests?

* rubocop'n

* addressing most of matt's comments

* removing yard doc files and keeping comment

* rubocop

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* Update admin_ui_spec.rb for CAVC levers being enabled

* Remove extra attribute

* Fix incorrect log counts

* Fix log statement

* Fix typo

* APPEALS-53603: Modify logic to always show recipient information if present (#22414)

* initial commit

* making rspec tests happy

* linting

* adding tests back and refactoring

* small char error

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* Sync decided appeals with states table (#22434)

* APPEALS-52882 Sync decided appeals decision_mailed status

* APPEALS-52882 Fix lint issues

* APPEALS-52882 Fix codeclimate issues

* APPEALS-52882 Address PR feedback

* APPEALS-52882 Address PR feedback

* Jcohen/APPEALS-52861 (#22450)

* APPEALS-52861 Bug fix implemented.

* APPEALS-52861 cleaned up some code through aliasing a common method name between appeal_types, eliminating a check that we do in the AppealDecisionMailed module.

* APPEALS-52861 fixed method name error.

* APPEALS-52861 fixed some tests.

* APPEALS-52861 fixed More tests.

* APPEALS-52861 fixed More tests.

* APPEALS-52861 feature branch changes merged in with working branch and method name changes extracted.

* APPEALS-52861 feature branch changes merged in with working branch and method name changes extracted, included case statement.

* APPEALS-52861 moved case statement to another file to be the boolean check for constested status on an appeal.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-52892: For all legacy appeal states/notifications check status in VACOLS (#22455)

* initial commit

* addressing comments

* small change

* making tests
happy

* fixing spec tests

* rubocop'n

* reverting

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-53993: Update Implementation of Legacy Appeals with Hearing Held (#22473)

* implement new hearing requirement and test

* first pass at seed data for testing

* add new case to test and seed, fix typo and comments

* update for new 8.2.1.1 requirement

* fix rubocop warning

* fix error in seed file

* add new affinity scenario to seed data

* make some seed methods private

* fix rubocop warnings

* APPEALS-55159: Parameter Requirements Are Too Stringent Given What We Will Expect from VA Notify (#22561)

* APPEALS-55159

* updating tests

* APPEALS-55159 Refactor permitted and required params

* APPEALS-55159 Fix linting issue

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: msteele <Marc.Steele@va.gov>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Adding rake task to sync decided appeals (#22492)

* APPEALS-52872 Add rake task to sync decided appeals

* APPEALS-52872 Remove byebug

* APPEALS-52872 Fixing lint errors

* APPEALS-52872 Addressing performance issues

* APPEALS-52872 Addressing performance issues

* APPEALS-52872 Fix ENV variable update

* APPEALS-52872 Parallelizing AppealState updates

* APPEALS-52872 Remove byebug

---------

Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Prevent Prodtest from contacting VA Notify Staging (#22629)

* APPEALS-54918 Update VA Notify fake service and initializer

* APPEALS-54918 Add CASEFLOW_BASE_URL env var in demo/dev

* APPEALS-54918 Add seed file for API Key and added to main seed execution

* APPEALS-54918 Add missing argument to method definition

* APPEALS-54918 Update "to" params and fix linting issues

* APPEALS-54918 Prevent post requests in test env

* Rename ApiKeys seed file

* Fix linting error on require statement

* Add argument for call within sync_review_job.rb and minor refactor

* Inherit seed from base, align with AMA for seed file placement

* added test cases for infinite and omit levers with desired outcomes

* add check for hearing date to levers being infinite

* fix lint

* feature/APPEALS-34124-43428-29105-28925-33581 - Rails 6.1 upgrade (release) (#22776)

* 🔧 Assume defaults for `config.action_dispatch.use_cookies_with_metadata` and `config.action_mailer.delivery_job`

The following config settings are not backwards compatible:

- config.action_dispatch.use_cookies_with_metadata
- config.action_mailer.delivery_job

Now that Rails 6.0 is stable on production, we can assume
their default values going forward.

* ✅ Fix flakey spec

* 🔧 Assume default for `config.action_dispatch.use_authenticated_cookie_encryption`

Since we are making other cookie configuration changes in this PR for Rails 6.0,
this is an opportune time to migrate this Rails 5.2 cookie setting to its
default value as well.

* ⏪️ Restore overrides for `config.action_dispatch.use_authenticated_cookie_encryption` and `config.action_dispatch.use_cookies_with_metadata`

While testing in PreProd, we discovered that, without these cookie config overrides,
re-authentication was broken -- after logging out, a user could not log back in.

Since the default settings are still optional going forward, we can restore these
overrides and devise a solution to migrate cookies later.

For more details, see Jira story APPEALS-54897:

https://jira.devops.va.gov/browse/APPEALS-54897

* ✨ Add new utility module for adding DB indexes concurrently

Introduces `Caseflow::Migrations::AddIndexConcurrently` as a replacement
for `Caseflow::Migration` for migrations on ActiveRecord 6.0 and beyond,
since `Caseflow::Migration` is forever coupled to ActiveRecord 5.1 due
to its extensive use on legacy migrations and should be deprecated moving
forward.

* 🗑️ Deprecate `Caseflow::Migration`

* 🔧 Add instructive error message for non-concurrent `add_index` migrations

* 🚨 Address linter / codeclimate complaints

* ✨ Introduce `SslRedirectExclusionPolicy`

To be used in the environment configuration settings for excluding exempt
request paths from SSL redirects when `config. force_ssl = true`

* ♻️ Replace deprecated controller-level `force_ssl`

Replace deprecated controller-level `force_ssl` with
equivalent configuration settings in preparation for
the Rails 6.1 upgrade.

* 🔥 Remove deprecated config setting `config.active_record.sqlite3.represent_boolean_as_integer`

This will have no implications for Caseflow, since we are only using the `sqlite3`
adapter nominally for the `demo_vacols` database, which is not actually being used
in our demo environments (demo environments are deployed as `development` envs).

* ⬆️ Update `caseflow-commons` to resolve sub-dependency conflicts

Removes unneeded gems `bourbon` and `neat`, which had a sub-dependency conflict on `thor`.

* ⬆️ Update rails and other gems as necessary

* 🐛 Fix 'uninitialized constant' error when loading app

* ⬆️ bin/rails app:update - Apply relevant changes

* 🔧 Override default for `config.active_record.has_many_inversing`

* 🔧 Assume default for `config.active_storage.track_variants`

We're not currently using ActiveStorage in Caseflow, so it
is safe to just assume the default here.

* 🔧 Override default for `config.active_job.retry_jitter`

The default jitter is probably safe, however, I'm not 100% sure that we
don't have any jobs that need to be requeued with exact wait times. So
we let's override this for now to stay on the safe side.

* 🔧 Assume default for `config.active_job.skip_after_callbacks_if_terminated`

We're not currently using `throw :abort` within any `before_enqueue`/`before_perform` 
callbacks on existing Caseflow jobs, so the default should be fine here.

For more background, see
https://lilyreile.medium.com/rails-6-1-new-framework-defaults-what-they-do-and-how-to-safely-uncomment-them-c546b70f0c5e#4c60

* 🔧 Assume default for `config.action_dispatch.cookies_same_site_protection`

This setting controls the `SameSite` optional attribute for the
`Set-Cookie` header.

`SameSite=Lax` means that the cookie is not sent on cross-site requests,
such as on requests to load images or frames, but is sent when a user is
navigating to the origin site from an external site (for example, when
following a link). This is the default behavior if the SameSite attribute
is not specified.

`Lax` is currently the default assumed by both Chrome and Edge browsers
when this attribute is left unspecified, so assuming this value
should be sensible. It allows us to have our cake (blocking CSRF attacks)
and eat it too (providing a logged-in experience when users navigate to
Caseflow  across origins).

For more background, see
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value
- https://lilyreile.medium.com/rails-6-1-new-framework-defaults-what-they-do-and-how-to-safely-uncomment-them-c546b70f0c5e#1f15

* 🔧 Assume default for `config.action_controller.urlsafe_csrf_tokens`

* 🔧 Assume default for `ActiveSupport.utc_to_local_returns_utc_offset_times`

We're not using `ActiveSupport::TimeZone.utc_to_local` anywhere,
so the default is safe to assume here.

* 🔧 Assume default for `config.action_dispatch.ssl_default_redirect_status`

The default is safe to assume.

For more background, see
https://lilyreile.medium.com/rails-6-1-new-framework-defaults-what-they-do-and-how-to-safely-uncomment-them-c546b70f0c5e#4c3e

* 🔧 Assume default for `config.active_record.legacy_connection_handling`

The default should be safe to assume here, as we do not do any
role or shard switching on database connections.

For more background, see
https://lilyreile.medium.com/rails-6-1-new-framework-defaults-what-they-do-and-how-to-safely-uncomment-them-c546b70f0c5e#8007

* 🔧 Assume default for `config.action_view.form_with_generates_remote_forms`

We don't use the `form_with` helper anywhere, so this behavior change is
inconsequential for us, and we can safely assume the new default.

* 🔧 Assume default for `config.active_storage.queues.analysis`

We do not use ActiveStorage, so the default is safe to assume here.

* 🔧 Assume default for `config.active_storage.queues.purge`

We do not use ActiveStorage, so the default is safe to assume here.

* 🔧 Assume default for `config.action_mailbox.queues.incineration`

We don't use ActionMailbox, so the new default is safe to assume here.

* 🔧 Assume default for `config.action_mailbox.queues.routing`

We do not use ActionMailbox, so the default is safe to assume here.

* 🔧 Assume default for `config.action_mailer.deliver_later_queue_name`

We're not using `ActionMailer::MessageDelivery #deliver_later` anywhere,
so the default is safe to assume.

* 🔧 Assume default for `config.action_view.preload_links_header`

This flag can be safely uncommented. Browsers that support Link
headers will get a performance boost. Browsers that don’t will
ignore them.

We override in `development` environments to avoid an edge case
leading to an HTTP response header overflow.

For more background, see
https://lilyreile.medium.com/rails-6-1-new-framework-defaults-what-they-do-and-how-to-safely-uncomment-them-c546b70f0c5e#3679

* 🔥 Remove 'new_framework_defaults_6_1.rb'

* 🔧 Load defaults for Rails 6.1

* ♻️ Extract constant

* ♻️ Migrate to new Rails deprecation config where applicable

* ♻️ Push members down now that there is only one subclass

* 🩹 Add forgotten disallowed deprecation warning

This deprecation warning was addressed by the following
PR, but we forgot to add it to the list of disallowed
deprecation warnings:

#21614

* 💡 Update comment

Task `rake routes` has been replaced with `rails routes`

* ✅ Update test to account for change to `ActionDispatch::Response#content_type` 

`ActionDispatch::Response#content_type` now returns the full Content-Type header

* 🚨 Exclude 'config.ru' from Rubocop cops

* 🚚 Move 'db/etl/migrate' to 'db/etl_migrate'

* 🚚 Move 'db/etl/schema.rb' to 'db/etl_schema.rb'

* ♻️ Arrange 'database.yml' configs by environment

Group DB configs by environment in anticipation of
reformatting for Rails 6+ multi-DB configuration.

* 🔧 Reformat 'database.yml' to Rails 6+ multi-DB conventions

* 🔧 Add etl migration paths to DB config

* 🔧 Update DB connection names in 'database_cleaner' config

* ♻️ Use new database-specific rake tasks

After migrating to the Rails 6+ native multi-database configuration,
the behavior of some DB management tasks, such as `rake db:migrate`
changed such that they now act on ALL databases and not just the
primary database. So we must replace the invocations of these
tasks with their new, database-specific counterparts.

* ➖ Remove 'multiverse' gem

Now that we have fiully transitioned to Rails-native
multi-database support, we are no longer reliant on
the 'multiverse' gem and can remove it.

* 🗃️ Prohibit execution of vacols DB and non-DB-specific rake tasks

After transitioning to Rails-native multi-DB support,
the behavior of some DB tasks changed such that they will now
act on ALL databases and not just the primary database
(ex. `rake db:migrate` will now migrate ALL databases).

To avoid accidents, we re-define these tasks here to no-op
and output a helpful message to redirect developers toward
using their new database-specific counterparts instead.

* ♻️ Create new environment for GH workflow 'Make-docs-to-webpage'

Instead of performing a bunch of hard-to-maintain `sed` gymnastics
to modify the existing 'test' environment, let's create a new
'make_docs' environment (based off of 'test') and configure it
appropriately for use by the 'Make-docs-to-webpage' GH workflow.

* 💚 Remove redundant DB migrations from CI workflow

Task `db:schema:load` already loads the checked in schema,
so there should be no need to run `db:migrate` afterwards.

* 🐛 Fix `spec/mailers/hearing_mailer_spec.rb` - `NoMethodError`

Addresses the following error:

  NoMethodError: undefined method `build_lookup_context' for ActionView::Base:Class

* 🐛 Fix `spec/workflows/post_decision_motion_updater_spec.rb` - `FrozenError`

Addresses the following error:

  FrozenError: can't modify frozen Hash: {}

* ✅ Add test for `RoSchedulePeriod`

* 🐛 Fix `spec/models/schedule_period_spec.rb` - `ActiveRecord::RecordInvalid`

Apparently, there were some changes to the inner workings of
`ActiveModel::Errors` in Rails 6.1, causing a model to be
considered invalid in the case that `errors[:base] == [[]]`.
This makes sense, as `[[]]` is not considered "empty".

Unfortunately, this was causing `RoSchedulePeriod #validate_spreadsheet`
to inadvertently mark the model as invalid upon creation.
`HearingSchedule::ValidateRoSpreadsheet #validate` returns an
empty array (`[]`) when valid, which gets pushes onto the
`RoSchedulePeriod` `errors[:base]` array, resulting in a
non-empty array (`[[]]`) and an erroneously invalid disposition.

Furthermore, calling `<<` to an `ActiveModel::Errors` message array
in order to add an error is a deprecated, so we can take this
opportunity to use the new `#add` API to hit two birds with one stone.

The change implemented here is not a pure refactoring, however the
end-user experience is unchanged in terms of how errors are presented
when attempting to upload a spreadsheet with multiple non-conformities.

Down the road, we may want to consider moving
`HearingSchedule::ValidateRoSpreadsheet` toward using
`ActiveModel::Validations` in order to leverage the
full `ActiveModel::Errors` API and construct the
errors object in the prescribed manner.

For more details see
- https://api.rubyonrails.org/v6.1.7.7/classes/ActiveModel/Validations.html
- https://api.rubyonrails.org/v6.1.7.7/classes/ActiveModel/Errors.html

* 🐛 Fix `spec/mailers/hearing_mailer_spec.rb` - `ActionView::Template::Error`

* ✅ Fix `spec/models/veteran_spec.rb`

* ✅ Fix `spec/sql/ama_cases_sql_spec.rb`

Addresses failures such as the below:

  0) AMA Cases Tableau data source expected report calculates age and AOD based on person.dob
     Failure/Error: expect(aod_case["aod_veteran.age"]).to eq("76")

       expected: "76"
            got: 0.76e2

* ✅ Fix multiple specs - `Minitest::UnexpectedError`

Test helper method `#perform_enqueued_jobs` now wraps exceptions
in an `Minitest::UnexpectedError`:

https://github.com/rails/rails/blob/914caca2d31bd753f47f9168f2a375921d9e91cc/activejob/lib/active_job/test_helper.rb#L591

So, to assert that a specific
exception is raised during execution of the `#perform_enqueued_jobs`
block, we must rescue the `Minitest::UnexpectedError` and make the
assertion on its error message instead.

* ✅ Fix `spec/lib/helpers/association_wrapper_spec.rb`

* ✅ Fix `spec/controllers/api/v1/jobs_controller_spec.rb`

In Rails 6.1, `ActiveJob #perform_now` was changed to
behave as it did once before (at the behest of GitHub),
returning the value fo the job instead of true/false.

See related GH issue: rails/rails#38040

* 🐛 Fix `spec/controllers/appeals_controller_spec.rb` - `NoMethodError`

Addresses error:

  NoMethodError: undefined method `workflow' for #<CaseSearchResultsForVeteranFileNumber:0x00007f9a030966c8>

  0) AppealsController GET appeals when current user is a System Admin when request header does not contain Veteran ID responds with an error
     Failure/Error: errors: errors.messages[:workflow],

     NoMethodError:
       undefined method `workflow' for #<CaseSearchResultsForVeteranFileNumber:0x00007f9a030966c8>
     # ./app/workflows/case_search_results_base.rb:31:in `search_call'

* 🐛 Fix `CaseSearchResultsBase` validations

Addresses test failures in `spec/controllers/appeals_controller_spec.rb`
similar to the below:

  AppealsController GET appeals when current user is a System Admin when request header does not contain Veteran ID responds with an error
     Failure/Error: expect(response_body["errors"][0]["title"]).to eq "Veteran file number missing"

       expected: "Veteran file number missing"
            got: nil

Using `ActiveModel::Errors` to store error data in an arbitrary format may have been
somewhat permissible in the past, but it is an abuse of the object's intended use and is
also proving incompatible with the more formalized `ActiveModels::Errors` API in Rails 6.1.

In order to preserve the existing response shape of the affected JSON endpoints,
we need to move away from the `ActiveModel::Validations` implementation on `CaseSearchResultsBase`
(and its descendent classes) to a more bespoke method of performing validations and aggregating
errors, since Rails 6.1 `ActiveModel::Errors` is no longer appropriate for  our needs here.

* ✅ Fix `spec/controllers/application_controller_spec.rb` -- Cache-Control error

Addresses the test failure below:

    ApplicationController no cache headers when toggle set sets Cache-Control etc
     Failure/Error: expect(response.headers["Cache-Control"]).to eq "no-cache, no-store"

       expected: "no-cache, no-store"
            got: "no-store"

       (compared using ==)
     # ./spec/controllers/application_controller_spec.rb:59:in `block (4 levels) in <top (required)>'

In Rails 6.1, the `no-store` directive is exclusive of any others
that are set on the `Cache-Control` header, which makes sense given
the specification https://datatracker.ietf.org/doc/html/rfc7234#section-3

This change was implemented in PR rails/rails#39461

Since it no longer makese sense to set both `no-store` and `no-cache` directives,
we will only set `no-store` here, as that is the stronger of the two.

* 🐛 Fix multiple specs - `ActiveRecord::EagerLoadPolymorphicError`

Addresses multiple test failures caused by the error below:

  QueueConfig.to_hash title when assigned to an org is formatted as expected
     Failure/Error:
       tasks.with_assignees.group("assignees.display_name").count(:all).each_pair.map do |option, count|
         label = self.class.format_option_label(option, count)
         self.class.filter_option_hash(option, label)
       end

     ActiveRecord::EagerLoadPolymorphicError:
       Cannot eagerly load the polymorphic association :appeal
     # ./app/models/queue_column.rb:110:in `assignee_options'

* 🐛 Fix `spec/models/task_spec.rb` - `update_all` clears query cache

In Rails 6.1.7.7, the method `ActiveRecord::Relation #update_all`
will now clear any records cached by the calling relation.

This was altering the behavior of `Task #cancel_task_and_child_subtasks`
and causing the following test failure:

  Task#cancel_task_and_child_subtasks cancels all tasks and child subtasks
     Failure/Error: expect(second_level_tasks[0].versions.count).to eq(initial_versions + 2)

       expected: 3
            got: 2

       (compared using ==)
     # ./spec/models/task_spec.rb:368:in `block (3 levels) in <top (required)>'

To remedy, we will now cache the necessary Task records in an Array, which can
be used for generating PaperTrail versions both before and after the `update_all`.

* 🐛 Fix `spec/services/hearings/calendar_service_spec.rb` - template rendering error

Addresses the following test failure:

  Hearings::CalendarService.confirmation_calendar_invite returns appropriate iCalendar event
     Failure/Error: expect(ical_event.description).to eq(expected_description)

       expected: "You're scheduled for a virtual hearing with a Veterans Law Judge of the Board of Veterans' Appeals.\...to reschedule or cancel your virtual hearing, contact us by email at bvahearingteamhotline@va.gov\n"
            got: #<Icalendar::Values::Text("You're scheduled for a virtual hearing with a Veterans Law Judge of the Bo... reschedule or cancel your virtual hearing, contact us by email at bvahearingteamhotline@va.gov\n")>

* 🐛 Fix YAML syntax error caused by whitespace in ENV var

Address the following error, found during demo deployment:

  rake aborted!
  Cannot load database configuration:
  YAML syntax error occurred while parsing /caseflow/config/database.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Error: (<unknown>): could not find expected ':' while scanning a simple key at line 49 column 5

* ⬆️ Update `caseflow-commons` dependency to latest ref

Removes `bourbon` and `neat` dependencies.

* APPEALS-57351 Inactive Appeal Errors present when outcoding an appeal (#22721)

* APPEALS-57351 add template name check to handle errors

* APPEALS-57351 Add template_name argument to spec tests

* Update app/models/prepend/va_notify/appellant_notification.rb

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

* APPEALS-57351 Partial rspec updates, pushed before handing off

* APPEALS-57351 Add specs requested during review

* Update spec/controllers/idt/api/v2/appeals_controller_spec.rb

---------

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

* feature/APPEALS-50882 - Open Telemetry configuration and implementation (#22787)

* feature/appeals-45972 (#21950)

* Remove UUID from attrs sent_to metrics. (#21630)

* Remove UUID from attrs sent_to metrics.

* pushing with some linting issues for visibility.

* Change config implementation.

* Remove UUID from spec

* remove uuid from update_appellant job

* diable rubocop for open_telemetry init

* OTEL fixes

* rescue, errors

---------

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

* add otel reqs

* Remove throw

* comment out otel file loop

* try vendor suggested config

* update otel config to match vendor

* update pg gem

* otel include dt_host file

* otel require bundler and rubygems

* otel subset of instrumentation

* Revert "update pg gem"

This reverts commit fc1a45d.

* update redis and minimize otel instrumentation to just rails, rack, and activerecord

* otel add use_all except pg and redis

* otel require instruments

* otel fix typo

* otel fix typo

* otel comment out net_http

* otel silence aws sdk internals

* otel silence aws sdk internals

* otel add net http

* Individually use OTEL instruments (#22082)

* Individually use OTEL instruments
with options.

* disable AwsSdk only. Checking Rack options.

* re-require awssdk even while disabled.

* disable awssdk

* disable datadog for testing

* change sequence factory to properly seed

* updated opentelemetry and datadog configs

* rack context getter initalizer

* use one at a time

* add curly braces

* Revert change

* revert change

* Revert change

* Revert change

* Remove gemfile grouping

* Remove datadog.

* ActionPack and Actionview changes

* APPEALS-44287: Excluding disposition held and select that appeal for distribution  (#22277)

* first run at an SQL query removing duplicate appeals from distribution

* code refactor and excluding disposition held and select that appeal for distribution

* automated test for the duplicate hearing bug

* fix rubocop offense SpaceInsideBlockBraces

---------

Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: samasudhirreddy <sudhirreddy.sama@va.gov>

---------

Co-authored-by: Noelle Adkin <98478937+NoelleAd@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>
Co-authored-by: Dani <danielle.coleman1@va.gov>
Co-authored-by: raymond-hughes <raymond.hughes2@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: samasudhirreddy <sudhirreddy.sama@va.gov>

* Update bundler to 2.4.22

* Updating OTEL to use all and remove new relic gem

* Remove calls to new relic

* removed id attrs in metrics service calls that were causing dimension errors

* Update config for otel

* Reorder gems to fix linting issues

* Updating config and refactoring verbose gems to add all

* Reinstall gems

* Adding all instruments

* Update config to only include basic instruments

* Update Gemfile.lock

* Adding rake to gemfile

* Adding instruments

* Comment out PG and ActiveSupport

* Suppress AWS logs

* Remove redis and turn on actionview

* Turn actionview off

* Add Redis instrumentation back

* Turn ActionPack back on

* Disable Redis

* Remove mentions of Datadog

* Removed extra mentions of Datadog

* removed newrelic references and yml file

* Test updating workflow

* Revert workflow change

* Adding simplecov back

* Fixing linting error

* Removing by: attribute after removing keyword in metric service

* Adding simplecov lcov gem and updating workflow

* Update workflow

* Updating simplecov

* Revert simple cov

* Adding featureenvy skip for reek

* Update service name. (#22762)

---------

Co-authored-by: mikefinneran <110622959+mikefinneran@users.noreply.github.com>
Co-authored-by: Noelle Adkin <98478937+NoelleAd@users.noreply.github.com>
Co-authored-by: Dani <danielle.coleman1@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: samasudhirreddy <sudhirreddy.sama@va.gov>
Co-authored-by: Andrew Hadley <hadley_andrew@bah.com>
Co-authored-by: alex-guanipatin <alex.guanipatin@va.gov>
Co-authored-by: Drew Hadley <50673809+VandelayUtd@users.noreply.github.com>

* Remove unused variable with lint error. Re-introduce cert fixes

* Remove references to x86

* Revert "Remove references to x86"

This reverts commit fda290d.

---------

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: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: seanrpa <155660052+seanrpa@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Craig Reese <Reese_Craig@bah.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@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: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>
Co-authored-by: mikefinneran <110622959+mikefinneran@users.noreply.github.com>
Co-authored-by: Noelle Adkin <98478937+NoelleAd@users.noreply.github.com>
Co-authored-by: Dani <danielle.coleman1@va.gov>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: samasudhirreddy <sudhirreddy.sama@va.gov>
Co-authored-by: Andrew Hadley <hadley_andrew@bah.com>
Co-authored-by: alex-guanipatin <alex.guanipatin@va.gov>
Co-authored-by: Drew Hadley <50673809+VandelayUtd@users.noreply.github.com>
laurenyj pushed a commit that referenced this pull request Sep 25, 2024
* 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

* Remove transaction_wrapper

* Remove extra newline

* 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-51045: Remove ReceiveNotificationJob (#22207)

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* MattT/APPEALS-51115: Initialize FIFO SQS Queues Locally (#22182)

* Set local env to utilize FIFO queues where appropriate

FIFO queues are configured with the same attributes as our queues in higher environments.

* Resolve failing test

* Remove defunct test

* Update make commands

---------

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

* 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)

* APPEALS-51847: Institute Database Migration for Establishing 'sms_status_reason' and 'email_status_reason' Columns (#22208)

* adding and running migration

* adding comments to migration and re running db:migrate

* pushing up original scheam

* committing schema

* small edit to migration and deleting unnecessary columns from schema

---------

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

* Fix rubocop and tests (#22231)

* removing job and all mentions of job (#22212)

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

* MattT/APPEALS-51059: Alter Select Quarterly Statuses (#22239)

* Alter status messages

* Save more info in fake response

* Swap keys

* Add missing param

* Test fixes. Also, setting appeal_docketed to false whenever appeals are decided or cancelled

* Fix fasterer issue

---------

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

* MattT/APPEALS-51101: Rewrite ProcessNotificationStatusUpdateJob to Consume Messages from an SQS Queue (#22247)

* Update fake response body

* Try enabling localstack in CI

* Init SqsService and alter most/all of the ProcessNotificationStatusUpdatesJob

* Create SQS queues in test env

* Change port formatting

* Mount docker socket

* Try localstack hostname

* Wait for localstack in CI

* Add more yarddoc comments

* Log errors and number of messages processed

* Add custom error classes

* Add yarddoc comments to SqsService class

* Create SqsService spec file

* Redo much of ProcessNotificationStatusUpdatesJob's spec file

* Disable line length checks for yarddoc comments

---------

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

* 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>

* APPEALS-51087: Rewrite Api::V1::VaNotifyController#notification_update Controller Action to No Longer Utilize Redis (#22295)

* initial push

* rubocop'n

* fixing tests?

* rubocop'n

* addressing most of matt's comments

* removing yard doc files and keeping comment

* rubocop

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* Update admin_ui_spec.rb for CAVC levers being enabled

* Remove extra attribute

* Fix incorrect log counts

* Fix log statement

* Fix typo

* APPEALS-53603: Modify logic to always show recipient information if present (#22414)

* initial commit

* making rspec tests happy

* linting

* adding tests back and refactoring

* small char error

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>

* Sync decided appeals with states table (#22434)

* APPEALS-52882 Sync decided appeals decision_mailed status

* APPEALS-52882 Fix lint issues

* APPEALS-52882 Fix codeclimate issues

* APPEALS-52882 Address PR feedback

* APPEALS-52882 Address PR feedback

* Jcohen/APPEALS-52861 (#22450)

* APPEALS-52861 Bug fix implemented.

* APPEALS-52861 cleaned up some code through aliasing a common method name between appeal_types, eliminating a check that we do in the AppealDecisionMailed module.

* APPEALS-52861 fixed method name error.

* APPEALS-52861 fixed some tests.

* APPEALS-52861 fixed More tests.

* APPEALS-52861 fixed More tests.

* APPEALS-52861 feature branch changes merged in with working branch and method name changes extracted.

* APPEALS-52861 feature branch changes merged in with working branch and method name changes extracted, included case statement.

* APPEALS-52861 moved case statement to another file to be the boolean check for constested status on an appeal.

---------

Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-52892: For all legacy appeal states/notifications check status in VACOLS (#22455)

* initial commit

* addressing comments

* small change

* making tests
happy

* fixing spec tests

* rubocop'n

* reverting

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* APPEALS-53993: Update Implementation of Legacy Appeals with Hearing Held (#22473)

* implement new hearing requirement and test

* first pass at seed data for testing

* add new case to test and seed, fix typo and comments

* update for new 8.2.1.1 requirement

* fix rubocop warning

* fix error in seed file

* add new affinity scenario to seed data

* make some seed methods private

* fix rubocop warnings

* APPEALS-55159: Parameter Requirements Are Too Stringent Given What We Will Expect from VA Notify (#22561)

* APPEALS-55159

* updating tests

* APPEALS-55159 Refactor permitted and required params

* APPEALS-55159 Fix linting issue

---------

Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: msteele <Marc.Steele@va.gov>
Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Adding rake task to sync decided appeals (#22492)

* APPEALS-52872 Add rake task to sync decided appeals

* APPEALS-52872 Remove byebug

* APPEALS-52872 Fixing lint errors

* APPEALS-52872 Addressing performance issues

* APPEALS-52872 Addressing performance issues

* APPEALS-52872 Fix ENV variable update

* APPEALS-52872 Parallelizing AppealState updates

* APPEALS-52872 Remove byebug

---------

Co-authored-by: Marc Steele <71673522+msteele96@users.noreply.github.com>

* Prevent Prodtest from contacting VA Notify Staging (#22629)

* APPEALS-54918 Update VA Notify fake service and initializer

* APPEALS-54918 Add CASEFLOW_BASE_URL env var in demo/dev

* APPEALS-54918 Add seed file for API Key and added to main seed execution

* APPEALS-54918 Add missing argument to method definition

* APPEALS-54918 Update "to" params and fix linting issues

* APPEALS-54918 Prevent post requests in test env

* Rename ApiKeys seed file

* Fix linting error on require statement

* Add argument for call within sync_review_job.rb and minor refactor

* Inherit seed from base, align with AMA for seed file placement

* added test cases for infinite and omit levers with desired outcomes

* add check for hearing date to levers being infinite

* fix lint

* feature/APPEALS-34124-43428-29105-28925-33581 - Rails 6.1 upgrade (release) (#22776)

* 🔧 Assume defaults for `config.action_dispatch.use_cookies_with_metadata` and `config.action_mailer.delivery_job`

The following config settings are not backwards compatible:

- config.action_dispatch.use_cookies_with_metadata
- config.action_mailer.delivery_job

Now that Rails 6.0 is stable on production, we can assume
their default values going forward.

* ✅ Fix flakey spec

* 🔧 Assume default for `config.action_dispatch.use_authenticated_cookie_encryption`

Since we are making other cookie configuration changes in this PR for Rails 6.0,
this is an opportune time to migrate this Rails 5.2 cookie setting to its
default value as well.

* ⏪️ Restore overrides for `config.action_dispatch.use_authenticated_cookie_encryption` and `config.action_dispatch.use_cookies_with_metadata`

While testing in PreProd, we discovered that, without these cookie config overrides,
re-authentication was broken -- after logging out, a user could not log back in.

Since the default settings are still optional going forward, we can restore these
overrides and devise a solution to migrate cookies later.

For more details, see Jira story APPEALS-54897:

https://jira.devops.va.gov/browse/APPEALS-54897

* ✨ Add new utility module for adding DB indexes concurrently

Introduces `Caseflow::Migrations::AddIndexConcurrently` as a replacement
for `Caseflow::Migration` for migrations on ActiveRecord 6.0 and beyond,
since `Caseflow::Migration` is forever coupled to ActiveRecord 5.1 due
to its extensive use on legacy migrations and should be deprecated moving
forward.

* 🗑️ Deprecate `Caseflow::Migration`

* 🔧 Add instructive error message for non-concurrent `add_index` migrations

* 🚨 Address linter / codeclimate complaints

* ✨ Introduce `SslRedirectExclusionPolicy`

To be used in the environment configuration settings for excluding exempt
request paths from SSL redirects when `config. force_ssl = true`

* ♻️ Replace deprecated controller-level `force_ssl`

Replace deprecated controller-level `force_ssl` with
equivalent configuration settings in preparation for
the Rails 6.1 upgrade.

* 🔥 Remove deprecated config setting `config.active_record.sqlite3.represent_boolean_as_integer`

This will have no implications for Caseflow, since we are only using the `sqlite3`
adapter nominally for the `demo_vacols` database, which is not actually being used
in our demo environments (demo environments are deployed as `development` envs).

* ⬆️ Update `caseflow-commons` to resolve sub-dependency conflicts

Removes unneeded gems `bourbon` and `neat`, which had a sub-dependency conflict on `thor`.

* ⬆️ Update rails and other gems as necessary

* 🐛 Fix 'uninitialized constant' error when loading app

* ⬆️ bin/rails app:update - Apply relevant changes

* 🔧 Override default for `config.active_record.has_many_inversing`

* 🔧 Assume default for `config.active_storage.track_variants`

We're not currently using ActiveStorage in Caseflow, so it
is safe to just assume the default here.

* 🔧 Override default for `config.active_job.retry_jitter`

The default jitter is probably safe, however, I'm not 100% sure that we
don't have any jobs that need to be requeued with exact wait times. So
we let's override this for now to stay on the safe side.

* 🔧 Assume default for `config.active_job.skip_after_callbacks_if_terminated`

We're not currently using `throw :abort` within any `before_enqueue`/`before_perform` 
callbacks on existing Caseflow jobs, so the default should be fine here.

For more background, see
https://lilyreile.medium.com/rails-6-1-new-framework-defaults-what-they-do-and-how-to-safely-uncomment-them-c546b70f0c5e#4c60

* 🔧 Assume default for `config.action_dispatch.cookies_same_site_protection`

This setting controls the `SameSite` optional attribute for the
`Set-Cookie` header.

`SameSite=Lax` means that the cookie is not sent on cross-site requests,
such as on requests to load images or frames, but is sent when a user is
navigating to the origin site from an external site (for example, when
following a link). This is the default behavior if the SameSite attribute
is not specified.

`Lax` is currently the default assumed by both Chrome and Edge browsers
when this attribute is left unspecified, so assuming this value
should be sensible. It allows us to have our cake (blocking CSRF attacks)
and eat it too (providing a logged-in experience when users navigate to
Caseflow  across origins).

For more background, see
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value
- https://lilyreile.medium.com/rails-6-1-new-framework-defaults-what-they-do-and-how-to-safely-uncomment-them-c546b70f0c5e#1f15

* 🔧 Assume default for `config.action_controller.urlsafe_csrf_tokens`

* 🔧 Assume default for `ActiveSupport.utc_to_local_returns_utc_offset_times`

We're not using `ActiveSupport::TimeZone.utc_to_local` anywhere,
so the default is safe to assume here.

* 🔧 Assume default for `config.action_dispatch.ssl_default_redirect_status`

The default is safe to assume.

For more background, see
https://lilyreile.medium.com/rails-6-1-new-framework-defaults-what-they-do-and-how-to-safely-uncomment-them-c546b70f0c5e#4c3e

* 🔧 Assume default for `config.active_record.legacy_connection_handling`

The default should be safe to assume here, as we do not do any
role or shard switching on database connections.

For more background, see
https://lilyreile.medium.com/rails-6-1-new-framework-defaults-what-they-do-and-how-to-safely-uncomment-them-c546b70f0c5e#8007

* 🔧 Assume default for `config.action_view.form_with_generates_remote_forms`

We don't use the `form_with` helper anywhere, so this behavior change is
inconsequential for us, and we can safely assume the new default.

* 🔧 Assume default for `config.active_storage.queues.analysis`

We do not use ActiveStorage, so the default is safe to assume here.

* 🔧 Assume default for `config.active_storage.queues.purge`

We do not use ActiveStorage, so the default is safe to assume here.

* 🔧 Assume default for `config.action_mailbox.queues.incineration`

We don't use ActionMailbox, so the new default is safe to assume here.

* 🔧 Assume default for `config.action_mailbox.queues.routing`

We do not use ActionMailbox, so the default is safe to assume here.

* 🔧 Assume default for `config.action_mailer.deliver_later_queue_name`

We're not using `ActionMailer::MessageDelivery #deliver_later` anywhere,
so the default is safe to assume.

* 🔧 Assume default for `config.action_view.preload_links_header`

This flag can be safely uncommented. Browsers that support Link
headers will get a performance boost. Browsers that don’t will
ignore them.

We override in `development` environments to avoid an edge case
leading to an HTTP response header overflow.

For more background, see
https://lilyreile.medium.com/rails-6-1-new-framework-defaults-what-they-do-and-how-to-safely-uncomment-them-c546b70f0c5e#3679

* 🔥 Remove 'new_framework_defaults_6_1.rb'

* 🔧 Load defaults for Rails 6.1

* ♻️ Extract constant

* ♻️ Migrate to new Rails deprecation config where applicable

* ♻️ Push members down now that there is only one subclass

* 🩹 Add forgotten disallowed deprecation warning

This deprecation warning was addressed by the following
PR, but we forgot to add it to the list of disallowed
deprecation warnings:

#21614

* 💡 Update comment

Task `rake routes` has been replaced with `rails routes`

* ✅ Update test to account for change to `ActionDispatch::Response#content_type` 

`ActionDispatch::Response#content_type` now returns the full Content-Type header

* 🚨 Exclude 'config.ru' from Rubocop cops

* 🚚 Move 'db/etl/migrate' to 'db/etl_migrate'

* 🚚 Move 'db/etl/schema.rb' to 'db/etl_schema.rb'

* ♻️ Arrange 'database.yml' configs by environment

Group DB configs by environment in anticipation of
reformatting for Rails 6+ multi-DB configuration.

* 🔧 Reformat 'database.yml' to Rails 6+ multi-DB conventions

* 🔧 Add etl migration paths to DB config

* 🔧 Update DB connection names in 'database_cleaner' config

* ♻️ Use new database-specific rake tasks

After migrating to the Rails 6+ native multi-database configuration,
the behavior of some DB management tasks, such as `rake db:migrate`
changed such that they now act on ALL databases and not just the
primary database. So we must replace the invocations of these
tasks with their new, database-specific counterparts.

* ➖ Remove 'multiverse' gem

Now that we have fiully transitioned to Rails-native
multi-database support, we are no longer reliant on
the 'multiverse' gem and can remove it.

* 🗃️ Prohibit execution of vacols DB and non-DB-specific rake tasks

After transitioning to Rails-native multi-DB support,
the behavior of some DB tasks changed such that they will now
act on ALL databases and not just the primary database
(ex. `rake db:migrate` will now migrate ALL databases).

To avoid accidents, we re-define these tasks here to no-op
and output a helpful message to redirect developers toward
using their new database-specific counterparts instead.

* ♻️ Create new environment for GH workflow 'Make-docs-to-webpage'

Instead of performing a bunch of hard-to-maintain `sed` gymnastics
to modify the existing 'test' environment, let's create a new
'make_docs' environment (based off of 'test') and configure it
appropriately for use by the 'Make-docs-to-webpage' GH workflow.

* 💚 Remove redundant DB migrations from CI workflow

Task `db:schema:load` already loads the checked in schema,
so there should be no need to run `db:migrate` afterwards.

* 🐛 Fix `spec/mailers/hearing_mailer_spec.rb` - `NoMethodError`

Addresses the following error:

  NoMethodError: undefined method `build_lookup_context' for ActionView::Base:Class

* 🐛 Fix `spec/workflows/post_decision_motion_updater_spec.rb` - `FrozenError`

Addresses the following error:

  FrozenError: can't modify frozen Hash: {}

* ✅ Add test for `RoSchedulePeriod`

* 🐛 Fix `spec/models/schedule_period_spec.rb` - `ActiveRecord::RecordInvalid`

Apparently, there were some changes to the inner workings of
`ActiveModel::Errors` in Rails 6.1, causing a model to be
considered invalid in the case that `errors[:base] == [[]]`.
This makes sense, as `[[]]` is not considered "empty".

Unfortunately, this was causing `RoSchedulePeriod #validate_spreadsheet`
to inadvertently mark the model as invalid upon creation.
`HearingSchedule::ValidateRoSpreadsheet #validate` returns an
empty array (`[]`) when valid, which gets pushes onto the
`RoSchedulePeriod` `errors[:base]` array, resulting in a
non-empty array (`[[]]`) and an erroneously invalid disposition.

Furthermore, calling `<<` to an `ActiveModel::Errors` message array
in order to add an error is a deprecated, so we can take this
opportunity to use the new `#add` API to hit two birds with one stone.

The change implemented here is not a pure refactoring, however the
end-user experience is unchanged in terms of how errors are presented
when attempting to upload a spreadsheet with multiple non-conformities.

Down the road, we may want to consider moving
`HearingSchedule::ValidateRoSpreadsheet` toward using
`ActiveModel::Validations` in order to leverage the
full `ActiveModel::Errors` API and construct the
errors object in the prescribed manner.

For more details see
- https://api.rubyonrails.org/v6.1.7.7/classes/ActiveModel/Validations.html
- https://api.rubyonrails.org/v6.1.7.7/classes/ActiveModel/Errors.html

* 🐛 Fix `spec/mailers/hearing_mailer_spec.rb` - `ActionView::Template::Error`

* ✅ Fix `spec/models/veteran_spec.rb`

* ✅ Fix `spec/sql/ama_cases_sql_spec.rb`

Addresses failures such as the below:

  0) AMA Cases Tableau data source expected report calculates age and AOD based on person.dob
     Failure/Error: expect(aod_case["aod_veteran.age"]).to eq("76")

       expected: "76"
            got: 0.76e2

* ✅ Fix multiple specs - `Minitest::UnexpectedError`

Test helper method `#perform_enqueued_jobs` now wraps exceptions
in an `Minitest::UnexpectedError`:

https://github.com/rails/rails/blob/914caca2d31bd753f47f9168f2a375921d9e91cc/activejob/lib/active_job/test_helper.rb#L591

So, to assert that a specific
exception is raised during execution of the `#perform_enqueued_jobs`
block, we must rescue the `Minitest::UnexpectedError` and make the
assertion on its error message instead.

* ✅ Fix `spec/lib/helpers/association_wrapper_spec.rb`

* ✅ Fix `spec/controllers/api/v1/jobs_controller_spec.rb`

In Rails 6.1, `ActiveJob #perform_now` was changed to
behave as it did once before (at the behest of GitHub),
returning the value fo the job instead of true/false.

See related GH issue: rails/rails#38040

* 🐛 Fix `spec/controllers/appeals_controller_spec.rb` - `NoMethodError`

Addresses error:

  NoMethodError: undefined method `workflow' for #<CaseSearchResultsForVeteranFileNumber:0x00007f9a030966c8>

  0) AppealsController GET appeals when current user is a System Admin when request header does not contain Veteran ID responds with an error
     Failure/Error: errors: errors.messages[:workflow],

     NoMethodError:
       undefined method `workflow' for #<CaseSearchResultsForVeteranFileNumber:0x00007f9a030966c8>
     # ./app/workflows/case_search_results_base.rb:31:in `search_call'

* 🐛 Fix `CaseSearchResultsBase` validations

Addresses test failures in `spec/controllers/appeals_controller_spec.rb`
similar to the below:

  AppealsController GET appeals when current user is a System Admin when request header does not contain Veteran ID responds with an error
     Failure/Error: expect(response_body["errors"][0]["title"]).to eq "Veteran file number missing"

       expected: "Veteran file number missing"
            got: nil

Using `ActiveModel::Errors` to store error data in an arbitrary format may have been
somewhat permissible in the past, but it is an abuse of the object's intended use and is
also proving incompatible with the more formalized `ActiveModels::Errors` API in Rails 6.1.

In order to preserve the existing response shape of the affected JSON endpoints,
we need to move away from the `ActiveModel::Validations` implementation on `CaseSearchResultsBase`
(and its descendent classes) to a more bespoke method of performing validations and aggregating
errors, since Rails 6.1 `ActiveModel::Errors` is no longer appropriate for  our needs here.

* ✅ Fix `spec/controllers/application_controller_spec.rb` -- Cache-Control error

Addresses the test failure below:

    ApplicationController no cache headers when toggle set sets Cache-Control etc
     Failure/Error: expect(response.headers["Cache-Control"]).to eq "no-cache, no-store"

       expected: "no-cache, no-store"
            got: "no-store"

       (compared using ==)
     # ./spec/controllers/application_controller_spec.rb:59:in `block (4 levels) in <top (required)>'

In Rails 6.1, the `no-store` directive is exclusive of any others
that are set on the `Cache-Control` header, which makes sense given
the specification https://datatracker.ietf.org/doc/html/rfc7234#section-3

This change was implemented in PR rails/rails#39461

Since it no longer makese sense to set both `no-store` and `no-cache` directives,
we will only set `no-store` here, as that is the stronger of the two.

* 🐛 Fix multiple specs - `ActiveRecord::EagerLoadPolymorphicError`

Addresses multiple test failures caused by the error below:

  QueueConfig.to_hash title when assigned to an org is formatted as expected
     Failure/Error:
       tasks.with_assignees.group("assignees.display_name").count(:all).each_pair.map do |option, count|
         label = self.class.format_option_label(option, count)
         self.class.filter_option_hash(option, label)
       end

     ActiveRecord::EagerLoadPolymorphicError:
       Cannot eagerly load the polymorphic association :appeal
     # ./app/models/queue_column.rb:110:in `assignee_options'

* 🐛 Fix `spec/models/task_spec.rb` - `update_all` clears query cache

In Rails 6.1.7.7, the method `ActiveRecord::Relation #update_all`
will now clear any records cached by the calling relation.

This was altering the behavior of `Task #cancel_task_and_child_subtasks`
and causing the following test failure:

  Task#cancel_task_and_child_subtasks cancels all tasks and child subtasks
     Failure/Error: expect(second_level_tasks[0].versions.count).to eq(initial_versions + 2)

       expected: 3
            got: 2

       (compared using ==)
     # ./spec/models/task_spec.rb:368:in `block (3 levels) in <top (required)>'

To remedy, we will now cache the necessary Task records in an Array, which can
be used for generating PaperTrail versions both before and after the `update_all`.

* 🐛 Fix `spec/services/hearings/calendar_service_spec.rb` - template rendering error

Addresses the following test failure:

  Hearings::CalendarService.confirmation_calendar_invite returns appropriate iCalendar event
     Failure/Error: expect(ical_event.description).to eq(expected_description)

       expected: "You're scheduled for a virtual hearing with a Veterans Law Judge of the Board of Veterans' Appeals.\...to reschedule or cancel your virtual hearing, contact us by email at bvahearingteamhotline@va.gov\n"
            got: #<Icalendar::Values::Text("You're scheduled for a virtual hearing with a Veterans Law Judge of the Bo... reschedule or cancel your virtual hearing, contact us by email at bvahearingteamhotline@va.gov\n")>

* 🐛 Fix YAML syntax error caused by whitespace in ENV var

Address the following error, found during demo deployment:

  rake aborted!
  Cannot load database configuration:
  YAML syntax error occurred while parsing /caseflow/config/database.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Error: (<unknown>): could not find expected ':' while scanning a simple key at line 49 column 5

* ⬆️ Update `caseflow-commons` dependency to latest ref

Removes `bourbon` and `neat` dependencies.

* APPEALS-57351 Inactive Appeal Errors present when outcoding an appeal (#22721)

* APPEALS-57351 add template name check to handle errors

* APPEALS-57351 Add template_name argument to spec tests

* Update app/models/prepend/va_notify/appellant_notification.rb

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

* APPEALS-57351 Partial rspec updates, pushed before handing off

* APPEALS-57351 Add specs requested during review

* Update spec/controllers/idt/api/v2/appeals_controller_spec.rb

---------

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

* feature/APPEALS-50882 - Open Telemetry configuration and implementation (#22787)

* feature/appeals-45972 (#21950)

* Remove UUID from attrs sent_to metrics. (#21630)

* Remove UUID from attrs sent_to metrics.

* pushing with some linting issues for visibility.

* Change config implementation.

* Remove UUID from spec

* remove uuid from update_appellant job

* diable rubocop for open_telemetry init

* OTEL fixes

* rescue, errors

---------

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

* add otel reqs

* Remove throw

* comment out otel file loop

* try vendor suggested config

* update otel config to match vendor

* update pg gem

* otel include dt_host file

* otel require bundler and rubygems

* otel subset of instrumentation

* Revert "update pg gem"

This reverts commit fc1a45d.

* update redis and minimize otel instrumentation to just rails, rack, and activerecord

* otel add use_all except pg and redis

* otel require instruments

* otel fix typo

* otel fix typo

* otel comment out net_http

* otel silence aws sdk internals

* otel silence aws sdk internals

* otel add net http

* Individually use OTEL instruments (#22082)

* Individually use OTEL instruments
with options.

* disable AwsSdk only. Checking Rack options.

* re-require awssdk even while disabled.

* disable awssdk

* disable datadog for testing

* change sequence factory to properly seed

* updated opentelemetry and datadog configs

* rack context getter initalizer

* use one at a time

* add curly braces

* Revert change

* revert change

* Revert change

* Revert change

* Remove gemfile grouping

* Remove datadog.

* ActionPack and Actionview changes

* APPEALS-44287: Excluding disposition held and select that appeal for distribution  (#22277)

* first run at an SQL query removing duplicate appeals from distribution

* code refactor and excluding disposition held and select that appeal for distribution

* automated test for the duplicate hearing bug

* fix rubocop offense SpaceInsideBlockBraces

---------

Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: samasudhirreddy <sudhirreddy.sama@va.gov>

---------

Co-authored-by: Noelle Adkin <98478937+NoelleAd@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>
Co-authored-by: Dani <danielle.coleman1@va.gov>
Co-authored-by: raymond-hughes <raymond.hughes2@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: samasudhirreddy <sudhirreddy.sama@va.gov>

* Update bundler to 2.4.22

* Updating OTEL to use all and remove new relic gem

* Remove calls to new relic

* removed id attrs in metrics service calls that were causing dimension errors

* Update config for otel

* Reorder gems to fix linting issues

* Updating config and refactoring verbose gems to add all

* Reinstall gems

* Adding all instruments

* Update config to only include basic instruments

* Update Gemfile.lock

* Adding rake to gemfile

* Adding instruments

* Comment out PG and ActiveSupport

* Suppress AWS logs

* Remove redis and turn on actionview

* Turn actionview off

* Add Redis instrumentation back

* Turn ActionPack back on

* Disable Redis

* Remove mentions of Datadog

* Removed extra mentions of Datadog

* removed newrelic references and yml file

* Test updating workflow

* Revert workflow change

* Adding simplecov back

* Fixing linting error

* Removing by: attribute after removing keyword in metric service

* Adding simplecov lcov gem and updating workflow

* Update workflow

* Updating simplecov

* Revert simple cov

* Adding featureenvy skip for reek

* Update service name. (#22762)

---------

Co-authored-by: mikefinneran <110622959+mikefinneran@users.noreply.github.com>
Co-authored-by: Noelle Adkin <98478937+NoelleAd@users.noreply.github.com>
Co-authored-by: Dani <danielle.coleman1@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: samasudhirreddy <sudhirreddy.sama@va.gov>
Co-authored-by: Andrew Hadley <hadley_andrew@bah.com>
Co-authored-by: alex-guanipatin <alex.guanipatin@va.gov>
Co-authored-by: Drew Hadley <50673809+VandelayUtd@users.noreply.github.com>

* Remove unused variable with lint error. Re-introduce cert fixes

* Remove references to x86

* Revert "Remove references to x86"

This reverts commit fda290d.

---------

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: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: seanrpa <155660052+seanrpa@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Craig Reese <Reese_Craig@bah.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@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: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>
Co-authored-by: mikefinneran <110622959+mikefinneran@users.noreply.github.com>
Co-authored-by: Noelle Adkin <98478937+NoelleAd@users.noreply.github.com>
Co-authored-by: Dani <danielle.coleman1@va.gov>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: samasudhirreddy <sudhirreddy.sama@va.gov>
Co-authored-by: Andrew Hadley <hadley_andrew@bah.com>
Co-authored-by: alex-guanipatin <alex.guanipatin@va.gov>
Co-authored-by: Drew Hadley <50673809+VandelayUtd@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants