Skip to content

Commit

Permalink
Feature/appeals 59217.uat fy25 q1.1.0 (#23185)
Browse files Browse the repository at this point in the history
* Ricky/appeals-43523 (#21345)

* Added Assignment Queue link to Switch Users test page

* Updated controller to validate role and redirect

* Updated error information

* Updated rspec tests

* Ricky/appeals 43965 (#21431)

* Added Download Ineligible Judge List

* APPEALS-43116 add sentry error capture to push priority job and updated specs (#21369)

* Updated query to include css_id and updated id fetch

* Updates button styling, fixed csv to have all values but judge name

* Updated id to sattyid values, and added name data to column

* fixed linting error

* Updated logic to account for inactive users in both caseflow and vacols

* Updated button component and cleaned up code

* Updated handling of ids in situation where sattyid is unavailable in record

* Updated to have individual columns for caseflow id and satty id

---------

Co-authored-by: 631068 <rickybmanus@gmail.com>
Co-authored-by: kristeja <112115264+kristeja@users.noreply.github.com>

* mbeard/APPEALS-43118 (#21416)

* APPEALS-43116 add sentry error capture to push priority job and updated specs (#21369)

* init commit

* fixes linting issues

* capybara test init

* capybara test complete steps

* updates copy file with missing copy

* removes random changed files from push priority

* using different test methods find_field and find_button

* commented out test for now

* added the raven command back

* uncommented the frozen string literal comment to address the linting offense

---------

Co-authored-by: kristeja <112115264+kristeja@users.noreply.github.com>
Co-authored-by: 631966 <amy.detwiler@va.gov>

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* APPEALS-40574 updating the route to only be in demo, local, and test

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* APPEALS-40574 removed the yarn node line as suggested by the system team

* updates copy, styling, and rebases to new feature branch (#22892)

* APPEALS-53821. Fix the ACD test page (#22906)

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

* APPEALS-43987. Added button and functionality (#22940)

* APPEALS-43987. Added button and functionality

* Sharsha/appeals 43987.amybids (#22957)

* some working tests

* APPEALS-43987. fix the last jest failure

* APPEALS-43987. cleaup

---------

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

---------

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

* APPEALS-53821. Text fixes (#22974)

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

* address missed merge conflict

* APPEALS-58970 Fix text wrapping issue (#23012)

* APPEALS-58970 FIx text wrapping issue

* REmove test text

* Update snapshot

* FIx 508 issue

* Update snapshot

---------

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

* APPEALS-53821. Typo (#23050)

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

* Chrisbdetlef/appeals 58970 (#23071)

* APPEALS-58970 FIx text wrapping issue

* REmove test text

* Update snapshot

* FIx 508 issue

* Update snapshot

* Ensure label text passes all 508 compliance tools

* Update snapshot

---------

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

* mbeard/APPEALS-41138 (#22991)

* creates new button for seeding optional seeds, and initial copy for button and description

* adds timestamp and correct copy to success banner

* fixes merge issues and updates missing copy and case

* re-adds missing prop

* initial spec creation

* updates to test, copy, and function to dynamically grab count from api

* adds updates to the backend for dynamic appeal_count

* fixes front end breaking point and adds dynamic seed count to the backend for optional_seeds

* fixes scroll arrow issue, and updates capybara - still failing

* latest rspec updates and copy

* updates test from capybara to jest to test function only, turns on seeds

* Removed useless html prop

---------

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

* APPEALS-59247. fix the flicking test (#23066)

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

* APPEALS-43987. Sync the spacing with other button (#23069)

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: 631966 <amy.detwiler@va.gov>

* APPEALS-53821. revert changes from copy json (#23084)

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

* mbeard/APPEALS-41138 (#23086)

* creates new button for seeding optional seeds, and initial copy for button and description

* adds timestamp and correct copy to success banner

* fixes merge issues and updates missing copy and case

* re-adds missing prop

* Merge `feature/APPEALS-41559` into `release/FY24Q4.6.1` (#23036)

* Start feature work tracking PR with a TODO comment

* Remove TODO comment for CodeClimate

* SeanC/APPEALS-42315 | Create separate Remand table, model and seed data (#22220)

* added migration file for adding type column to supplemental claims table

* created stub for remand model

* added type to supplemental claim factory and new remand trait

* added remand sc's to vha seeds

* updated migration name and fixed typo

* Changed migration to inherit from Caseflow::Mirgration

* schema changes

* reverting schema

* changed the setting of the type column

* fixed schema and renamed migration file

* fixed migration and schema

* updated the remands factory and seeds

* fixed comment in schema

---------

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

* TYLERB/APPEALS-42455: Display new and migrated Remands in Decision Review Queue tabs (#22206)

* Added support for remands to the business_line.rb model and the index.js util file that parses the decision review type filters for the decision review queue.

* Updated the business line spec file, the decision reviews controller spec tests, and the reviews spec feature test to support remands.

* Added a decision review polymorphic helper to DRY up some of the polymorphic appeal concerns.

* Overrode the remand model association to request issues so active record joins will work correctly.

* Added another helper for sti polymorphic relationships. Fixed filtering for STI decision review types for remands. Updated tests and added factories for testing.

* Code climate fixes and test fixes.

* Fixed more test failures. Removed the remand request issues relationship since it was incorrectly implemented. Added a scope to supplemental claims for remands. Fixed an issue where board grant effectuation tasks without request issues were missing from the new task type count method.

* Changed the UNION ALL to a UNION in the new task_type_count method to prevent duplicate row counts. Updated tests and fixed an issue where the board grant effectuation tasks were being counted for pending task queries.

* JHoang/APPEALS-42318 (#22270)

* some preliminary remand & sc model updates

* typo

* some preliminary hlr checks?

* undo seed change

* decision issue and sc updates

* attempt code climate fixes

* another code climate fix

* testing changes

* useless variable..

* fix conditional in decision issue

* fix undefined find_by method

* attempt rspec fix

* rspec fix attempt #2

* supplemental_claim_spec fix?

* remove comma

* code climate fix

* added comment for transparency on remand creation, attempt fix for remands route

* updated specs for decision_issue, hlr_spec, appeal_spec to account for remand creation type

* fix lint error

* fix lint error #2

---------

Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>

* APPEALS-42458 (#22365)

* disable edit issues link for remands

* add banners explaining that remands are not editable

also makes sure that remands are not editable on the edit issues page

* TYLERB/APPEALS-44922: Update Generate task report page UI to include Remand in conditions (#22356)

* Initial commit. Changed the DecisionReviewType condition filter to a searchable dropdown and added the remands option to it as well. Updated the report page filter parsing to work with the searchable dropdown instead of checkboxes for the decision review type condition filter.

* Updated the ReportPage jest test and the report page feature test to work with the decision review type filter as a searchable dropdown instead of checkboxes.

* SeanC/APPEALS-42317 | Migrate existing Supplemental Claim Remands to Remand records via script (#22359)

* initial verison of update script

* remanded migration file

* updated sc spec with type

* schema

* fixed a few issues in the migration

* small fix to migration file

* moved the type column check into a seperate it block

* fixed wrong column in migration file

* created a new migration for creating the view

* updated the backfill migration file

---------

Co-authored-by: Brandon Lee Dorner <Brandondorner@yahoo.com>

* J hoang/appeals 44940 (#22428)

* initial

* some factory and spec updates

* change history query update and spec fixes

* code climate/lint fix

* change @claim_type identifier

* fix claim_history_event_spec.rb

* test coverage for change history with Remand claim type

* spec lint fixes

* refactor claim_type filtering to account for remand subtype

* business_line_spec fix

* decision_reviews_controller_spec update for remand claim type

* lint fixes for decision_reviews_controller_spec.rb

* comment updates in business_line.rb

* renamed mock data in change_history_reporter_spec

* trigger GA

* refactor claim type filter for less conditional handling

* business line spec fix

---------

Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>

* Initial commit for the brakeman sql injection warning fixes. (#22598)

* Updated the business line reporter class to properly display Remands as a seperate type than SupplementalClaims. Also added additional testing logic for the business line reporter for hlr and scs since it was only covering appeals. (#22664)

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

* Fixed a bug where the frontend would error due to calling .toLowerCase() on a null or undefined value which could happen sometimes if the api filter options are in an incorrect state. (#22796)

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

* Updated the remand migration files to work with the rails 6 upgrade and the changes to Caseflow::Migration. (#22825)

* added fix for failing test in decision_reviews_controller_spec (#22829)

---------

Co-authored-by: Robert Travis Pierce <Pierce_Robert@ne.bah.com>
Co-authored-by: Sean Craig <110493538+seancva@users.noreply.github.com>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>
Co-authored-by: jonathanh-va <111081469+jonathanh-va@users.noreply.github.com>
Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>
Co-authored-by: Brandon Lee Dorner <Brandondorner@yahoo.com>
Co-authored-by: Clay Sheppard <csheepy@gmail.com>

* APPEALS-50679 | Reassign Cases To Camo Change History (#23038)

* Start feature work tracking PR with a TODO comment

* Remove TODO comment for CodeClimate

* SeanC/APPEALS-42315 | Create separate Remand table, model and seed data (#22220)

* added migration file for adding type column to supplemental claims table

* created stub for remand model

* added type to supplemental claim factory and new remand trait

* added remand sc's to vha seeds

* updated migration name and fixed typo

* Changed migration to inherit from Caseflow::Mirgration

* schema changes

* reverting schema

* changed the setting of the type column

* fixed schema and renamed migration file

* fixed migration and schema

* updated the remands factory and seeds

* fixed comment in schema

---------

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

* TYLERB/APPEALS-42455: Display new and migrated Remands in Decision Review Queue tabs (#22206)

* Added support for remands to the business_line.rb model and the index.js util file that parses the decision review type filters for the decision review queue.

* Updated the business line spec file, the decision reviews controller spec tests, and the reviews spec feature test to support remands.

* Added a decision review polymorphic helper to DRY up some of the polymorphic appeal concerns.

* Overrode the remand model association to request issues so active record joins will work correctly.

* Added another helper for sti polymorphic relationships. Fixed filtering for STI decision review types for remands. Updated tests and added factories for testing.

* Code climate fixes and test fixes.

* Fixed more test failures. Removed the remand request issues relationship since it was incorrectly implemented. Added a scope to supplemental claims for remands. Fixed an issue where board grant effectuation tasks without request issues were missing from the new task type count method.

* Changed the UNION ALL to a UNION in the new task_type_count method to prevent duplicate row counts. Updated tests and fixed an issue where the board grant effectuation tasks were being counted for pending task queries.

* JHoang/APPEALS-42318 (#22270)

* some preliminary remand & sc model updates

* typo

* some preliminary hlr checks?

* undo seed change

* decision issue and sc updates

* attempt code climate fixes

* another code climate fix

* testing changes

* useless variable..

* fix conditional in decision issue

* fix undefined find_by method

* attempt rspec fix

* rspec fix attempt #2

* supplemental_claim_spec fix?

* remove comma

* code climate fix

* added comment for transparency on remand creation, attempt fix for remands route

* updated specs for decision_issue, hlr_spec, appeal_spec to account for remand creation type

* fix lint error

* fix lint error #2

---------

Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>

* APPEALS-42458 (#22365)

* disable edit issues link for remands

* add banners explaining that remands are not editable

also makes sure that remands are not editable on the edit issues page

* TYLERB/APPEALS-44922: Update Generate task report page UI to include Remand in conditions (#22356)

* Initial commit. Changed the DecisionReviewType condition filter to a searchable dropdown and added the remands option to it as well. Updated the report page filter parsing to work with the searchable dropdown instead of checkboxes for the decision review type condition filter.

* Updated the ReportPage jest test and the report page feature test to work with the decision review type filter as a searchable dropdown instead of checkboxes.

* SeanC/APPEALS-42317 | Migrate existing Supplemental Claim Remands to Remand records via script (#22359)

* initial verison of update script

* remanded migration file

* updated sc spec with type

* schema

* fixed a few issues in the migration

* small fix to migration file

* moved the type column check into a seperate it block

* fixed wrong column in migration file

* created a new migration for creating the view

* updated the backfill migration file

---------

Co-authored-by: Brandon Lee Dorner <Brandondorner@yahoo.com>

* J hoang/appeals 44940 (#22428)

* initial

* some factory and spec updates

* change history query update and spec fixes

* code climate/lint fix

* change @claim_type identifier

* fix claim_history_event_spec.rb

* test coverage for change history with Remand claim type

* spec lint fixes

* refactor claim_type filtering to account for remand subtype

* business_line_spec fix

* decision_reviews_controller_spec update for remand claim type

* lint fixes for decision_reviews_controller_spec.rb

* comment updates in business_line.rb

* renamed mock data in change_history_reporter_spec

* trigger GA

* refactor claim type filter for less conditional handling

* business line spec fix

---------

Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>

* Initial commit for the brakeman sql injection warning fixes. (#22598)

* Updated the business line reporter class to properly display Remands as a seperate type than SupplementalClaims. Also added additional testing logic for the business line reporter for hlr and scs since it was only covering appeals. (#22664)

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

* Fixed a bug where the frontend would error due to calling .toLowerCase() on a null or undefined value which could happen sometimes if the api filter options are in an incorrect state. (#22796)

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

* Updated the remand migration files to work with the rails 6 upgrade and the changes to Caseflow::Migration. (#22825)

* added fix for failing test in decision_reviews_controller_spec (#22829)

* Al/APPEALS-45335 (#22228)

* added additional option to check box list

* fixed some tests and code clean up

* fixed more tests

* fixed jest tests

* changes per Pr feedback

* added custom error display

* fixed style for error message

---------

Co-authored-by: Sean Craig <sean.craig2@va.gov>

* adding logic to bring in issue-modification request and updating the … (#22238)

* adding logic to bring in issue-modification request and updating the csv logic

* refactor logic to get pending status and null to request addition

* pending status filter work fixing

* adding withdrawal date and adding logic to display request issue components

* getting edit of request rows and fixing cancelled data

* fixing linter and fixing the query to make test happy

* fixing specs failures

* removing byebug

* removing frontend changes, adding test, fixing the query to replace higherlevel review,adding new field in serializer

* making code climate happy by doing some minor refactor

* fixing the serializer spec failure

* After merging APPEALS-45335, filter for Requested issues were broken, so refactored it and removed the unnecessary methood that i created

* fixing code climate and spec was failing because of hard coded date

* refactor the edit of request logic to take from version, refactored business line query to remove coalesce and fix test

* fixing codeclimate, remove unnecessary field

* refactor to make first comment appear first in edit of request

* fixing linter issue, spec and refactor to fix the bug

* fixing pending status filter issue and adding test for business line

* fixing broken spec failure

* adding user facilty

* fixing the lead and lag function to prevent entry of pending status multiple times

* fixing an issue in which in progress event was not being made

* adding decision reason that was missed and fixing the event logic one more time

* fixing the multiple issue modification request after decision has been made

* refactor inprogress logic for approved data

* fixing spec failure

* fixing the first version logic to be more simpler and fixing name and adding spec

* fixing more inprogess event

* removing the disabled complexity and taking out the boolean condition to a separate method

* Al/APPEALS-45334 Individual change history table which includes Reassign Cases to CAMO events (#22483)

* added logic for claim history events table

* fixed linting errors

* fixing test failures

* added change Pr feedback

* PR feedback round 2

* changes from round 2 of PR feedback

* Added logic event data versions and tests to cover more edgecases

* changed RequestedIssueFragment

* Updated the individual claim history spec file for test failures. Updated an attribute in the IndividualClaimHistory page that was using the wrong getter. Fixed a code climate linting error.

* Removing unnecessary clear filter

* Combined some of the individual claim history tests into one test so it will run more quickly.

* fixing the withdrawal date versioning issue for different level changes

* fixing the spec failure and linter

---------

Co-authored-by: Brandon Lee Dorner <Brandondorner@yahoo.com>
Co-authored-by: = <tyler.broyles@va.gov>
Co-authored-by: Prajwal Amatya <pamatya@take2it.com>

* TYLERB/APPEALS-57367: change-history-updates (#22479)

* Initial commit with new tests cases for issue modification requests for change history.

* Added two cte queries to the business line change history query to properly work with a lead for the issue modification requests. Added new methods into the claim history event to work with this new lead and modified the existing issue modification in progress and pending event generation methods to better reflect the state of a claim that is going through the issue modficiation process.

* Cleaned up unused code and todos.

* Updated the claim history event create_imr_in_progress_status_event? with even more logic and edge cases.

* Fixed a possible error when with a greater than operator could be used on a null value.

* Fixed a few rspec tests.

* Renamed a method and fixed a few code climate issues.

* Fixed a bug in event status generation if there is a task with versions but no versions that change status.

* Updated tests to work with new logic and remove a todo statement.

* Fixed code complexity warnings.

* Updated serializer spec to work with the bug fix.

* Adjusted the pending method to prevent possible race conditions.

* Fixed a bug where the incorrect decision event user would be shown for an issue modification request creation if the request has been decided when it should be the requestor as the event user.

* Added the correct css ids to a few IMR change history events so that the filtering would work correctly. Also added some additional sql to properly filter based on css id and station id for requestor and decider joins.

* Updated the IMR business line logic so that the decided at fields would always account for cancelled status since it uses updated at instead of decided at to determine when the IMR was closed. Fixed a bit of logic in the claim history event IMR in progress event generation to work another edge case.

* Added in previous IMR edit versions for displaying it to the user.

* Added a test for the change history service class to verify that request edit events have the correct attributes from the previous edits.

* Fixed a typo for one of the table aliases in the business line query.

* Fixed another typo where the facilities filter was using css id instead of station id from a copy/paste error.

* adding changes for previous state array and some test modification

* adding test for previous data

* Fixed some outstanding test failures.

* Fixed a linting error. Removed some duplicated code that happened when merging in the feature branch. Updated a factorybot method that was causing tests to fail.

* Fixed a few code climate warnings.

* Removed some puts statements in the individual claim history feature test.

---------

Co-authored-by: Prajwal Amatya <pamatya@take2it.com>

* TYLERB/APPEALS-58656: Change History CSV and Version Parsing fix (#22874)

* Fixed a modification request claim history in progress event generation bug that could occur when 3-4 pending requests were all created at the same time and then later cancelled at the same time. Also fixed an issue count bug used when building the issue type filter due to additional duplicate rows being inserted into issue type count query due to the left join to the issue modification requests table.

* Altered the version parsing for change history to work with commas in the version strings since that was causing parsing errors. Altered the business line query to use '|||' as a delimeter instead of comma and also changed the array_agg functions to string agg to avoid the '{}' array type casting that was happening between postgres and rails. Updated tests to work with this new parsing.

* Updated vha seed data to have associations to intake data so those seeded claims can correctly generate change history.

* TYLERB/CHANGE-HISTORY-YAML-QUOTE-FIX (#22910)

* Made an update to the claim history parse versions method to work with double quotations after the array_agg to string_agg change.

* Updated the tests to work with the new string agg and version parsing method.

* Skip flakey tests

These are possibly flakey now due to the rails upgrade. We can come
back and fix these once the work has been confirmed in UAT.

* Add rubocop disables for line length

These should be removed when the skips are removed.

* Updated the report_page feature test to reduce flakyness in github actions. Also updated the DownloadHelpers module.

---------

Co-authored-by: Brandon Dorner <brandonleedorner@gmail.com>

---------

Co-authored-by: Robert Travis Pierce <Pierce_Robert@ne.bah.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Sean Craig <110493538+seancva@users.noreply.github.com>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>
Co-authored-by: jonathanh-va <111081469+jonathanh-va@users.noreply.github.com>
Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>
Co-authored-by: Clay Sheppard <csheepy@gmail.com>
Co-authored-by: almorbah <149511814+almorbah@users.noreply.github.com>
Co-authored-by: Sean Craig <sean.craig2@va.gov>
Co-authored-by: Prajwal Amatya <122557351+pamatyatake2@users.noreply.github.com>
Co-authored-by: = <tyler.broyles@va.gov>
Co-authored-by: Prajwal Amatya <pamatya@take2it.com>

* initial spec creation

* APPEALS-54874: Update PG and Ruby-oci8 gems (#23041)

* update minimum version in gemfile and ran bundle install (#22503)

* require ruby-oci8 in config/boot.rb to fix SIGV fault

* APPEALS-59294: Hearings seed file is creating DistributionTasks for legacy appeals (#23042)

* set parent task for legacy appeal hearing tasks to root task

* fix whitespace issue

* updates to test, copy, and function to dynamically grab count from api

* APPEALS-36292: Conditionally render banner alerts based on which environment it is deployed on (#23040)

* Conditionally render alerts based on which environment is deployed

* setting Env alert banner sitewide

* separate colors for different envs using the same alert type

* lighter reds for prodtest alert so the text is more readable

* give demo banner more contrast

* adjust specific language for demo env

* adjust logic to accept proper env var. Add style for preprod (yellow)

* isolate env alert styles

* remove duplicate 'demo' Alert

* remove development env banner to fix tests

* making conditional logic a little more bulletproof against 'production'

* update CaseWorkerIndex snapshot

* fix env var

* update snapshot from hard 'uat' setting

* conditionally render env alert on only the home page

* sticky env header statuses

* getting development alert banners to work

* target correct frontend dependency for NavigationBar changes

* connecting new frontend package with better prod exclusion logic

* make the prodtest env badge a more readable color

* cleaning up testing code

* fix linting issues

* Remove unnecessary space

* new NavigationBar update

* yarn install of new FE dependency

* remove extra package.json

* remove development env logic due to NODE_ENV bug

* fixing broken logo link padding and colors

* hardening logic to exclude other inputs

* correcting operator logic

* remove testing var

* point caseflow-frontend to master

* point at most recent caseflow-frontend master

* linting issues fix

* update Route and CaseWorker snapshot

* update snapshot for process.env.DEPLOY_ENV

---------

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

* adds updates to the backend for dynamic appeal_count

* Master to Main documentation changes (#23034)

* Update WINDOWS_11.md replacing master with main

* References to master are changed to main where applicable

* Hotfix/appeals 37269  (#23039)

* adds script and tests for the script

* adjust the way scheduled_for is created since the previous method was removed

* refactor some of the script

* rename test file to include _spec

* Empty-Commit

---------

Co-authored-by: Zackary Borges-Rowe <borges-rowe_zackary@bah.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* fixes front end breaking point and adds dynamic seed count to the backend for optional_seeds

* fixes scroll arrow issue, and updates capybara - still failing

* latest rspec updates and copy

* Revert "Release R2.6.0 FY24Q4.6.0"

* updates test from capybara to jest to test function only, turns on seeds

* Removed useless html prop

* adds last two fixes that didn't make the merge

* adds missing proptypes to ResetButton.jsx and updates quotes in affinitydays to fix linting

* adds text to the right of teh case distro dashboard link

---------

Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Robert Travis Pierce <Pierce_Robert@ne.bah.com>
Co-authored-by: Sean Craig <110493538+seancva@users.noreply.github.com>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>
Co-authored-by: jonathanh-va <111081469+jonathanh-va@users.noreply.github.com>
Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>
Co-authored-by: Brandon Lee Dorner <Brandondorner@yahoo.com>
Co-authored-by: Clay Sheppard <csheepy@gmail.com>
Co-authored-by: almorbah <149511814+almorbah@users.noreply.github.com>
Co-authored-by: Sean Craig <sean.craig2@va.gov>
Co-authored-by: Prajwal Amatya <122557351+pamatyatake2@users.noreply.github.com>
Co-authored-by: = <tyler.broyles@va.gov>
Co-authored-by: Prajwal Amatya <pamatya@take2it.com>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>
Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
Co-authored-by: Zackary Borges-Rowe <borges-rowe_zackary@bah.com>
Co-authored-by: 631068 <rickybmanus@gmail.com>

* APPEALS-58868 add new optional fields to download template csv file (#22978)

* APPEALS-58868 add new optional fields to download template csv file

* APPEALS-58868 add back end logic for optional fields

* APPEALS-58868 added specs

* update specs

---------

Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>

* Sharsha/merge main feature appeals 59217 (#23172)

* Merge `feature/APPEALS-41559` into `release/FY24Q4.6.1` (#23036)

* Start feature work tracking PR with a TODO comment

* Remove TODO comment for CodeClimate

* SeanC/APPEALS-42315 | Create separate Remand table, model and seed data (#22220)

* added migration file for adding type column to supplemental claims table

* created stub for remand model

* added type to supplemental claim factory and new remand trait

* added remand sc's to vha seeds

* updated migration name and fixed typo

* Changed migration to inherit from Caseflow::Mirgration

* schema changes

* reverting schema

* changed the setting of the type column

* fixed schema and renamed migration file

* fixed migration and schema

* updated the remands factory and seeds

* fixed comment in schema

---------

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

* TYLERB/APPEALS-42455: Display new and migrated Remands in Decision Review Queue tabs (#22206)

* Added support for remands to the business_line.rb model and the index.js util file that parses the decision review type filters for the decision review queue.

* Updated the business line spec file, the decision reviews controller spec tests, and the reviews spec feature test to support remands.

* Added a decision review polymorphic helper to DRY up some of the polymorphic appeal concerns.

* Overrode the remand model association to request issues so active record joins will work correctly.

* Added another helper for sti polymorphic relationships. Fixed filtering for STI decision review types for remands. Updated tests and added factories for testing.

* Code climate fixes and test fixes.

* Fixed more test failures. Removed the remand request issues relationship since it was incorrectly implemented. Added a scope to supplemental claims for remands. Fixed an issue where board grant effectuation tasks without request issues were missing from the new task type count method.

* Changed the UNION ALL to a UNION in the new task_type_count method to prevent duplicate row counts. Updated tests and fixed an issue where the board grant effectuation tasks were being counted for pending task queries.

* JHoang/APPEALS-42318 (#22270)

* some preliminary remand & sc model updates

* typo

* some preliminary hlr checks?

* undo seed change

* decision issue and sc updates

* attempt code climate fixes

* another code climate fix

* testing changes

* useless variable..

* fix conditional in decision issue

* fix undefined find_by method

* attempt rspec fix

* rspec fix attempt #2

* supplemental_claim_spec fix?

* remove comma

* code climate fix

* added comment for transparency on remand creation, attempt fix for remands route

* updated specs for decision_issue, hlr_spec, appeal_spec to account for remand creation type

* fix lint error

* fix lint error #2

---------

Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>

* APPEALS-42458 (#22365)

* disable edit issues link for remands

* add banners explaining that remands are not editable

also makes sure that remands are not editable on the edit issues page

* TYLERB/APPEALS-44922: Update Generate task report page UI to include Remand in conditions (#22356)

* Initial commit. Changed the DecisionReviewType condition filter to a searchable dropdown and added the remands option to it as well. Updated the report page filter parsing to work with the searchable dropdown instead of checkboxes for the decision review type condition filter.

* Updated the ReportPage jest test and the report page feature test to work with the decision review type filter as a searchable dropdown instead of checkboxes.

* SeanC/APPEALS-42317 | Migrate existing Supplemental Claim Remands to Remand records via script (#22359)

* initial verison of update script

* remanded migration file

* updated sc spec with type

* schema

* fixed a few issues in the migration

* small fix to migration file

* moved the type column check into a seperate it block

* fixed wrong column in migration file

* created a new migration for creating the view

* updated the backfill migration file

---------

Co-authored-by: Brandon Lee Dorner <Brandondorner@yahoo.com>

* J hoang/appeals 44940 (#22428)

* initial

* some factory and spec updates

* change history query update and spec fixes

* code climate/lint fix

* change @claim_type identifier

* fix claim_history_event_spec.rb

* test coverage for change history with Remand claim type

* spec lint fixes

* refactor claim_type filtering to account for remand subtype

* business_line_spec fix

* decision_reviews_controller_spec update for remand claim type

* lint fixes for decision_reviews_controller_spec.rb

* comment updates in business_line.rb

* renamed mock data in change_history_reporter_spec

* trigger GA

* refactor claim type filter for less conditional handling

* business line spec fix

---------

Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>

* Initial commit for the brakeman sql injection warning fixes. (#22598)

* Updated the business line reporter class to properly display Remands as a seperate type than SupplementalClaims. Also added additional testing logic for the business line reporter for hlr and scs since it was only covering appeals. (#22664)

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

* Fixed a bug where the frontend would error due to calling .toLowerCase() on a null or undefined value which could happen sometimes if the api filter options are in an incorrect state. (#22796)

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

* Updated the remand migration files to work with the rails 6 upgrade and the changes to Caseflow::Migration. (#22825)

* added fix for failing test in decision_reviews_controller_spec (#22829)

---------

Co-authored-by: Robert Travis Pierce <Pierce_Robert@ne.bah.com>
Co-authored-by: Sean Craig <110493538+seancva@users.noreply.github.com>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>
Co-authored-by: jonathanh-va <111081469+jonathanh-va@users.noreply.github.com>
Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>
Co-authored-by: Brandon Lee Dorner <Brandondorner@yahoo.com>
Co-authored-by: Clay Sheppard <csheepy@gmail.com>

* APPEALS-50679 | Reassign Cases To Camo Change History (#23038)

* Start feature work tracking PR with a TODO comment

* Remove TODO comment for CodeClimate

* SeanC/APPEALS-42315 | Create separate Remand table, model and seed data (#22220)

* added migration file for adding type column to supplemental claims table

* created stub for remand model

* added type to supplemental claim factory and new remand trait

* added remand sc's to vha seeds

* updated migration name and fixed typo

* Changed migration to inherit from Caseflow::Mirgration

* schema changes

* reverting schema

* changed the setting of the type column

* fixed schema and renamed migration file

* fixed migration and schema

* updated the remands factory and seeds

* fixed comment in schema

---------

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

* TYLERB/APPEALS-42455: Display new and migrated Remands in Decision Review Queue tabs (#22206)

* Added support for remands to the business_line.rb model and the index.js util file that parses the decision review type filters for the decision review queue.

* Updated the business line spec file, the decision reviews controller spec tests, and the reviews spec feature test to support remands.

* Added a decision review polymorphic helper to DRY up some of the polymorphic appeal concerns.

* Overrode the remand model association to request issues so active record joins will work correctly.

* Added another helper for sti polymorphic relationships. Fixed filtering for STI decision review types for remands. Updated tests and added factories for testing.

* Code climate fixes and test fixes.

* Fixed more test failures. Removed the remand request issues relationship since it was incorrectly implemented. Added a scope to supplemental claims for remands. Fixed an issue where board grant effectuation tasks without request issues were missing from the new task type count method.

* Changed the UNION ALL to a UNION in the new task_type_count method to prevent duplicate row counts. Updated tests and fixed an issue where the board grant effectuation tasks were being counted for pending task queries.

* JHoang/APPEALS-42318 (#22270)

* some preliminary remand & sc model updates

* typo

* some preliminary hlr checks?

* undo seed change

* decision issue and sc updates

* attempt code climate fixes

* another code climate fix

* testing changes

* useless variable..

* fix conditional in decision issue

* fix undefined find_by method

* attempt rspec fix

* rspec fix attempt #2

* supplemental_claim_spec fix?

* remove comma

* code climate fix

* added comment for transparency on remand creation, attempt fix for remands route

* updated specs for decision_issue, hlr_spec, appeal_spec to account for remand creation type

* fix lint error

* fix lint error #2

---------

Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>

* APPEALS-42458 (#22365)

* disable edit issues link for remands

* add banners explaining that remands are not editable

also makes sure that remands are not editable on the edit issues page

* TYLERB/APPEALS-44922: Update Generate task report page UI to include Remand in conditions (#22356)

* Initial commit. Changed the DecisionReviewType condition filter to a searchable dropdown and added the remands option to it as well. Updated the report page filter parsing to work with the searchable dropdown instead of checkboxes for the decision review type condition filter.

* Updated the ReportPage jest test and the report page feature test to work with the decision review type filter as a searchable dropdown instead of checkboxes.

* SeanC/APPEALS-42317 | Migrate existing Supplemental Claim Remands to Remand records via script (#22359)

* initial verison of update script

* remanded migration file

* updated sc spec with type

* schema

* fixed a few issues in the migration

* small fix to migration file

* moved the type column check into a seperate it block

* fixed wrong column in migration file

* created a new migration for creating the view

* updated the backfill migration file

---------

Co-authored-by: Brandon Lee Dorner <Brandondorner@yahoo.com>

* J hoang/appeals 44940 (#22428)

* initial

* some factory and spec updates

* change history query update and spec fixes

* code climate/lint fix

* change @claim_type identifier

* fix claim_history_event_spec.rb

* test coverage for change history with Remand claim type

* spec lint fixes

* refactor claim_type filtering to account for remand subtype

* business_line_spec fix

* decision_reviews_controller_spec update for remand claim type

* lint fixes for decision_reviews_controller_spec.rb

* comment updates in business_line.rb

* renamed mock data in change_history_reporter_spec

* trigger GA

* refactor claim type filter for less conditional handling

* business line spec fix

---------

Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>

* Initial commit for the brakeman sql injection warning fixes. (#22598)

* Updated the business line reporter class to properly display Remands as a seperate type than SupplementalClaims. Also added additional testing logic for the business line reporter for hlr and scs since it was only covering appeals. (#22664)

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

* Fixed a bug where the frontend would error due to calling .toLowerCase() on a null or undefined value which could happen sometimes if the api filter options are in an incorrect state. (#22796)

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

* Updated the remand migration files to work with the rails 6 upgrade and the changes to Caseflow::Migration. (#22825)

* added fix for failing test in decision_reviews_controller_spec (#22829)

* Al/APPEALS-45335 (#22228)

* added additional option to check box list

* fixed some tests and code clean up

* fixed more tests

* fixed jest tests

* changes per Pr feedback

* added custom error display

* fixed style for error message

---------

Co-authored-by: Sean Craig <sean.craig2@va.gov>

* adding logic to bring in issue-modification request and updating the … (#22238)

* adding logic to bring in issue-modification request and updating the csv logic

* refactor logic to get pending status and null to request addition

* pending status filter work fixing

* adding withdrawal date and adding logic to display request issue components

* getting edit of request rows and fixing cancelled data

* fixing linter and fixing the query to make test happy

* fixing specs failures

* removing byebug

* removing frontend changes, adding test, fixing the query to replace higherlevel review,adding new field in serializer

* making code climate happy by doing some minor refactor

* fixing the serializer spec failure

* After merging APPEALS-45335, filter for Requested issues were broken, so refactored it and removed the unnecessary methood that i created

* fixing code climate and spec was failing because of hard coded date

* refactor the edit of request logic to take from version, refactored business line query to remove coalesce and fix test

* fixing codeclimate, remove unnecessary field

* refactor to make first comment appear first in edit of request

* fixing linter issue, spec and refactor to fix the bug

* fixing pending status filter issue and adding test for business line

* fixing broken spec failure

* adding user facilty

* fixing the lead and lag function to prevent entry of pending status multiple times

* fixing an issue in which in progress event was not being made

* adding decision reason that was missed and fixing the event logic one more time

* fixing the multiple issue modification request after decision has been made

* refactor inprogress logic for approved data

* fixing spec failure

* fixing the first version logic to be more simpler and fixing name and adding spec

* fixing more inprogess event

* removing the disabled complexity and taking out the boolean condition to a separate method

* Al/APPEALS-45334 Individual change history table which includes Reassign Cases to CAMO events (#22483)

* added logic for claim history events table

* fixed linting errors

* fixing test failures

* added change Pr feedback

* PR feedback round 2

* changes from round 2 of PR feedback

* Added logic event data versions and tests to cover more edgecases

* changed RequestedIssueFragment

* Updated the individual claim history spec file for test failures. Updated an attribute in the IndividualClaimHistory page that was using the wrong getter. Fixed a code climate linting error.

* Removing unnecessary clear filter

* Combined some of the individual claim history tests into one test so it will run more quickly.

* fixing the withdrawal date versioning issue for different level changes

* fixing the spec failure and linter

---------

Co-authored-by: Brandon Lee Dorner <Brandondorner@yahoo.com>
Co-authored-by: = <tyler.broyles@va.gov>
Co-authored-by: Prajwal Amatya <pamatya@take2it.com>

* TYLERB/APPEALS-57367: change-history-updates (#22479)

* Initial commit with new tests cases for issue modification requests for change history.

* Added two cte queries to the business line change history query to properly work with a lead for the issue modification requests. Added new methods into the claim history event to work with this new lead and modified the existing issue modification in progress and pending event generation methods to better reflect the state of a claim that is going through the issue modficiation process.

* Cleaned up unused code and todos.

* Updated the claim history event create_imr_in_progress_status_event? with even more logic and edge cases.

* Fixed a possible error when with a greater than operator could be used on a null value.

* Fixed a few rspec tests.

* Renamed a method and fixed a few code climate issues.

* Fixed a bug in event status generation if there is a task with versions but no versions that change status.

* Updated tests to work with new logic and remove a todo statement.

* Fixed code complexity warnings.

* Updated serializer spec to work with the bug fix.

* Adjusted the pending method to prevent possible race conditions.

* Fixed a bug where the incorrect decision event user would be shown for an issue modification request creation if the request has been decided when it should be the requestor as the event user.

* Added the correct css ids to a few IMR change history events so that the filtering would work correctly. Also added some additional sql to properly filter based on css id and station id for requestor and decider joins.

* Updated the IMR business line logic so that the decided at fields would always account for cancelled status since it uses updated at instead of decided at to determine when the IMR was closed. Fixed a bit of logic in the claim history event IMR in progress event generation to work another edge case.

* Added in previous IMR edit versions for displaying it to the user.

* Added a test for the change history service class to verify that request edit events have the correct attributes from the previous edits.

* Fixed a typo for one of the table aliases in the business line query.

* Fixed another typo where the facilities filter was using css id instead of station id from a copy/paste error.

* adding changes for previous state array and some test modification

* adding test for previous data

* Fixed some outstanding test failures.

* Fixed a linting error. Removed some duplicated code that happened when merging in the feature branch. Updated a factorybot method that was causing tests to fail.

* Fixed a few code climate warnings.

* Removed some puts statements in the individual claim history feature test.

---------

Co-authored-by: Prajwal Amatya <pamatya@take2it.com>

* TYLERB/APPEALS-58656: Change History CSV and Version Parsing fix (#22874)

* Fixed a modification request claim history in progress event generation bug that could occur when 3-4 pending requests were all created at the same time and then later cancelled at the same time. Also fixed an issue count bug used when building the issue type filter due to additional duplicate rows being inserted into issue type count query due to the left join to the issue modification requests table.

* Altered the version parsing for change history to work with commas in the version strings since that was causing parsing errors. Altered the business line query to use '|||' as a delimeter instead of comma and also changed the array_agg functions to string agg to avoid the '{}' array type casting that was happening between postgres and rails. Updated tests to work with this new parsing.

* Updated vha seed data to have associations to intake data so those seeded claims can correctly generate change history.

* TYLERB/CHANGE-HISTORY-YAML-QUOTE-FIX (#22910)

* Made an update to the claim history parse versions method to work with double quotations after the array_agg to string_agg change.

* Updated the tests to work with the new string agg and version parsing method.

* Skip flakey tests

These are possibly flakey now due to the rails upgrade. We can come
back and fix these once the work has been confirmed in UAT.

* Add rubocop disables for line length

These should be removed when the skips are removed.

* Updated the report_page feature test to reduce flakyness in github actions. Also updated the DownloadHelpers module.

---------

Co-authored-by: Brandon Dorner <brandonleedorner@gmail.com>

---------

Co-authored-by: Robert Travis Pierce <Pierce_Robert@ne.bah.com>
Co-authored-by: Robert Travis Pierce <robert@roberttravispierce.com>
Co-authored-by: Sean Craig <110493538+seancva@users.noreply.github.com>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>
Co-authored-by: jonathanh-va <111081469+jonathanh-va@users.noreply.github.com>
Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>
Co-authored-by: Clay Sheppard <csheepy@gmail.com>
Co-authored-by: almorbah <149511814+almorbah@users.noreply.github.com>
Co-authored-by: Sean Craig <sean.craig2@va.gov>
Co-authored-by: Prajwal Amatya <122557351+pamatyatake2@users.noreply.github.com>
Co-authored-by: = <tyler.broyles@va.gov>
Co-authored-by: Prajwal Amatya <pamatya@take2it.com>

* APPEALS-54874: Update PG and Ruby-oci8 gems (#23041)

* update minimum version in gemfile and ran bundle install (#22503)

* require ruby-oci8 in config/boot.rb to fix SIGV fault

* APPEALS-59294: Hearings seed file is creating DistributionTasks for legacy appeals (#23042)

* set parent task for legacy appeal hearing tasks to root task

* fix whitespace issue

* APPEALS-36292: Conditionally render banner alerts based on which environment it is deployed on (#23040)

* Conditionally render alerts based on which environment is deployed

* setting Env alert banner sitewide

* separate colors for different envs using the same alert type

* lighter reds for prodtest alert so the text is more readable

* give demo banner more contrast

* adjust specific language for demo env

* adjust logic to accept proper env var. Add style for preprod (yellow)

* isolate env alert styles

* remove duplicate 'demo' Alert

* remove development env banner to fix tests

* making conditional logic a little more bulletproof against 'production'

* update CaseWorkerIndex snapshot

* fix env var

* update snapshot from hard 'uat' setting

* conditionally render env alert on only the home page

* sticky env header statuses

* getting development alert banners to work

* target correct frontend dependency for NavigationBar changes

* connecting new frontend package with better prod exclusion logic

* make the prodtest env badge a more readable color

* cleaning up testing code

* fix linting issues

* Remove unnecessary space

* new NavigationBar update

* yarn install of new FE dependency

* remove extra package.json

* remove development env logic due to NODE_ENV bug

* fixing broken logo link padding and colors

* hardening logic to exclude other inputs

* correcting operator logic

* remove testing var

* point caseflow-frontend to master

* point at most recent caseflow-frontend master

* linting issues fix

* update Route and CaseWorker snapshot

* update snapshot for process.env.DEPLOY_ENV

---------

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

* Master to Main documentation changes (#23034)

* Update WINDOWS_11.md replacing master with main

* References to master are changed to main where applicable

* Hotfix/appeals 37269  (#23039)

* adds script and tests for the script

* adjust the way scheduled_for is created since the previous method was removed

* refactor some of the script

* rename test file to include _spec

* Empty-Commit

---------

Co-authored-by: Zackary Borges-Rowe <borges-rowe_zackary@bah.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* Revert "Release R2.6.0 FY24Q4.6.0"

* Raymond hughes patch 1 (#23124)

* Update WINDOWS_11.md replacing master with main

* References to master are changed to main where applicable

* APPEALS-59294: Hearings seed file is creating DistributionTasks for legacy appeals (#23126)

* set parent task for legacy appeal hearing tasks to root task

* fix whitespace issue

* APPEALS-36292: Conditionally render banner alerts based on which environment it is deployed on (#23127)

* Conditionally render alerts based on which environment is deployed

* setting Env alert banner sitewide

* separate colors for different envs using the same alert type

* lighter reds for prodtest alert so the text is more readable

* give demo banner more contrast

* adjust specific language for demo env

* adjust logic to accept proper env var. Add style for preprod (yellow)

* isolate env alert styles

* remove duplicate 'demo' Alert

* remove development env banner to fix tests

* making conditional logic a little more bulletproof against 'production'

* update CaseWorkerIndex snapshot

* fix env var

* update snapshot from hard 'uat' setting

* conditionally render env alert on only the home page

* sticky env header statuses

* getting development alert banners to work

* target correct frontend dependency for NavigationBar changes

* connecting new frontend package with better prod exclusion logic

* make the prodtest env badge a more readable color

* cleaning up testing code

* fix linting issues

* Remove unnecessary space

* new NavigationBar update

* yarn install of new FE dependency

* remove extra package.json

* remove development env logic due to NODE_ENV bug

* fixing broken logo link padding and colors

* hardening logic to exclude other inputs

* correcting operator logic

* remove testing var

* point caseflow-frontend to master

* point at most recent caseflow-frontend master

* linting issues fix

* update Route and CaseWorker snapshot

* update snapshot for process.env.DEPLOY_ENV

---------

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

* APPEALS-54874: Update PG and Ruby-oci8 gems (#23125)

* update minimum version in gemfile and ran bundle install (#22503)

* require ruby-oci8 in config/boot.rb to fix SIGV fault

* hotfix/APPEALS-37269: script for stuck AssignHearingDispositionTasks

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

* Merge feature/APPPEALS-41559 into main (#23132)

* Start feature work tracking PR with a TODO comment

* Remove TODO comment for CodeClimate

* SeanC/APPEALS-42315 | Create separate Remand table, model and seed data (#22220)

* added migration file for adding type column to supplemental claims table

* created stub for remand model

* added type to supplemental claim factory and new remand trait

* added remand sc's to vha seeds

* updated migration name and fixed typo

* Changed migration to inherit from Caseflow::Mirgration

* schema changes

* reverting schema

* changed the setting of the type column

* fixed schema and renamed migration file

* fixed migration and schema

* updated the remands factory and seeds

* fixed comment in schema

---------

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

* TYLERB/APPEALS-42455: Display new and migrated Remands in Decision Review Queue tabs (#22206)

* Added support for remands to the business_line.rb model and the index.js util file that parses the decision review type filters for the decision review queue.

* Updated the business line spec file, the decision reviews controller spec tests, and the reviews spec feature test to support remands.

* Added a decision review polymorphic helper to DRY up some of the polymorphic appeal concerns.

* Overrode the remand model association to request issues so active record joins will work correctly.

* Added another helper for sti polymorphic relationships. Fixed filtering for STI decision review types for remands. Updated tests and added factories for testing.

* Code climate fixes and test fixes.

* Fixed more test failures. Removed the remand request issues relationship since it was incorrectly implemented. Added a scope to supplemental claims for remands. Fixed an issue where board grant effectuation tasks without request issues were missing from the new task type count method.

* Changed the UNION ALL to a UNION in the new task_type_count method to prevent duplicate row counts. Updated tests and fixed an issue where the board grant effectuation tasks were being counted for pending task queries.

* JHoang/APPEALS-42318 (#22270)

* some preliminary remand & sc model updates

* typo

* some preliminary hlr checks?

* undo seed change

* decision issue and sc updates

* attempt code climate fixes

* another code climate fix

* testing changes

* useless variable..

* fix conditional in decision issue

* fix undefined find_by method

* attempt rspec fix

* rspec fix attempt #2

* supplemental_claim_spec fix?

* remove comma

* code climate fix

* added comment for transparency on remand creation, attempt fix for remands route

* updated specs for decision_issue, hlr_spec, appeal_spec to account for remand creation type

* fix lint error

* fix lint error #2

---------

Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>

* APPEALS-42458 (#22365)

* disable edit issues link for remands

* add banners explaining that remands are not editable

also makes sure that remands are not editable on the edit issues page

* TYLERB/APPEALS-44922: Update Generate task report page UI to include Remand in conditions (#22356)

* Initial commit. Changed the DecisionReviewType condition filter to a searchable dropdown and added the remands option to it as well. Updated the report page filter parsing to work with the searchable dropdown instead of checkboxes for the decision review type condition filter.

* Updated the ReportPage jest test and the report page feature test to work with the decision review type filter as a searchable dropdown instead of checkboxes.

* SeanC/APPEALS-42317 | Migrate existing Supplemental Claim Remands to Remand records via script (#22359)

* initial verison of update script

* remanded migration file

* updated sc spec with type

* schema

* fixed a few issues in the migration

* small fix to migration file

* moved the type column check into a seperate it block

* fixed wrong column in migration file

* created a new migration for creating the view

* updated the backfill migration file

---------

Co-authored-by: Brandon Lee Dorner <Brandondorner@yahoo.com>

* J hoang/appeals 44940 (#22428)

* initial

* some factory and spec updates

* change history query update and spec fixes

* code climate/lint fix

* change @claim_type identifier

* fix claim_history_event_spec.rb

* test coverage for change history with Remand claim type

* spec lint fixes

* refactor claim_type filtering to account for remand subtype

* business_line_spec fix

* decision_reviews_controller_spec update for remand claim type

* lint fixes for decision_reviews_controller_spec.rb

* comment updates in business_line.rb

* renamed mock data in change_history_reporter_spec

* trigger GA

* refactor claim type filter for less conditional handling

* business line spec fix

---------

Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>

* Initial commit for the brakeman sql injection warning fixes. (#22598)

* Updated the business line reporter class to properly display Remands as a seperate type than SupplementalClaims. Also added additional testing logic for the business line reporter for hlr and scs since it was only covering appeals. (#22664)

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

* Fixed a bug where the frontend would error due to calling .toLowerCase() on a null or undefined value which could happen sometimes if the api filter options are in an incorrect state. (#22796)

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

* Updated the remand migration files to work with the rails 6 upgrade and the changes to Caseflow::Migration. (#22825)

* added fix for failing test in decision_reviews_controller_spec (#22829)

* Remove backfill supplemental claims type migration

---------

Co-authored-by: Robert Travis Pierce <Pierce_Robert@ne.bah.com>
Co-authored-by: Sean Craig <110493538+seancva@users.noreply.github.com>
Co-authored-by: Tyler Broyles <109369527+TylerBroyles@users.noreply.github.com>
Co-authored-by: jonathanh-va <111081469+jonathanh-va@users.noreply.github.com>
Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>
Co-authored-by: Brandon Lee Dorner <Brandondorner@yahoo.com>
Co-authored-by: Clay Sheppard <csheepy@gmail.com>

* APPEALS-50679 | Reassign Cases to Camo Change History (#23134)

* Start feature work tracking PR with a TODO comment

* Remove TODO comment for CodeClimate

* SeanC/APPEALS-42315 | Create separate Remand table, model and seed data (#22220)

* added migration file for adding type column to supplemental claims table

* created stub for remand model

* added type to supplemental claim factory and new remand trait

* added remand sc's to vha seeds

* updated migration name and fixed typo

* Changed migration to inherit from Caseflow::Mirgration

* schema changes

* reverting schema

* changed the setting of the type column

* fixed schema and renamed migration file

* fixed migration and schema

* updated the remands factory and seeds

* fixed comment in schema

---------

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

* TYLERB/APPEA…
  • Loading branch information
1 parent eab3f94 commit f48939c
Show file tree
Hide file tree
Showing 30 changed files with 978 additions and 135 deletions.
1 change: 1 addition & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ def admin_menu_items
add_team_management_items(admin_urls)
add_user_management_items(admin_urls)
add_case_distribution_item(admin_urls)
add_test_seeds_item(admin_urls)

admin_urls.flatten
end
Expand Down
8 changes: 8 additions & 0 deletions app/controllers/case_distribution_levers_tests_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,14 @@ def appeals_tied_to_avljs_and_vljs
send_data csv_data, filename: filename
end

def reset_all_appeals
RequestStore[:current_user] = current_user
DistributionTask.where(status: "assigned").map { |t| t.update!(status: "on_hold") }
VACOLS::Case.where(bfcurloc: %w[81 83]).map { |c| c.update!(bfcurloc: "testing") }

head :ok
end

private

def check_environment
Expand Down
7 changes: 4 additions & 3 deletions app/controllers/concerns/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
module Errors
extend ActiveSupport::Concern
def invalid_role_error
render json: {
{
"errors": [
"title": "Role is Invalid",
"detail": "User is not allowed to perform this action"
]
}, status: :bad_request
],
"status": "bad_request"
}
end
end
8 changes: 7 additions & 1 deletion app/controllers/legacy_tasks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,13 @@ def validate_user_id
end

def validate_user_role
return invalid_role_error unless ROLES.include?(user_role)
return true if ROLES.include?(user_role)

Rails.logger.info("User with roles #{current_user.roles.join(', ')} "\
"couldn't access #{request.original_url}: Error: #{invalid_role_error}")

session["return_to"] = request.original_url
redirect_to "/unauthorized"
end

def user
Expand Down
11 changes: 9 additions & 2 deletions app/controllers/test/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,15 @@ def reseed
def optional_seed
return unless Rails.deploy_env?(:demo)

system "bundle exec rake db:seed:optional"
head :ok
output = `bundle exec rake db:seed:optional`

# Using named capture groups and conditional assignment
seeds_added = if output =~ /(?<count>\d+) APPEALS_ADDED/
Regexp.last_match[:count].to_i
else
0
end
render json: { message: "Seeds added successfully", seeds_added: seeds_added }, status: :ok
end

def toggle_feature
Expand Down
18 changes: 18 additions & 0 deletions app/controllers/test_docket_seeds_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,38 @@ class TestDocketSeedsController < ApplicationController
before_action :check_environment # , :verify_access
# before_action :current_user, only: [:reset_all_appeals]

# rubocop:disable Metrics/AbcSize
# rubocop:disable Metrics/MethodLength
def seed_dockets
JSON.parse(request.body.read).each do |row_entry|
task_name = Constants.TEST_SEEDS.to_h[row_entry["seed_type"].to_sym]
ENV["SEED_COUNT"] = row_entry["seed_count"].to_s
ENV["DAYS_AGO"] = row_entry["days_ago"].to_s
ENV["JUDGE_CSS_ID"] = row_entry["judge_css_id"].to_s
ENV["DISPOSITION"] = row_entry["disposition"].to_s
ENV["HEARING_TYPE"] = row_entry["hearing_type"].to_s
ENV["HEARING_DATE"] = row_entry["hearing_date"].to_s
ENV["AOD_BASED_ON_AGE"] = row_entry["aod_based_on_age"].to_s
ENV["CLOSEST_REGIONAL_OFFICE"] = row_entry["closest_regional_office"].to_s
ENV["UUID"] = row_entry["uuid"].to_s
ENV["DOCKET"] = row_entry["docket"].to_s

Rake::Task[task_name].reenable
Rake::Task[task_name].invoke

ENV.delete("SEED_COUNT")
ENV.delete("DAYS_AGO")
ENV.delete("JUDGE_CSS_ID")
ENV.delete("DISPOSITION")
ENV.delete("HEARING_TYPE")
ENV.delete("HEARING_DATE")
ENV.delete("AOD_BASED_ON_AGE")
ENV.delete("CLOSEST_REGIONAL_OFFICE")
ENV.delete("UUID")
ENV.delete("DOCKET")
end
# rubocop:enable Metrics/AbcSize
# rubocop:enable Metrics/MethodLength

head :ok
end
Expand Down
20 changes: 20 additions & 0 deletions app/controllers/test_seeds_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,26 @@ def seeds
render "/test/seeds"
end

def run_demo
seed_type = params[:seed_type].to_sym
seed_count = params[:seed_count].to_i
test_seed_list = Constants.TEST_SEEDS.to_h
task_name = test_seed_list[seed_type]

if task_name
Rake::Task[task_name].reenable
index = 0
seed_count.times do
index += 1
Rails.logger.info "Rake run count #{index}"
Rake::Task[task_name].execute
end
head :ok
else
render json: { error: "Invalid seed type" }, status: :bad_request
end
end

private

def check_environment
Expand Down
1 change: 1 addition & 0 deletions app/jobs/push_priority_appeals_to_judges_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def perform
slack_msg = "<!here>\n [ERROR] after running for #{duration}: #{error.message}"
slack_service.send_notification(slack_msg, self.class.name)
log_error(error)
Raven.capture_exception(error, extra: { error_uuid: SecureRandom.uuid })
ensure
metrics_service_report_runtime(metric_group_name: "priority_appeal_push_job")
end
Expand Down
2 changes: 1 addition & 1 deletion app/views/case_distribution_levers/test.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
feedbackUrl: feedback_url,
acdLevers: @acd_levers,
acdHistory: @acd_history,
returnedAppealJobs: @returned_appeal_jobs
returnedAppealJobs: @returned_appeal_jobs,
}) %>
<% end %>
77 changes: 77 additions & 0 deletions client/COPY.json
Original file line number Diff line number Diff line change
Expand Up @@ -1601,6 +1601,83 @@
"MESSAGE": " correspondence have been created for the following Veteran file number(s): "
}
},
"TEST_CLEAR_READY_TO_DISTRIBUTE_APPEALS_TITLE": "Clear Ready-to-Distribute Appeals",
"TEST_CLEAR_READY_TO_DISTRIBUTE_APPEALS_ALERTMSG": "Successfully cleared Ready-to-Distribute Appeals",
"TEST_CLEAR_READY_TO_DISTRIBUTE_APPEALS_DESCRIPTION": " - This process changes an appeal's status from Ready to Distribute. It will apply to all Ready to Distribute appeals. They will no longer be eligible for distribution. This may take a few minutes to complete.",
"TEST_RESEED_AOD_ALERTMSG": "Successfully Completed Seeding Aod Hearing Held Appeals.",
"TEST_RESEED_NON_AOD_ALERTMSG": "Successfully Completed Seeding Non Aod Hearing Held Appeals.",
"TEST_RESEED_AMA_DOCKET_GOALS_ALERTMSG": "Successfully Completed Seeding Ama Docket Time Goal Non Priority Appeals.",
"TEST_RESEED_AMA_DOCKET_PRIORITY_ALERTMSG": "Successfully Completed Seeding Docket Type Appeals.",
"TEST_RESEED_NONSSCAVLJAPPEALS_ALERTMSG": "Successfully Completed Seeding non-SSC AVLJ and Appeals.",
"TEST_RESEED_RETURN_LEGACY_APPEALS_ALERTMSG": "Successfully Completed Return Legacy Appeals To Board Job.",
"TEST_RESEED_GENERIC_FULL_SUITE_APPEALS_ALERTMSG": "Basic Seeds appeal creation is complete. {count} appeals have been created as of ",
"TEST_CASE_DISTRIBUTION_LEVERS_DASHBOARD_TITLE": "Case Distribution Levers Dashboard",
"TEST_CASE_DISTRIBUTION_LEVERS_DESCRIPTION": "This page is for lower env use only and provides a convient place to review Case Distribution related data",
"TEST_NAVIGATION_H2": "Navigation",
"TEST_CASE_DISTRIBUTION_LEVERS_BUTTON": "Case Distribution Levers",
"TEST_CASE_DISTRIBUTION_AUDIT_LEVERS_BUTTON": "Case Distribution Audit Levers",
"TEST_ACCESS_CSVS_BUTTON": "Access CSVs",
"TEST_DOWNLOAD_APPEALS_READY_BUTTON": "Download Appeals Ready to Distribute CSV",
"TEST_DOWNLOAD_DISTRIBUTED_APPEALS_BUTTON": "Download Distributed Appeals CSV",
"TEST_DOWNLOAD_INELIGIBLE_JUDGE_BUTTON": "Download Ineligible Judge List",
"TEST_DOWNLOAD_AMA_NON_PRIO_DISTR_BUTTON": "Download AMA Non-priority Distributable CSV",
"TEST_DOWNLOAD_APPEALS_TIED_NONSSC_AVLJS_BUTTON": "Download Appeals tied to Non-SSC AVLJs CSV",
"TEST_DOWNLOAD_APPEALS_TIED_AVLJ_VLJ_BUTTON": "Download Appeals Tied to AVLJ and VLJ CSV",
"TEST_DOWNLOAD_LOC_63_APPEALS_BUTTON": "Download Loc 63 Appeals Last 48 hrs CSV",
"TEST_DOWNLOAD_INELIGIBLE_JUDGE_BUTTON_DESCRIPTION": " - Very specific. Export of judges who are considered ineligible based on their current attributes. Eligible judges with a checkmark excluding them from receiving affinity appeals are not included in this list.",
"TEST_DOWNLOAD_AMA_NON_PRIO_DISTR_BUTTON_DESCRIPTION": " - Subset of Appeals Ready to Distribute. Only includes AMA non-priority appeals that are distributable based on the additional date criteria for Days Before Goal date. (If the lever is turned on, appeal meets goal date criteria; or any ready to distribute appeals in that docket if the lever is off).",
"TEST_DOWNLOAD_APPEALS_TIED_NONSSC_AVLJS_BUTTON_DESCRIPTION": " - List of legacy appeals for which the hearing judge, or the hearing and deciding judge is a Non-SSC AVLJ.",
"TEST_DOWNLOAD_APPEALS_TIED_AVLJ_VLJ_BUTTON_DESCRIPTION": " - List of legacy appeals tied to judges that are AVLJ and VLJ.",
"TEST_DOWNLOAD_LOC_63_APPEALS_BUTTON_DESCRIPTION": " - Very specific. Time-ordered list of legacy appeals for which the location changed to 63. Contains all appeals that met this criteria within the last rolling 48 hours.",
"TEST_CASE_MOVEMENT_BUTTON": "Case Movement",
"LOG_OF_MOST_RECENT_APPEALS_BUTTON": "Log of 15 most recent appeals moved to location 63",
"TEST_ID_TD": "ID",
"TEST_LEVER_ID_TD": "Lever ID",
"TEST_TITLE_TD": "Title",
"TEST_ITEM_TD": "Item",
"TEST_CONTROL_GROUP_TD": "Control Group",
"TEST_LEVER_GROUP_TD": "Lever Group",
"TEST_LEVER_GROUP_ORDER_TD": "Lever Group Order",
"TEST_DESCRIPTION_TD": "Description",
"TEST_DATA_TYPE_TD": "Data Type",
"TEST_VALUE_TD": "Value",
"TEST_MIN_MAX_VALUE_TD": "Min / Max Value",
"TEST_UNIT_TD": "Unit",
"TEST_OPTION_VALUES_TD": "Option Values",
"TEST_TOGGLE_ACTIVE_TD": "Toggle Active",
"TEST_DISABLED_IN_UI_TD": "Disabled In UI",
"TEST_ALGORITHMS_USED_TD": "Algorithms Use",
"TEST_CREATED_AT_TD": "Created At",
"TEST_UPDATED_AT_TD": "Updated At",
"TEST_PREVIOUS_VALUE_TD": "Previous Value",
"TEST_UPDATE_VALUE_TD": "Update Value",
"TEST_USER_CSS_ID_TD": "User CSS ID",
"TEST_USER_NAME_TD": "User CSS ID",
"TEST_LEVER_TITLE_TD": "Lever Title",
"TEST_LEVER_DATA_TYPE_TD": "Lever Data Type",
"TEST_LEVER_UNIT_TD": "Lever Unit",
"TEST_CASE_DISTRIBUTION_LEVERS_H2": " Case Distribution Levers ",
"TEST_CREATE_SEEDED_APPEALS_TITLE": "Create Seeded Appeals",
"TEST_WARNING_P1": "Clicking any button below creates specific appeals. The creation process triggered by any button click can take up to 20 minutes to complete.",
"TEST_WARNING_P2": "While appeals are being created, system performance is considerably slowed, and actions related to requesting appeals or CSVs in the Distribution Status section above will produce unexpected results.",
"TEST_WARNING_P3": "We recommend you only run the seed file identified for your specific testing effort.",
"TEST_RUN_DEMO_AOD_HEARING_HELD_TITLE": "Run Demo AOD Hearing Held Seeds",
"TEST_RUN_DEMO_AOD_HEARING_HELD_DESCRIPTION": " - Creates 204 appeals with an assigned at date. 75% are AMA AOD hearings with a mix of hearing judges (eligible and ineligible).",
"TEST_RUN_DEMO_NON_AOD_HEARING_HELD_TITLE": "Run Demo Non-AOD Hearing Held Seeds",
"TEST_RUN_DEMO_NON_AOD_HEARING_HELD_DESCRIPTION": " - Creates 192 appeals with an assigned at date. 80% are AMA non-priority hearings with a mix of hearing judges (eligible and ineligible).",
"TEST_RUN_DOCKET_TIME_GOAL_TITLE": "Run Docket Time Goal (AMA non-pri) Seeds",
"TEST_RUN_DOCKET_TIME_GOAL_DESCRIPTION": " - Creates 117 appeals with an assigned at date. 60% are AMA Non-priority appeals. Useful when testing Docket Time Goals.",
"TEST_RUN_DOCKET_TYPE_SEEDS_TITLE": "Run Docket-type Seeds",
"TEST_RUN_DOCKET_TYPE_SEEDS_DESCRIPTION": " - Creates 185 appeals with an assigned at date. 35% legacy, remainder mix of AMA original appeals.",
"TEST_RUN_NONSSC_AVLJ_APPEAL_TITLE": "Run Non-SSC AVLJ and Appeal Seeds",
"TEST_RUN_NONSSC_AVLJ_APPEAL_DESCRIPTION": " - Creates 66 assigned legacy appeals. About 50% assigned to Non-SSC AVLJs.",
"TEST_RUN_GENERIC_FULL_SUITE_APPEALS_TITLE": "Run Generic Full Suite Appeals Seeds",
"TEST_RUN_GENERIC_FULL_SUITE_APPEALS_DESCRIPTION": " - Creates over 4,000 appeals that includes those needed for Tasks, Hearings, Cavc AMA appeals, AMA Affinity Appeals, MST PACT Legacy, AMA Intake, Remanded AMA Appeals, and Remanded Legacy Appeals.",
"TEST_CASE_MOVEMENT_TITLE": "Case Movement",
"TEST_RETURN_LEGACY_APPEALS_TO_BOARD_JOB_TITLE": "Run ReturnLegacyAppealsToBoard job",
"TEST_RETURN_LEGACY_APPEALS_TO_BOARD_JOB_DESCRIPTION": " - Click to run the ReturnLegacyAppealsToBoard job. This job changes the location to 63 for qualifying legacy appeals.",
"TEST_LOG_OF_MOST_RECENT_APPEALS_MOVED_TITLE": "Log of 15 most recent appeals moved to location 63",
"TEST_BACK_TO_TOP_BUTTON": "Back to Top",
"TEST_SEEDS_ALERT_MESSAGE": " in progress",
"TEST_SEEDS_RUN_SEEDS": "Scenario Seeds",
"TEST_SEEDS_CUSTOM_SEEDS": "Custom Seeds",
Expand Down
6 changes: 4 additions & 2 deletions client/app/caseDistribution/components/AffinityDays.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const AffinityDays = () => {

return (
<div key={`${lever.item}-${index}-${option.item}`}>
<div>
<div className="radio-with-text">
<input
checked={isOptionSelected(lever, option)}
type={ACD_LEVERS.data_types.radio}
Expand All @@ -124,10 +124,12 @@ const AffinityDays = () => {
id={`${lever.item}-${option.item}`}
name={lever.item}
onChange={onChangeRadio(lever, option)}
title={option.text}
/>
<label htmlFor={`${lever.item}-${option.item}`}>
{option.text}
<span className="hidden-label-text">{option.text}</span>
</label>
<div>{option.text}</div>
</div>
<div>
<div className={className} aria-label={option.unit}>
Expand Down
23 changes: 23 additions & 0 deletions client/app/caseDistribution/components/testPage/ResetButton.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react';
import Button from '../../../components/Button';
import PropTypes from 'prop-types';

const ResetButton = ({ onClick, loading }) => {
return (
<Button
id="clear-appeals"
data-testid="clear-appeals"
onClick={onClick}
name="Clear Ready-to-Distribute Appeals"
loading={loading}
loadingText="Clearing Ready-to-Distribute Appeals"
/>
);
};

ResetButton.propTypes = {
onClick: PropTypes.func,
loading: PropTypes.bool
};

export default ResetButton;
Loading

0 comments on commit f48939c

Please sign in to comment.