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

Caceves/appeals 34965 demo d #22657

Closed
wants to merge 516 commits into from
Closed

Conversation

cacevesva
Copy link
Contributor

Resolves Jira Issue Title

Description

Please explain the changes you made here.

Acceptance Criteria

  • Code compiles correctly

Testing Plan

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

Frontend

User Facing Changes

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

Storybook Story

For Frontend (Presentation) Components

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

Backend

Database Changes

Only for Schema Changes

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

Integrations: Adding endpoints for external APIs

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

Best practices

Code Documentation Updates

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

Tests

Test Coverage

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

  • RSpec
  • Jest
  • Other

Code Climate

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

  • No new code climate issues added

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

Monitoring

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

Logging

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

Auditing

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

Error Handling

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

Exception Handling

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

HunJerBAH and others added 30 commits April 2, 2024 09:37
* Move Auto Assign Button to Correspondence Queue

* Fix Lint Errors
* Move Auto Assign Button to Correspondence Queue (#21324)

* Move Auto Assign Button to Correspondence Queue

* Fix Lint Errors

* Include RunAsyncable

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
* Move Auto Assign Button to Correspondence Queue (#21324)

* Move Auto Assign Button to Correspondence Queue

* Fix Lint Errors

* Include RunAsyncable

* Fix Broken Task Factories

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
#21329)

* replaced correspondences_appeals with correspondence_appeal

* added safe indecies to new correspondence_appeals table

* updated correspondence_appeal namespace

---------

Co-authored-by: Jim Foley <james.foley4@va.gov>
* Moving the queue method to a new controller

* updating routing to the queue controller

* Creating a spec file but leaving it empty for future changes

* added a test for the correspondence_cases route

---------

Co-authored-by: HunJerBAH <99915461+HunJerBAH@users.noreply.github.com>
* changed contents of correspondence seed notes (#21259)
<!-- Change JIRA-12345 to reflect the URL of the Jira item this PR is associated with -->
Resolves [Jira Issue Title](https://jira.devops.va.gov/browse/JIRA-12345)

# Description
Please explain the changes you made here.

## Acceptance Criteria
- [ ] Code compiles correctly

## Testing Plan
<!-- Change JIRA-12345 to reflect the URL of the location of the test plan(s) for this PR -->
1. Go to [Jira Issue/Test Plan Link](https://jira.devops.va.gov/browse/JIRA-12345) or list them below

- [ ] For feature branches merging into master: Was this deployed to UAT?

# Frontend
## User Facing Changes
 - [ ] Screenshots of UI changes added to PR & Original Issue

 BEFORE|AFTER
 ---|---

## Storybook Story
*For Frontend (Presentation) Components*
* [ ] Add a [Storybook](https://github.com/department-of-veterans-affairs/caseflow/wiki/Documenting-React-Components-with-Storybook) file alongside the component file (e.g. create `MyComponent.stories.js` alongside `MyComponent.jsx`)
* [ ] Give it a title that reflects the component's location within the overall Caseflow hierarchy
* [ ] Write a separate story (within the same file) for each discrete variation of the component

# Backend
## Database Changes
*Only for Schema Changes*

* [ ] Add typical timestamps (`created_at`, `updated_at`) for new tables
* [ ] Update column comments; include a "PII" prefix to indicate definite or potential [PII data content](https://github.com/department-of-veterans-affairs/appeals-team/blob/master/caseflow-team/0-how-we-work/pii-handbook.md#what-is-pii)
* [ ] Have your migration classes inherit from `Caseflow::Migration`, especially when adding indexes (use `add_safe_index`) (see [Writing DB migrations](https://github.com/department-of-veterans-affairs/caseflow/wiki/Writing-DB-migrations))
* [ ] Verify that `migrate:rollback` works as desired ([`change` supported functions](https://edgeguides.rubyonrails.org/active_record_migrations.html#using-the-change-method))
* [ ] Perform query profiling (eyeball Rails log, check bullet and fasterer output)
* [ ] For queries using raw sql was an explain plan run by System Team
* [ ] Add appropriate indexes (especially for foreign keys, polymorphic columns, unique constraints, and Rails scopes)
* [ ] Run `make check-fks`; add any missing foreign keys or add to `config/initializers/immigrant.rb` (see [Record associations and Foreign Keys](https://github.com/department-of-veterans-affairs/caseflow/wiki/Record-associations-and-Foreign-Keys))
* [ ] Add `belongs_to` for associations to enable the [schema diagrams](https://department-of-veterans-affairs.github.io/caseflow/task_trees/schema/schema_diagrams) to be automatically updated
* [ ] Document any non-obvious semantics or logic useful for interpreting database data at [Caseflow Data Model and Dictionary](https://github.com/department-of-veterans-affairs/caseflow/wiki/Caseflow-Data-Model-and-Dictionary)

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

# Best practices
## Code Documentation Updates
- [ ] Add or update code comments at the top of the class, module, and/or component.

## Tests
### Test Coverage
Did you include any test coverage for your code? Check below:
- [ ] RSpec
- [ ] Jest
- [ ] Other

### Code Climate
Your code does not add any new code climate offenses? If so why?
- [ ] No new code climate issues added

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

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

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

### Auditing
- [ ] Are user actions being logged for audit purposes?
- [ ] Are changes to critical data being tracked ?
- [ ] Are logs being securely stored and protected from tampering or exposing protected data?

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

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

* WIP

* Working as intended

* Spec tests

* Added instructions to modal

* Linting Errors

* Addressing comments

---------

Co-authored-by: Jim Foley <james.foley4@va.gov>
Co-authored-by: HunJerBAH <99915461+HunJerBAH@users.noreply.github.com>
* refactored props being passed down to child components

* refactored permissions checks for reassign and remove package tasks

* removed unecessary router useage

* addressed name change concerns for supervisor/superuser to be more in line with correspondence workflow
Co-authored-by: HunJerBAH <99915461+HunJerBAH@users.noreply.github.com>
divyadasari-va and others added 24 commits August 9, 2024 09:04
* Fix for Inbound Ops Team shows in Assign to team Task action

* codeclimate fix
* Code climate fix

* Rubocop fix

---------

Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
* update mail_task.rb

* added method override for verifying user in correspondence mail task model

* fix spec tests

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: HunJerBAH <Jeremy.Hunton@va.gov>
* APPEALS-48371 - Correspondence Cases Spec Updates

* Moved user/super to helper

* Fix for rubocop violations

---------

Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>
* APPEALS-48371 - Correspondence Cases Spec Updates

* Moved user/super to helper

* Fix for rubocop violations

---------

Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>
* Initial commit for Response letters

* codeclimate fix for correspondence_details_controller

* Fixes the lint issues and removed unnessary code

* Added feature test cases for response letters

* Adding the wait time for spec for get success

* Spec fix by increasing the wait time

* Spec fixes for correspondence details response letter tab

* Spec modification

* Spec modification

* Spec modification

* Adding sleep for the spec helper

* Changing the vist link from helper to spec file

* lint fix

* Codeclimate fixes

* Spec fixes

* Spec fix

* Spec fix
…d from Correspondence to existing appeals (#22332)

* stable rendering and backend data

* fixed null errors

* fixed typo

* frontend populating correctly with the exception of num_of_issues

* removed console.log

* Fixed docket num column

* stable checkpoint for tasks added to appeal

* added missing bolded text

* fixed border and badge

* fixed veteran naming

* style and html changes

* quick styling fix

* off color fix

* updated the way tasks are handed, changed serializer and added new one.

* added all functionality

* fixed css issue and empty variable controller issue

* fixed failing jest tests

* final jest test changes

* APPEALS-42531 - Correspondence Cases: Pending tab: FOIA request link (#22329)

* update schema

* updating task_url

* create folder, file and test coverage for FOIA Request

* Fix minor lint error

* Revert "update schema"

This reverts commit d358e14.

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* Fix for Inbound Ops Team shows in Assign to team Task action (#22349)

* Fix for Inbound Ops Team shows in Assign to team Task action

* codeclimate fix

* APPEALS-51237, APPEALS-51536: Optimize feature tests in intake/appeal/edit_spec.rb and optimize automatic case distribution tests (#22280)

* refactoring edit_spec

* move one assertion and remove duplicate test

* refactor withdraw issues context

* move duplicate test assertions

* move duplicate test assertions to existing tests and remove duplicate tests

* move assertion and remove duplicate test

* consolidate SCT appeal tests

* refactor SCT tests to use step blocks

* consolidate a individual test into a step

* move CC appeal task tests to appeals_controller_spec intead of a feature test

* remove unnecessary code comments

* consolidate member not admin tests

* remove commented portions of test

* move tests from affinity_days_levers_spec.rb

* move tests from affinity_days_levers_spec.rb, last commit was from audit_lever_history_table_spec.rb

* remove ama_np_dist_goals_by_docket_lever_spec.rb

* remove batch_size_levers_spec.rb

* remove inactive_data_elements_levers_spec.rb

* remove lever_buttons_spec.rb

* refactor

* move jest file for convention, add snapshot

* move test for admin ui not interactable for non-admins to a jest test

* remove unnecessary comments, whitespace

* restore jest folder structure

* modify edit spec to use case details page instead of searching again

* modify assertions

* remove TODO comment

* add assertion to allow async save actions to be executed

* add check to ensure banner is gone before trying to save

* refactor assertions for lever history display

* fix failing dependency report tests

* APPEALS-53151: Update ECR Workflow to Utilize OIDC Flow (#22348)

* Reconfigure ECR login workflow to utilize Github's OIDC flow

* Add permissions

* Update AWS account number to one for VAEC

* Update account number for main CI workflow

* Try using a separate secret in test

* Try using a separate secret in test

* Change name of secret

---------

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

* Added a space between the intake and create record buttons (#22360)

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* Color fix (#22369)

* APPEALS-42525 - Package Details: General Information (#22350)

* APPEALS-42525 - Added General Information, Styling

* APPEALS-42525 - Updated Tests, Linting

* Correspondence and Appeal Tasks: Tasks not related to an Appeal - fix (#22330)

* removed duplicate row

* fixed task text and improved code reability

* enhanced key, isolated serializer issue

* added filtering of additional types

* APPEALS-42531 - Correspondence Cases: Pending tab: FOIA request link (#22329)

* update schema

* updating task_url

* create folder, file and test coverage for FOIA Request

* Fix minor lint error

* Revert "update schema"

This reverts commit d358e14.

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* reworked data source for available actions

* fixed lint offense

* removed binding.pry

* made changes to serializer and correspondence model

* Fix for prettier offense

* fixed linting issues

---------

Co-authored-by: IsaiahBar <107133331+IsaiahBar@users.noreply.github.com>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* Code climate fix (#22377)

* Code climate fix

* Rubocop fix

---------

Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* Color fix (#22379)

* Color fix

* Lint fix

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* update mail_task.rb (#22376)

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* Revert "update mail_task.rb (#22376)" (#22385)

This reverts commit 2e4fbef.

* APPEALS-42525 - Switching tests to Jest (#22392)

* Correspondence and Appeal Tasks: Tasks not related to an Appeal (#22394)

* removed duplicate row

* fixed task text and improved code reability

* enhanced key, isolated serializer issue

* added filtering of additional types

* APPEALS-42531 - Correspondence Cases: Pending tab: FOIA request link (#22329)

* update schema

* updating task_url

* create folder, file and test coverage for FOIA Request

* Fix minor lint error

* Revert "update schema"

This reverts commit d358e14.

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* reworked data source for available actions

* fixed lint offense

* removed binding.pry

* made changes to serializer and correspondence model

* Fix for prettier offense

* fixed linting issues

* removed unused method.

* fixed correspondence_serializer calling the wrong method.

* Correspondence and Appeal Tasks: Tasks not related to an Appeal - fix (#22330)

* removed duplicate row

* fixed task text and improved code reability

* enhanced key, isolated serializer issue

* added filtering of additional types

* APPEALS-42531 - Correspondence Cases: Pending tab: FOIA request link (#22329)

* update schema

* updating task_url

* create folder, file and test coverage for FOIA Request

* Fix minor lint error

* Revert "update schema"

This reverts commit d358e14.

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* reworked data source for available actions

* fixed lint offense

* removed binding.pry

* made changes to serializer and correspondence model

* Fix for prettier offense

* fixed linting issues

---------

Co-authored-by: IsaiahBar <107133331+IsaiahBar@users.noreply.github.com>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* Code climate fix (#22377)

* Code climate fix

* Rubocop fix

---------

Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* Color fix (#22379)

* Color fix

* Lint fix

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* update mail_task.rb (#22376)

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* Revert "update mail_task.rb (#22376)" (#22385)

This reverts commit 2e4fbef.

---------

Co-authored-by: IsaiahBar <107133331+IsaiahBar@users.noreply.github.com>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>
Co-authored-by: divyadasari-va <135847343+divyadasari-va@users.noreply.github.com>

* IsaiahB/APPEALS-53208 (#22410)

* update mail_task.rb

* added method override for verifying user in correspondence mail task model

* fix spec tests

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: HunJerBAH <Jeremy.Hunton@va.gov>

* adding all correspondences table (#22415)

* adding all correspondences table

* added jest tests

* spec fix

* Rspec test fixes  (#22411)

* Correspondence Cases page Banner alert for approval and reject request approve request to reassign test fix

* Correspondence Cases page Banner alert for approval and reject request approve request to reassign test fix modifications

* Fix for banner warning message for efolder

* Add skips to MST PACT test to skip temporarily

---------

Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* APPEALS-42525 - Update Styling (#22424)

* Sivakesh/Appeals-42642 - Associate Prior Mail to only show Pending or Completed Correspondences (#22374)

* #48957 - Add Correspondences' Status to Intake Form

* #48672 - Added a spec

* #42642 - updated status in spec

* Caceves/appeals 53755 code climate fixes (#22427)

* Code climate fixes initial commit

* Added proptypes to tooltiphelper file

* Jest fixes

* Updated jest snap shots

* Fix for dentical blocks of code being found in multiple locations for radio input field

* Lint fixes

* Jest fixes

* Jest fixes updating the snapshots

* Codeclimate fixes for const props

* testing the duplication error fix for jest

* User tests 'FeatureToggle.enabled?(:correspondence_queue)' at least 3 times

* Add ignore for pdf offense

* Complexity fixes

---------

Co-authored-by: divyadasari-va <divya.dasari@va.gov>
Co-authored-by: divyadasari-va <135847343+divyadasari-va@users.noreply.github.com>

* Sivakesh/appeals 51904 - 508: Jaws doesn't read options on the correspondence type dropdown (#22333)

* #51904 - added aria attributes

* #51904 - added aria attributes

* #51904 - added aria attributes

* #51904 - added conditional aria label

* #51904 - removed aria attributes

* Remove aria label by

* #51904 - updated snapshots to have aria-label

* #51904 - updated snapshots to have aria-label

* #51904 - updated jest tests

* #51904 - updated jest tests

* #51904 - updated jest tests

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* CodeClimate fixes for User tests 'correspondence_queue_enabled?' at least 3 times (#22444)

* Fix for Inbound Ops Team shows in Assign to team Task action (#22349)

* Fix for Inbound Ops Team shows in Assign to team Task action

* codeclimate fix

* Code climate fix (#22377)

* Code climate fix

* Rubocop fix

---------

Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* Feature/appeals 43179 (#21665)

* Calvin/APPEALS-43852-cavc-levers (#21441)

* enabled cavc affinity levers in UI

* updated rspec

* [APPEALS-43849]Update CAVC Affinity Implementation for AMA Dockets to… (#21456)

* [APPEALS-43849]Update CAVC Affinity Implementation for AMA Dockets to Account for Omit/Infinity

* Affinity rules applied to non genpop

* Addressed comments

* Addressed comments

* fixed rubocop issues + added clarity to where clause

---------

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

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

* add migration for appeal_affinities

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

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

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

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

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

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

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

* add more tests

* test refactor

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

* disable new seed on reset

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

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* [Appeals 43850] Update Legacy Docket Queries to Account for the Previous Decision Judge and Type Action  (#21556)

* test changes for seans ticket

* test changes

* added joins to all required methods

* fixed lint

* fixed column ambiguity errors

* cleaned up naming scheme

* Documentation for JOIN_PREVIOUS_APPEALS constant

---------

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

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

* swap distribution queries from distribution_task to appeal_affinities

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

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

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

* fix tests for date format update

* APPEALS-44187: Factory Bot Additions (#21438)

* AC1: values for bfddec and bfmpro

* AC2: case issues updated to '3'

* AC3-4: attorney and judge additions

* ac 5: bfdpdcn addition

* AC6: case type action addition

* ac7: new folder match to original

* ac8: case issues set to original

* AC 3/4: added associations to original

* ac3/4: updated logic to handle no args

* ac3/4: return sattyid

* ac7:updating folder assignment

* ac7: added bfkey to except block

* ac7/8: update to case issue list and validations dismissed

* removed byebug

* ac7: added 'ticknum' to except

* lint fixes

* lint fixes

* lint fixes

* lint fixes

* nested trait into form_9 factory

* new addtions

* added .save to case issues

* resolving correspondent and titrnum associations

* fixed bfdc typo

* factory additions

* added ssn to associated corr.

* removed transient and added .save

* added after create to corr factory

* veteran lookup check prior to create

* committing missed 'end'

* moved over veteran create to case fact.

* move corr. association field to case fact.

* lint issues + corres. save

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

* grabbed receipt dates from distributed cases

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

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

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

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

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

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

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

* add affinity start date to explain page

* add feature test to verify dates display

* Sudhir/appeals 43851 (#21613)

* Implement CAVC + AOD Affinity Lever for AMA Dockets

* addressed comments

* addressed comments

* Addressed comments

* added cavc_aod_affinity in case distribution lever model

* addressed comments

* addressed comments

* updated specs

* Updated specs

* specs changes reverted

* ama_aod and ama_non_aod queries updated

* change the assertion in docket spec

* Craig/appeals 46196 (#21689)

* fix query, tested locally

* add basic test to verify csv downloads aren't broken

* APPEALS-43851: Add test to validate CAVC+AOD behavior on hearing docket appeals affinities (#21678)

* add test to validate cavc+aod on hearing docket appeals

* lint, test case_docket_spec fix

* modify case_docket_spec again

* more test fix testing

* attempt to fix test again

* test removing prev appeals from nonpriority queries

* more test tests

* feature toggle change in test

* reorder new portions of query

* remove unused portions of queries in case_docket

* revert unneeded change to query order

* revert unneeded change to query order

* update rake task and spec (#21731)

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

* add aod hearing cases to ama affinity cases seed

* fix lever spec

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

* initial imp. idea

* AC1: check for affinity_start_date on assignment

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

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

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

* fix tests, add lever to factory, fix dist scopes (#21779)

* fix rubocop warning

* Acd/appeals 43853 43854 (#21971)

* Calvin/appeals 43853 (#21723)

* initial updates

* removing unnecessary variable

* focused in on priority

* removing non priority stuff

* added general comments

* added BFAC and AOD to cavc aod lever query

* adding judge vacols id to query

* aod affinity_start_date filter initial changes

* fixed sorting

* fixed rubocop issues

* updated filter method

* error handling

* added ineligibility to queries for PREV_DECIDING_JUDGE

* fixed SQL query + added comments

* added exclude from affinity check into the case docket queries

* error handling + fixing sql queries

* rejects appeals without affinity_start_dates and nonmatching judges

* fixing rubocop offenses

* fixed inconsistencies between methods

* fixed conditions for rejecting appeals

* refactored cavc aod affinity filter to make it much easier to read

* refactored code to account for AC6

* error handling for empty exclude from affinity

* reverted next if block to old logic to ensure it works

* added PREV_DEC_JUDGE is not null

* case.rb factory changes

* added more options to legacy_cavc_appeal creation

* cleaned up code for simpler reading

* fix for aod legacy cavc creation

* added tied to option to legacy cavc appeal factory

* limits are now handled correctly in query

* replaced return false to next if, as return false was causing unexpected behavior

* fix rspecs + one edge case

* added cavc aod lever creation to rspecs

* removed bfac and aod from nonpriority query

* cavc aod appeals w/excluded judges are now properly being filtered

* refactored excluded judges check

* added to old query to fix rspec errors

* modified case factory bot

* query now handles when prev_deciding_judge is nil

* removed unnecessary condition

* fixed case factory to now have tied_to attatched to orig appeal

* fixed next if block within filter

* handles omit scenarios + correctly rejects with next

* working on rspec (still failing)

* fix for ineligble VLJ when infinite

* fixed rspec suite for cavc aod filters

* fixed omit scenario in cavc aod affinity filter

* consolidation & readability refactor

* rubocop fixes

* fixed spec error

* Implement CAVC Affinity for Legacy Docket (#21706)

* Implement CAVC Affinity for Legacy Docket

* addressed comments

* Added BFAC in the query

* code changes for affinitty date

* Added affinity code

* code refactor and removed non priority code changes

* fixed syntax change

* Addressed comments

* refactor cavc affinity filter

* refactored code

* code refactor

* code refactor

* Updated existing specs

* code refactor

* Added new rspecs

* code refactor and added test  cases

* code refactor

* added test cases

* fixes push_priority_spec

* fixed rubocop issues

* rubocop issue fixed

* refactored code to make it easier to understand

* refactored + fixed rspec and lint errors

---------

Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>

* basic creation of legacy affinity cases seed data

* bug fixes, added bfcorlid with veterans, fully runs now

* added new appeals for affinity_and_tied_to_judge

* made data have realistic bfcorlids

* changes document sequence to use less digits

* added new file numbers for tied_to cases to make them easier to identify

---------

Co-authored-by: samasudhirreddy <108430298+samasudhirreddy@users.noreply.github.com>

* APPEALS-50692: Update Appeals Ready to Distribute CSV to include CAVC remand original judge (#22070)

* CSV download functional

* add tests, fix CSV query in CaseDocket

* fix lint

* Calvin/appeals 44313 (#22119)

* initial seed data file

* added legacy cavc and cavc aod affinity cases

* update

* fixed tied to for legacy appeals

* added AOD versions of appeals

* small lint fixes

* ensured AOD cases for legacy hearings with exluded or ineligible judge

* added vacols staff record creation for users without it

* APPEALS-47741: Update the UpdateAppealAffinityDatesJob to add appeal_affinity records for Legacy Appeals (#22023)

* AC1: changes and respective tests

* adjustements after refactoring

* identifier mismatch

* name update

* name update

* added appeal affinity filter

* updated comment

* remove byebug

* update rspec to handle hash input

* added no start date test case

* updated process method test

* removed 'todo' comment

* dried up query string

* aligned conditions

* update to hash quotations

* update to hash quotations

* added legacy to priority receipt dates from dist.

* moved append to resulting list

* added legacy receipt date to push job hash

* uncomment call to legacy

* updated dist.id to @dist_id

* uncomment call to process legacy appeals

* handling update to legacy docket type

* current rspec status

* fixed typo

* fix rspec

* legacy spec additions

* legacy spec additions

* added legacy dist. case factory

* removed vacols_judge ref

* updates for spec

* final review

* removed comment

* rubocop fixes

* fix rubocop warnings (#22225)

* Fix rubocop and tests (#22231)

* Calvin/appeals 52551 (#22293)

* age_of_n_oldest_priority_appeals_available_to_judge time out changes

* fixed timeout issue for distribute_priority_appeals

* fixed lint errors

* Craig/case docket optimization (#22294)

* age_of_n_oldest_priority_appeals_available_to_judge time out changes

* fixed timeout issue for distribute_priority_appeals

* optimize case docket priority distribution methods

* fix das deprecation distribution spec

---------

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

* Update admin_ui_spec.rb for CAVC levers being enabled

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: samasudhirreddy <108430298+samasudhirreddy@users.noreply.github.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: seanrpa <155660052+seanrpa@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* APPEALS-46266, APPEALS-46239: ACD Stats and Slack message updates (#22388)

* APPEALS-42221 Distribution Stats: Break statistics into columns (#21717)

* rebuild branch

* Create 20240506140249_add_cols_to_distribution_stats.rb

* unit tests and linting

* APPEALS-46244, APPEALS-46245 (#22077)

* remove unnecessary reporting

* send slack message to console if on local or demo

* add excluded judges to slack report

* reporting method cleanup

* added affinity date stats to distribution_stats for each docket

* Update docket.rb

* Update distribution_scopes.rb

* unit tests and linting

* unit tests and linting

* Slack message update

* Update push_priority_appeals_to_judges_job.rb

* Update push_priority_appeals_to_judges_job_spec.rb

* code climate and code review changes (#22148)

* code climate and code review changes

* move code out to its own class

* lint fixes

* revert

* disable reek checks

* fix method calls

* Hotfix/appeals 46639 prodtest (#22389)

* Initial commit and turning off queue tab variables used for the frontend pagination for the bulk assign tab for the specialty case team.

* Altered the queue actions to work with the new task selection action and a new redux action to remove tasks from a cached queue state. Also updated queue table to work with the redux caching instead of local state caching.

* Added in task selection function changes to TaskTable to work
with the altered task selection redux action. Also added the ability to pass down the redux cache property to queue table. Refactored the UnassignedCasesPage to allow for backend pagination of queue table instead of only working via frontend loaded data from the redux store.

* Added the queueTableCache reducer slice. Added a :advanced_on_docket trait to the task factory for specialty_case_team_assign_tasks. Added the caching combined reducer to the queue table reducers.

* Moved columnsFromConfig and createColumnObject functions out of QueueTableBuilder.jsx into a utils file so it can be used in multiple components around the app.

* Updated the setSelectionOfTaskOfUser to work with the new action and data that it should be expecting.

* Updated the selectedTasksSelector to work with the new task selection reducer and action.

* Added a parameter for useReduxCache for TaskTable to send down to queue table instead of always setting it to true. Removed some comments from the queueTableCacheSlice removeTaskIdsFromCache reducer method/action. Passed in the new useReduxCache property to TaskTable in the UnassignedCasesPage component for the sct bulk assign queue.

* Removed code out of QueueTableBuilder that is now in queueTableUtils.js.

* Fixed a bug if queueConfig was an empty hash in the UnassignedCasesPage component.

* Serializer optimizations for contested issues and issue categories. Also included request issues in the includes for the sct queue to take advantage of these optimizations.

* Fixed a bug where clear filters was not properly updating the get parameters anymore for queue table.

* Added cavc_type trait to the sct assign task factory.

* Fix code climate issues.

---------

Co-authored-by: = <tyler.broyles@va.gov>

* Updates key on line 63 to the correct value. (#22267)

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

* Hotfix/appeals-42846 Fixes incorrect spelling of SupervisorySeniorCounsel across project (#22391)

* Repushing branch to fix CodeClimate and Rspec issue

* Attempt to fix failed Rspec.

* Revert Schema changes

---------

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

* consolidate individual RO accessors into a single test for each RO (#22407)

* Revert "Updates key on line 63 to the correct value. (#22267)" (#22417)

This reverts commit def10f5.

* Revert "Feature/appeals 43179 (#21665)" (#22425)

This reverts commit 7613209.

* Ki/APPEALS-48371 - Refactor correspondence_cases_spec.rb (#22474)

* APPEALS-48371 - Correspondence Cases Spec Updates

* Moved user/super to helper

* Fix for rubocop violations

---------

Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* Div/appeals 42524 (#22471)

* Initial commit for Response letters

* codeclimate fix for correspondence_details_controller

* Fixes the lint issues and removed unnessary code

* Added feature test cases for response letters

* Adding the wait time for spec for get success

* Spec fix by increasing the wait time

* Spec fixes for correspondence details response letter tab

* Spec modification

* Spec modification

* Spec modification

* Adding sleep for the spec helper

* Changing the vist link from helper to spec file

* lint fix

* Codeclimate fixes

* Spec fixes

* Spec fix

* Spec fix

* fixed new props data breaking component

* Fix lint error

* updated labels

* changed docket number to caps

* git redo

* working link

* made changes based on github feedback.

* fixed linter issue

---------

Co-authored-by: IsaiahBar <107133331+IsaiahBar@users.noreply.github.com>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>
Co-authored-by: divyadasari-va <135847343+divyadasari-va@users.noreply.github.com>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Ki Mau <ki.mau@va.gov>
Co-authored-by: HunJerBAH <Jeremy.Hunton@va.gov>
Co-authored-by: vinner57 <128258952+vinner57@users.noreply.github.com>
Co-authored-by: psivakeshva <168677299+psivakeshva@users.noreply.github.com>
Co-authored-by: divyadasari-va <divya.dasari@va.gov>
Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: samasudhirreddy <108430298+samasudhirreddy@users.noreply.github.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: seanrpa <155660052+seanrpa@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Matt Roth <roth_matthew@bah.com>
Co-authored-by: Brandon Lee Dorner <Brandondorner@yahoo.com>
Co-authored-by: = <tyler.broyles@va.gov>
Co-authored-by: VaForceZ <149601263+VaForceZ@users.noreply.github.com>
Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>
…s Doesn't Align with Completed Tab Status (#22368)

* created correspondence statuses and created correspondence status methods.

* work in progress task not related to an appeal method

* updated correspondence status methods

* fixed bug with completed status not showing correctly

* removed old comment

* reverted name change

* work in progress moving logic from correspondence to root task.

* created correspondence status method

* put back in correspondence status check

* added scopes to correspondence task model

* moved root task as source of truth for correspondence status and task management

* fixed correspondence status names

* defined new correspondence task scopes

* created root task test coverage

* added open package action test

* test coverage for task_not_related_to_an_appeal

* updated tasks_not_related_to_an_appeal test

* fixed bug where mail tasks didn't inherit from correspondence and created test coverage.

* created tests for correspondence_status

* added in progress tests

* added completed task status test

* refactored test

* refactored package task check and tests

* refactored completed task tabs

* created logic for user in progress tasks

* refactored assigned tasks tab logic

* reworked unassigned, action required, and pending task tabs in organization queue

* fixed linting issues

* fixed failing correspondence details tests

* created correspondence status traits in seed file

* removed unused attribute check from controller spec

* updated failing tests

* fixed code climate issues

* fixed issue with failing test

* added back in assigned to for correspondence helper

* fix seed data that caused failing intake test

* fixed failing tests on intake_spec

* updated seed data

* reworked assigned tasks tab to not include action required tasks

* freeze active task names

* DRY'ed up the constants in intake processor

* refactored methods for code climate offenses

* resolved code climate issues

* Divya fix for correspondence case timeline actions

* fixed linting errors and added response letter safety opperator

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
)

* resolving conflicts with feature branch

* resolving conflicts with feature branch

* resolvong conflicts

* resolving conflicts

* adding the seed data

* fix lint issues

* fix lint errors

* fix rubocop issues

* refactoring code

* fix rubocop issues

* spec fix

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
* Modifed the sorting order for response letters and added the missed column

* adjust spacing

* adjust missing letter

* adjust missing letter

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
* WIP

* cancel_corrresponence_task WIP

* Modal Working

* Modal WIP

* modal WIP

* WIP routing

* WIP working routes can cancel function

* WIP working banner

* Redux fix WIP

* WIP

* Spec test created and passing

* Passing jest test

* created cancel action for details redux store

* created action to remove task from redux store on cancel

* Fixing rubocop tests

* Fixed errors

* Code Climate update

* Adressing comments

* Addressing Comments

---------

Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>
Co-authored-by: HunJerBAH <Jeremy.Hunton@va.gov>
…ing “view documents” (#22595)

* finished link to veteran docs page.

* APPEALS-55525: Disable tests for seed files and lock Chrome version to v127 in Github Actions (#22567)

* add exclude pattern to github actions rspec command

* add test file exclude pattern constant

* lock chrome version to 127.0.6533.119

* Correspondence and Appeal Tasks: Related Appeals: Can view tasks added from Correspondence to existing appeals (#22332)

* stable rendering and backend data

* fixed null errors

* fixed typo

* frontend populating correctly with the exception of num_of_issues

* removed console.log

* Fixed docket num column

* stable checkpoint for tasks added to appeal

* added missing bolded text

* fixed border and badge

* fixed veteran naming

* style and html changes

* quick styling fix

* off color fix

* updated the way tasks are handed, changed serializer and added new one.

* added all functionality

* fixed css issue and empty variable controller issue

* fixed failing jest tests

* final jest test changes

* APPEALS-42531 - Correspondence Cases: Pending tab: FOIA request link (#22329)

* update schema

* updating task_url

* create folder, file and test coverage for FOIA Request

* Fix minor lint error

* Revert "update schema"

This reverts commit d358e142c2fb86472459c335622705457c51e36e.

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* Fix for Inbound Ops Team shows in Assign to team Task action (#22349)

* Fix for Inbound Ops Team shows in Assign to team Task action

* codeclimate fix

* APPEALS-51237, APPEALS-51536: Optimize feature tests in intake/appeal/edit_spec.rb and optimize automatic case distribution tests (#22280)

* refactoring edit_spec

* move one assertion and remove duplicate test

* refactor withdraw issues context

* move duplicate test assertions

* move duplicate test assertions to existing tests and remove duplicate tests

* move assertion and remove duplicate test

* consolidate SCT appeal tests

* refactor SCT tests to use step blocks

* consolidate a individual test into a step

* move CC appeal task tests to appeals_controller_spec intead of a feature test

* remove unnecessary code comments

* consolidate member not admin tests

* remove commented portions of test

* move tests from affinity_days_levers_spec.rb

* move tests from affinity_days_levers_spec.rb, last commit was from audit_lever_history_table_spec.rb

* remove ama_np_dist_goals_by_docket_lever_spec.rb

* remove batch_size_levers_spec.rb

* remove inactive_data_elements_levers_spec.rb

* remove lever_buttons_spec.rb

* refactor

* move jest file for convention, add snapshot

* move test for admin ui not interactable for non-admins to a jest test

* remove unnecessary comments, whitespace

* restore jest folder structure

* modify edit spec to use case details page instead of searching again

* modify assertions

* remove TODO comment

* add assertion to allow async save actions to be executed

* add check to ensure banner is gone before trying to save

* refactor assertions for lever history display

* fix failing dependency report tests

* APPEALS-53151: Update ECR Workflow to Utilize OIDC Flow (#22348)

* Reconfigure ECR login workflow to utilize Github's OIDC flow

* Add permissions

* Update AWS account number to one for VAEC

* Update account number for main CI workflow

* Try using a separate secret in test

* Try using a separate secret in test

* Change name of secret

---------

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

* Added a space between the intake and create record buttons (#22360)

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* Color fix (#22369)

* APPEALS-42525 - Package Details: General Information (#22350)

* APPEALS-42525 - Added General Information, Styling

* APPEALS-42525 - Updated Tests, Linting

* Correspondence and Appeal Tasks: Tasks not related to an Appeal - fix (#22330)

* removed duplicate row

* fixed task text and improved code reability

* enhanced key, isolated serializer issue

* added filtering of additional types

* APPEALS-42531 - Correspondence Cases: Pending tab: FOIA request link (#22329)

* update schema

* updating task_url

* create folder, file and test coverage for FOIA Request

* Fix minor lint error

* Revert "update schema"

This reverts commit d358e142c2fb86472459c335622705457c51e36e.

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* reworked data source for available actions

* fixed lint offense

* removed binding.pry

* made changes to serializer and correspondence model

* Fix for prettier offense

* fixed linting issues

---------

Co-authored-by: IsaiahBar <107133331+IsaiahBar@users.noreply.github.com>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* Code climate fix (#22377)

* Code climate fix

* Rubocop fix

---------

Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* Color fix (#22379)

* Color fix

* Lint fix

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* update mail_task.rb (#22376)

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* Revert "update mail_task.rb (#22376)" (#22385)

This reverts commit 2e4fbef953eb48d7e31ceb22ec0a850ff1205c75.

* APPEALS-42525 - Switching tests to Jest (#22392)

* Correspondence and Appeal Tasks: Tasks not related to an Appeal (#22394)

* removed duplicate row

* fixed task text and improved code reability

* enhanced key, isolated serializer issue

* added filtering of additional types

* APPEALS-42531 - Correspondence Cases: Pending tab: FOIA request link (#22329)

* update schema

* updating task_url

* create folder, file and test coverage for FOIA Request

* Fix minor lint error

* Revert "update schema"

This reverts commit d358e142c2fb86472459c335622705457c51e36e.

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* reworked data source for available actions

* fixed lint offense

* removed binding.pry

* made changes to serializer and correspondence model

* Fix for prettier offense

* fixed linting issues

* removed unused method.

* fixed correspondence_serializer calling the wrong method.

* Correspondence and Appeal Tasks: Tasks not related to an Appeal - fix (#22330)

* removed duplicate row

* fixed task text and improved code reability

* enhanced key, isolated serializer issue

* added filtering of additional types

* APPEALS-42531 - Correspondence Cases: Pending tab: FOIA request link (#22329)

* update schema

* updating task_url

* create folder, file and test coverage for FOIA Request

* Fix minor lint error

* Revert "update schema"

This reverts commit d358e142c2fb86472459c335622705457c51e36e.

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* reworked data source for available actions

* fixed lint offense

* removed binding.pry

* made changes to serializer and correspondence model

* Fix for prettier offense

* fixed linting issues

---------

Co-authored-by: IsaiahBar <107133331+IsaiahBar@users.noreply.github.com>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* Code climate fix (#22377)

* Code climate fix

* Rubocop fix

---------

Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* Color fix (#22379)

* Color fix

* Lint fix

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* update mail_task.rb (#22376)

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* Revert "update mail_task.rb (#22376)" (#22385)

This reverts commit 2e4fbef953eb48d7e31ceb22ec0a850ff1205c75.

---------

Co-authored-by: IsaiahBar <107133331+IsaiahBar@users.noreply.github.com>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>
Co-authored-by: divyadasari-va <135847343+divyadasari-va@users.noreply.github.com>

* IsaiahB/APPEALS-53208 (#22410)

* update mail_task.rb

* added method override for verifying user in correspondence mail task model

* fix spec tests

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: HunJerBAH <Jeremy.Hunton@va.gov>

* adding all correspondences table (#22415)

* adding all correspondences table

* added jest tests

* spec fix

* Rspec test fixes  (#22411)

* Correspondence Cases page Banner alert for approval and reject request approve request to reassign test fix

* Correspondence Cases page Banner alert for approval and reject request approve request to reassign test fix modifications

* Fix for banner warning message for efolder

* Add skips to MST PACT test to skip temporarily

---------

Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* APPEALS-42525 - Update Styling (#22424)

* Sivakesh/Appeals-42642 - Associate Prior Mail to only show Pending or Completed Correspondences (#22374)

* #48957 - Add Correspondences' Status to Intake Form

* #48672 - Added a spec

* #42642 - updated status in spec

* Caceves/appeals 53755 code climate fixes (#22427)

* Code climate fixes initial commit

* Added proptypes to tooltiphelper file

* Jest fixes

* Updated jest snap shots

* Fix for dentical blocks of code being found in multiple locations for radio input field

* Lint fixes

* Jest fixes

* Jest fixes updating the snapshots

* Codeclimate fixes for const props

* testing the duplication error fix for jest

* User tests 'FeatureToggle.enabled?(:correspondence_queue)' at least 3 times

* Add ignore for pdf offense

* Complexity fixes

---------

Co-authored-by: divyadasari-va <divya.dasari@va.gov>
Co-authored-by: divyadasari-va <135847343+divyadasari-va@users.noreply.github.com>

* Sivakesh/appeals 51904 - 508: Jaws doesn't read options on the correspondence type dropdown (#22333)

* #51904 - added aria attributes

* #51904 - added aria attributes

* #51904 - added aria attributes

* #51904 - added conditional aria label

* #51904 - removed aria attributes

* Remove aria label by

* #51904 - updated snapshots to have aria-label

* #51904 - updated snapshots to have aria-label

* #51904 - updated jest tests

* #51904 - updated jest tests

* #51904 - updated jest tests

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* CodeClimate fixes for User tests 'correspondence_queue_enabled?' at least 3 times (#22444)

* Fix for Inbound Ops Team shows in Assign to team Task action (#22349)

* Fix for Inbound Ops Team shows in Assign to team Task action

* codeclimate fix

* Code climate fix (#22377)

* Code climate fix

* Rubocop fix

---------

Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* Feature/appeals 43179 (#21665)

* Calvin/APPEALS-43852-cavc-levers (#21441)

* enabled cavc affinity levers in UI

* updated rspec

* [APPEALS-43849]Update CAVC Affinity Implementation for AMA Dockets to… (#21456)

* [APPEALS-43849]Update CAVC Affinity Implementation for AMA Dockets to Account for Omit/Infinity

* Affinity rules applied to non genpop

* Addressed comments

* Addressed comments

* fixed rubocop issues + added clarity to where clause

---------

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

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

* add migration for appeal_affinities

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

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

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

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

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

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

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

* add more tests

* test refactor

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

* disable new seed on reset

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

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* [Appeals 43850] Update Legacy Docket Queries to Account for the Previous Decision Judge and Type Action  (#21556)

* test changes for seans ticket

* test changes

* added joins to all required methods

* fixed lint

* fixed column ambiguity errors

* cleaned up naming scheme

* Documentation for JOIN_PREVIOUS_APPEALS constant

---------

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

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

* swap distribution queries from distribution_task to appeal_affinities

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

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

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

* fix tests for date format update

* APPEALS-44187: Factory Bot Additions (#21438)

* AC1: values for bfddec and bfmpro

* AC2: case issues updated to '3'

* AC3-4: attorney and judge additions

* ac 5: bfdpdcn addition

* AC6: case type action addition

* ac7: new folder match to original

* ac8: case issues set to original

* AC 3/4: added associations to original

* ac3/4: updated logic to handle no args

* ac3/4: return sattyid

* ac7:updating folder assignment

* ac7: added bfkey to except block

* ac7/8: update to case issue list and validations dismissed

* removed byebug

* ac7: added 'ticknum' to except

* lint fixes

* lint fixes

* lint fixes

* lint fixes

* nested trait into form_9 factory

* new addtions

* added .save to case issues

* resolving correspondent and titrnum associations

* fixed bfdc typo

* factory additions

* added ssn to associated corr.

* removed transient and added .save

* added after create to corr factory

* veteran lookup check prior to create

* committing missed 'end'

* moved over veteran create to case fact.

* move corr. association field to case fact.

* lint issues + corres. save

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

* grabbed receipt dates from distributed cases

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

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

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

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

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

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

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

* add affinity start date to explain page

* add feature test to verify dates display

* Sudhir/appeals 43851 (#21613)

* Implement CAVC + AOD Affinity Lever for AMA Dockets

* addressed comments

* addressed comments

* Addressed comments

* added cavc_aod_affinity in case distribution lever model

* addressed comments

* addressed comments

* updated specs

* Updated specs

* specs changes reverted

* ama_aod and ama_non_aod queries updated

* change the assertion in docket spec

* Craig/appeals 46196 (#21689)

* fix query, tested locally

* add basic test to verify csv downloads aren't broken

* APPEALS-43851: Add test to validate CAVC+AOD behavior on hearing docket appeals affinities (#21678)

* add test to validate cavc+aod on hearing docket appeals

* lint, test case_docket_spec fix

* modify case_docket_spec again

* more test fix testing

* attempt to fix test again

* test removing prev appeals from nonpriority queries

* more test tests

* feature toggle change in test

* reorder new portions of query

* remove unused portions of queries in case_docket

* revert unneeded change to query order

* revert unneeded change to query order

* update rake task and spec (#21731)

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

* add aod hearing cases to ama affinity cases seed

* fix lever spec

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

* initial imp. idea

* AC1: check for affinity_start_date on assignment

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

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

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

* fix tests, add lever to factory, fix dist scopes (#21779)

* fix rubocop warning

* Acd/appeals 43853 43854 (#21971)

* Calvin/appeals 43853 (#21723)

* initial updates

* removing unnecessary variable

* focused in on priority

* removing non priority stuff

* added general comments

* added BFAC and AOD to cavc aod lever query

* adding judge vacols id to query

* aod affinity_start_date filter initial changes

* fixed sorting

* fixed rubocop issues

* updated filter method

* error handling

* added ineligibility to queries for PREV_DECIDING_JUDGE

* fixed SQL query + added comments

* added exclude from affinity check into the case docket queries

* error handling + fixing sql queries

* rejects appeals without affinity_start_dates and nonmatching judges

* fixing rubocop offenses

* fixed inconsistencies between methods

* fixed conditions for rejecting appeals

* refactored cavc aod affinity filter to make it much easier to read

* refactored code to account for AC6

* error handling for empty exclude from affinity

* reverted next if block to old logic to ensure it works

* added PREV_DEC_JUDGE is not null

* case.rb factory changes

* added more options to legacy_cavc_appeal creation

* cleaned up code for simpler reading

* fix for aod legacy cavc creation

* added tied to option to legacy cavc appeal factory

* limits are now handled correctly in query

* replaced return false to next if, as return false was causing unexpected behavior

* fix rspecs + one edge case

* added cavc aod lever creation to rspecs

* removed bfac and aod from nonpriority query

* cavc aod appeals w/excluded judges are now properly being filtered

* refactored excluded judges check

* added to old query to fix rspec errors

* modified case factory bot

* query now handles when prev_deciding_judge is nil

* removed unnecessary condition

* fixed case factory to now have tied_to attatched to orig appeal

* fixed next if block within filter

* handles omit scenarios + correctly rejects with next

* working on rspec (still failing)

* fix for ineligble VLJ when infinite

* fixed rspec suite for cavc aod filters

* fixed omit scenario in cavc aod affinity filter

* consolidation & readability refactor

* rubocop fixes

* fixed spec error

* Implement CAVC Affinity for Legacy Docket (#21706)

* Implement CAVC Affinity for Legacy Docket

* addressed comments

* Added BFAC in the query

* code changes for affinitty date

* Added affinity code

* code refactor and removed non priority code changes

* fixed syntax change

* Addressed comments

* refactor cavc affinity filter

* refactored code

* code refactor

* code refactor

* Updated existing specs

* code refactor

* Added new rspecs

* code refactor and added test  cases

* code refactor

* added test cases

* fixes push_priority_spec

* fixed rubocop issues

* rubocop issue fixed

* refactored code to make it easier to understand

* refactored + fixed rspec and lint errors

---------

Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>

* basic creation of legacy affinity cases seed data

* bug fixes, added bfcorlid with veterans, fully runs now

* added new appeals for affinity_and_tied_to_judge

* made data have realistic bfcorlids

* changes document sequence to use less digits

* added new file numbers for tied_to cases to make them easier to identify

---------

Co-authored-by: samasudhirreddy <108430298+samasudhirreddy@users.noreply.github.com>

* APPEALS-50692: Update Appeals Ready to Distribute CSV to include CAVC remand original judge (#22070)

* CSV download functional

* add tests, fix CSV query in CaseDocket

* fix lint

* Calvin/appeals 44313 (#22119)

* initial seed data file

* added legacy cavc and cavc aod affinity cases

* update

* fixed tied to for legacy appeals

* added AOD versions of appeals

* small lint fixes

* ensured AOD cases for legacy hearings with exluded or ineligible judge

* added vacols staff record creation for users without it

* APPEALS-47741: Update the UpdateAppealAffinityDatesJob to add appeal_affinity records for Legacy Appeals (#22023)

* AC1: changes and respective tests

* adjustements after refactoring

* identifier mismatch

* name update

* name update

* added appeal affinity filter

* updated comment

* remove byebug

* update rspec to handle hash input

* added no start date test case

* updated process method test

* removed 'todo' comment

* dried up query string

* aligned conditions

* update to hash quotations

* update to hash quotations

* added legacy to priority receipt dates from dist.

* moved append to resulting list

* added legacy receipt date to push job hash

* uncomment call to legacy

* updated dist.id to @dist_id

* uncomment call to process legacy appeals

* handling update to legacy docket type

* current rspec status

* fixed typo

* fix rspec

* legacy spec additions

* legacy spec additions

* added legacy dist. case factory

* removed vacols_judge ref

* updates for spec

* final review

* removed comment

* rubocop fixes

* fix rubocop warnings (#22225)

* Fix rubocop and tests (#22231)

* Calvin/appeals 52551 (#22293)

* age_of_n_oldest_priority_appeals_available_to_judge time out changes

* fixed timeout issue for distribute_priority_appeals

* fixed lint errors

* Craig/case docket optimization (#22294)

* age_of_n_oldest_priority_appeals_available_to_judge time out changes

* fixed timeout issue for distribute_priority_appeals

* optimize case docket priority distribution methods

* fix das deprecation distribution spec

---------

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

* Update admin_ui_spec.rb for CAVC levers being enabled

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: samasudhirreddy <108430298+samasudhirreddy@users.noreply.github.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: seanrpa <155660052+seanrpa@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>

* APPEALS-46266, APPEALS-46239: ACD Stats and Slack message updates (#22388)

* APPEALS-42221 Distribution Stats: Break statistics into columns (#21717)

* rebuild branch

* Create 20240506140249_add_cols_to_distribution_stats.rb

* unit tests and linting

* APPEALS-46244, APPEALS-46245 (#22077)

* remove unnecessary reporting

* send slack message to console if on local or demo

* add excluded judges to slack report

* reporting method cleanup

* added affinity date stats to distribution_stats for each docket

* Update docket.rb

* Update distribution_scopes.rb

* unit tests and linting

* unit tests and linting

* Slack message update

* Update push_priority_appeals_to_judges_job.rb

* Update push_priority_appeals_to_judges_job_spec.rb

* code climate and code review changes (#22148)

* code climate and code review changes

* move code out to its own class

* lint fixes

* revert

* disable reek checks

* fix method calls

* Hotfix/appeals 46639 prodtest (#22389)

* Initial commit and turning off queue tab variables used for the frontend pagination for the bulk assign tab for the specialty case team.

* Altered the queue actions to work with the new task selection action and a new redux action to remove tasks from a cached queue state. Also updated queue table to work with the redux caching instead of local state caching.

* Added in task selection function changes to TaskTable to work
with the altered task selection redux action. Also added the ability to pass down the redux cache property to queue table. Refactored the UnassignedCasesPage to allow for backend pagination of queue table instead of only working via frontend loaded data from the redux store.

* Added the queueTableCache reducer slice. Added a :advanced_on_docket trait to the task factory for specialty_case_team_assign_tasks. Added the caching combined reducer to the queue table reducers.

* Moved columnsFromConfig and createColumnObject functions out of QueueTableBuilder.jsx into a utils file so it can be used in multiple components around the app.

* Updated the setSelectionOfTaskOfUser to work with the new action and data that it should be expecting.

* Updated the selectedTasksSelector to work with the new task selection reducer and action.

* Added a parameter for useReduxCache for TaskTable to send down to queue table instead of always setting it to true. Removed some comments from the queueTableCacheSlice removeTaskIdsFromCache reducer method/action. Passed in the new useReduxCache property to TaskTable in the UnassignedCasesPage component for the sct bulk assign queue.

* Removed code out of QueueTableBuilder that is now in queueTableUtils.js.

* Fixed a bug if queueConfig was an empty hash in the UnassignedCasesPage component.

* Serializer optimizations for contested issues and issue categories. Also included request issues in the includes for the sct queue to take advantage of these optimizations.

* Fixed a bug where clear filters was not properly updating the get parameters anymore for queue table.

* Added cavc_type trait to the sct assign task factory.

* Fix code climate issues.

---------

Co-authored-by: = <tyler.broyles@va.gov>

* Updates key on line 63 to the correct value. (#22267)

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

* Hotfix/appeals-42846 Fixes incorrect spelling of SupervisorySeniorCounsel across project (#22391)

* Repushing branch to fix CodeClimate and Rspec issue

* Attempt to fix failed Rspec.

* Revert Schema changes

---------

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

* consolidate individual RO accessors into a single test for each RO (#22407)

* Revert "Updates key on line 63 to the correct value. (#22267)" (#22417)

This reverts commit def10f5556a8d04b8b8125e00eb35bf0d56d1c8c.

* Revert "Feature/appeals 43179 (#21665)" (#22425)

This reverts commit 7613209eac2913058a6a2c52ddc21194c23ab80f.

* Ki/APPEALS-48371 - Refactor correspondence_cases_spec.rb (#22474)

* APPEALS-48371 - Correspondence Cases Spec Updates

* Moved user/super to helper

* Fix for rubocop violations

---------

Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* Div/appeals 42524 (#22471)

* Initial commit for Response letters

* codeclimate fix for correspondence_details_controller

* Fixes the lint issues and removed unnessary code

* Added feature test cases for response letters

* Adding the wait time for spec for get success

* Spec fix by increasing the wait time

* Spec fixes for correspondence details response letter tab

* Spec modification

* Spec modification

* Spec modification

* Adding sleep for the spec helper

* Changing the vist link from helper to spec file

* lint fix

* Codeclimate fixes

* Spec fixes

* Spec fix

* Spec fix

* fixed new props data breaking component

* Fix lint error

* updated labels

* changed docket number to caps

* git redo

* working link

* made changes based on github feedback.

* fixed linter issue

---------

Co-authored-by: IsaiahBar <107133331+IsaiahBar@users.noreply.github.com>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>
Co-authored-by: divyadasari-va <135847343+divyadasari-va@users.noreply.github.com>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Ki Mau <ki.mau@va.gov>
Co-authored-by: HunJerBAH <Jeremy.Hunton@va.gov>
Co-authored-by: vinner57 <128258952+vinner57@users.noreply.github.com>
Co-authored-by: psivakeshva <168677299+psivakeshva@users.noreply.github.com>
Co-authored-by: divyadasari-va <divya.dasari@va.gov>
Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: samasudhirreddy <108430298+samasudhirreddy@users.noreply.github.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: seanrpa <155660052+seanrpa@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Matt Roth <roth_matthew@bah.com>
Co-authored-by: Brandon Lee Dorner <Brandondorner@yahoo.com>
Co-authored-by: = <tyler.broyles@va.gov>
Co-authored-by: VaForceZ <149601263+VaForceZ@users.noreply.github.com>
Co-authored-by: Ron Wabukenda <130374706+ronwabVa@users.noreply.github.com>

* APPEALS-53014 and APPEALS-53057: Correspondence Details Pending Status Doesn't Align with Completed Tab Status (#22368)

* created correspondence statuses and created correspondence status methods.

* work in progress task not related to an appeal method

* updated correspondence status methods

* fixed bug with completed status not showing correctly

* removed old comment

* reverted name change

* work in progress moving logic from correspondence to root task.

* created correspondence status method

* put back in correspondence status check

* added scopes to correspondence task model

* moved root task as source of truth for correspondence status and task management

* fixed correspondence status names

* defined new correspondence task scopes

* created root task test coverage

* added open package action test

* test coverage for task_not_related_to_an_appeal

* updated tasks_not_related_to_an_appeal test

* fixed bug where mail tasks didn't inherit from correspondence and created test coverage.

* created tests for correspondence_status

* added in progress tests

* added completed task status test

* refactored test

* refactored package task check and tests

* refactored completed task tabs

* created logic for user in progress tasks

* refactored assigned tasks tab logic

* reworked unassigned, action required, and pending task tabs in organization queue

* fixed linting issues

* fixed failing correspondence details tests

* created correspondence status traits in seed file

* removed unused attribute check from controller spec

* updated failing tests

* fixed code climate issues

* fixed issue with failing test

* added back in assigned to for correspondence helper

* fix seed data that caused failing intake test

* fixed failing tests on intake_spec

* updated seed data

* reworked assigned tasks tab to not include action required tasks

* freeze active task names

* DRY'ed up the constants in intake processor

* refactored methods for code climate offenses

* resolved code climate issues

* Divya fix for correspondence case timeline actions

* fixed linting errors and added response letter safety opperator

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* Create Associated Prior Mail: Can view all associated prior mail  (#22542)

* resolving conflicts with feature branch

* resolving conflicts with feature branch

* resolvong conflicts

* resolving conflicts

* adding the seed data

* fix lint issues

* fix lint errors

* fix rubocop issues

* refactoring code

* fix rubocop issues

* spec fix

---------

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* Release R2.3.0 FY24Q4.3.0 (#22517)

* Hotfix/appeals 45 2 (#22198)

* Trigger Build

* Update email address from Hearings to Decisions

---------

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

* APPEALS-46269: Remove the ability to enable proportions code (#22499)

* remove conditional for selecting distribution algorithm

* fix tests which broke when removing the toggle

* Feature/appeals 42187 (#22522)

* cmartine/APPEALS-42621 (#21599)

* Add remove_comp_and_pen_intake feature toggle to intakes controller

* Add new compensation and pension removal message to COPY.json

* Disable comp and pen radio buttons if remove_comp_and_pen_intake toggle is on

* Frontend test updates

* Add tooltip checks for review page integration tests

* fix frontend test lint errors

* frontend tests changes

* Fix linter errors

---------

Co-authored-by: kshiflett88 <kodishiflett@gmail.com>
Co-authored-by: root <root@DESKTOP-IBDKNPF>

* nrithner/APPEALS-45263 (#21617)

* Add remove_comp_and_pen_intake feature toggle to intakes controller

* Add new compensation and pension removal message to COPY.json

* Disable comp and pen radio buttons if remove_comp_and_pen_intake toggle is on

* Frontend test updates

* Add tooltip checks for review page integration tests

* fix frontend test lint errors

* frontend tests changes

* Add banner for non-vha

* Add banner for VHA employee

* Refactor conditionals

* Refactor logic for banners to display

* Add dangerouslySetHtml to banner

* Add test for no VHA employee

with vha_claim_review_establishment disabled.

* Add VHA employee scenario to display REMOVE_INTAKE_COMP_AND_PEN

* Complete non vha user scenarios

* Complete VHA employee scenarios

* Remove comments

* Fix linter errors

* Remove spaces preceding question marks

* Correct linting errors

---------

Co-authored-by: Chris-Martine <christopher.martine@va.gov>
Co-authored-by: kshiflett88 <kodishiflett@gmail.com>
Co-authored-by: root <root@DESKTOP-IBDKNPF>

---------

Co-authored-by: Chris-Martine <135330019+Chris-Martine@users.noreply.github.com>
Co-authored-by: kshiflett88 <kodishiflett@gmail.com>
Co-authored-by: root <root@DESKTOP-IBDKNPF>
Co-authored-by: nicorithner-bah <148365039+nicorithner-bah@users.noreply.github.com>
Co-authored-by: Chris-Martine <christopher.martine@va.gov>

* Feature/appeals 51138.rc.4.3.0 (#22523)

* APPEALS-36339 (#21436)

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

* Fixed redundant linting issue

* Fixed empty line linting issue

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

* mbeard/APPEALS-44379 (#21451)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

---------

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

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

Co-authored-by: Christopher Detlef <>

* APPEALS-36345-updated (#21537)

* Refactored exclusion table

* Fixed ordering issue and testing

* mbeard/APPEALS-44379 (#21530)

* init commit

* new questions about method

* method for ready_appeals_from_levers 3rd iteration

* switched to conditional

* updates test and constants file

* adds testing scenarios for edge cases

* fixes test

* adds constants to top of file

* first new commit with new args

* updates methods and test query

* updates age_of_oldest methods params

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

---------

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

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

Co-authored-by: Christopher Detlef <>

* Chrisbdetlef/appeals 40705 (#21535)

* Chris backend Work

* APPEALS-44441. Added initial changes for individual seed

* WIP

* APPEALS-44441. Fixed the table css

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

* APPEALS-44441. Fix ScenarioSeeds jest test

* APPEALS-44441. Fix CustomeSeeds Jest test

* init commit

* fixes linting issues

* capybara test init

* APPEALS-44441. Backend Integration API changes

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

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

* APPEALS-44441. lint fixes

* APPEALS-44441. linting fixes

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

* Change route

* Change variables to match front and back end

* CustomSeed Jest test fix

* Fix issues

* Fix rubocop issues

* Use existing method in the controller

---------

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

* Sharsha/appeals 45531 (#21566)

* Fixed rspec failures on constants

* APPEALS-45531. Remove dead code

---------

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

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

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

* Sharsha/appeals 45531_1 (#21573)

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

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

---------

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

* Sharsha/appeals 45531 1 (#21609)

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

* APPEALS-45531. Fix lint issue

* Remove access check for this iteration

* APPEALS-45531. Fix lint issue in controller

* TEST FOR FIX

* MORE TESTING

* Fixed rspec issues

---------

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

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

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

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

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

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

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

---------

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

* ricky/APPEALS-44053 (#21587)

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

* puts statements testing

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

* updated appeals dsit

* final fix for PR

* updates spec to reflect changes in hearing_request_docket

* uncomments seeds

* Ricky/appeals 43523 (#21649)

* Added Assignment Queue link to Switch Users test page

* Updated controller to validate role and redirect

* Updated error information

* Updated rspec tests

---------

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

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

* APPEALS-45898. Updated the lever_group_order values

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

---------

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

* mbeard/APPEALS-40646 (#21645)

* Init commit

* adds methods and useffect first pass

* fixes isIdle warning

* removes important from scss

* refined handleToggleChange method

* updates font color for h4

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

* Chrisbdetlef/appeals 43117.cleanup (#21671)

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

* redo init commit

* updated imp. logic

* attorney widget fix

---------

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

* Add ruby CE API Gem

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

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

This reverts commit c78afe30620716d59d2ac31ad6eed71585d78a98.

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

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

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

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

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

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

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

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

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

This reverts commit a6262001f9bedabca60598c82bfe1b803f0f16c7.

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

* Changed dockerfile to install node through NVM

* Update env.sh with node 14.20 path

* Removed unused node env

* Update Dockerfile Removed unused node env variable

* Removed unused node env

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

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

* APPEALS-43117 Add QA Users for testing

* Fix rspecs

* Fix issues with attorneys and judge teams

* Fix org count

---------

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

* Minor fixes (#21694)

* Minor fixes

* Fix rspec tests and properly check for judge css id

* Fix lint issue

---------

Co-authored-by: Christopher Detlef <>

* Fix Legacy Case issues (#21747)

Co-authored-by: Christopher Detlef <>

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

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

* APPEALS-46037. Fix lint issues

---------

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

* Fix Lauren Roth issue (#21813)

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

Co-authored-by: Christopher Detlef <>

* ricky/APPEALS-44044 (#21814)

* first pass at legacy_docket method and spec

* second iteration of legacy_docket and spec

* adds method to age_of_oldest methods and updates test scenarios

* Updated testing and expanded method missing logic

* Updated legacy_docket_spec file and tests

* Updated boolean logic, updated rspecs and factories

* Updated rspec tests to include factories

* updates docket_spec line 317 and factory for disable_ama_non_priority_direct_review

---------

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

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

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

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

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

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

* refactored code and moved it to distribution scopes

* APPEALS-36333 address pr comments and refactor code

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

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

* APPEALS-44000 updated hearing request docket model specs

* APPEALS-44000 fixed jest tests

* APPEALS-44000 fixed broken rspecs

* APPEALS-43996 fix rubocop warnings

* APPEALS-43996 fix push priority job spec failures

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

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

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

* APPEALS-43996 update section title

* APPEALS-43996 revert rake task

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

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

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

* APPEALS-45191. Refactor and fix lint issues

---------

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

* refactor the logic and fix docket spec failures

* changed the call times to 3 times

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

---------

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

* updated the seeds to align with the work completed

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

* Csv research (#21892)

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

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

* csv and etc

* CSS for buttons

* jest tests for the reducer and action types

* Jest test

---------

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

* APPEALS-46057. CleanUP (#21914)

* more jest tests

* Disable scenario seeds

* Lint fixes

* APPEALS-46057. disable all scenario seeds

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

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

---------

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

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

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

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

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

* APPEALS-45191. Lint fix

---------

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

* Chrisharsha/appeals 43962 (#21929)

* Sharsha/appeals-44911_1 (#21784)

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

* APPEALS-44911. Redux implementation

* APPEALS-44911. CSS changes for custom seed preview

* APPEALS-44911. tweak css

---------

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

* Chrisbdetlef/appeals 44910 (#21838)

* Initial

* Add JSON parsing and multiple calls to rake tasks

* Pre-caby tets

* Add capybara tests and add IDs to buttons

---------

Co-authored-by: Christopher Detlef <>

---------

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

* APPEALS-43962. Lint fixes (#21932)

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

* Ricky/APPEALS-47293 (#21925)

* First pass implementation of fixing seeding rspecs

* Second pass at fixing errors in rspecs

* Revert updates to test if rspec passes

* Fixed linting issues in test_docket_seeds_controller_spec

---------

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

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

* APPEALS-48292 updated the column to be a string

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

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

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

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

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

* APPEALS-49004 fixed lint issues in docket.rb

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

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

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

---------

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

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

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

* mbeard/APPEALS-46257 (#21976)

* updates routes and frontend urls to namespace

* removes superfluous <a> tags

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

* Ensure that legacy appeals are being created

* Remove puts

---------

Co-authored-by: Christopher Detlef <>

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

* APPEALS-49403. Added buttons Docket Lever Seed

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

* APPEALS-49403. Lint fix

---------

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

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

* Feature/appeals 36234 masterupgrade (#22003)

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

* Update node verstion to 16 in git workflow

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

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

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

* Update and upgrade to node16 in client

* More updates to yarn.lock and package.json

* Fix tests by Adam Shaw

* Upadate snapshot for ScheduleVeteran.test.js.snap

* Doing some code clean up

* Doiing some more clean up

* Add and remove spaces to match master

* One more space to take care of

* One more space to take care of again

* One more space to take care of again

---------

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

* init master merge branch

---------

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

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

Co-authored-by: Christopher Detlef <>

* Sharsha/appeals 49461 (#22018)

* sharsha/APPEALS-49461. initial commit

* sharsha/APPEALS-49461. fix

---------

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

* mbeard/APPEALS-49421 (#22014)

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

* removes previous chane for TASKS_LOADED

* fixes capybara for test seeds controller button ids

---------

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

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

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

* mbeard/APPEALS-49585 (#22020)

* init commit for non member view input

* fixes css issue for docket-lever-right

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

* replaces hyphen with comma

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

* Chrisbdetlef/appeals 47008 1 (#22040)

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

* Remove testing function

* Update spec to reflect new user count in seed file

---------

Co-authored-by: Christopher Detlef <>

* got rid of extraneous file

* got rid of yarn lock orig

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

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

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

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

* APPEALS-47277 remove Vegas office (#21876)

* APPEALS-47277 remove Vagas office

* Removed Texas ID from other files and updated tests

* Snapshot update

---------

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

* hotfix/APPEALS-22403 (#21942)

* add identifier for filenumber or ssn in filenumber search

* linting

* codeclimate linting

* update match call to return boolean

---------

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

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

* Isaiah/merge 46910 (#21983)

* removed BFHINES checks and modified tests

* removed lingering bfhines test

* modified test

* most recent updates on tests for passing status

* removed refs to cavc updates

* Skip flaky test ro_viewhearsched_spec

---------

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

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

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

* add migration for appeal_affinities

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

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

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

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

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

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

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

* add more tests

* test refactor

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

* disable new seed on reset

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

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

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

* swap distribution queries from distribution_task to appeal_affinities

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

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

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

* fix tests for date format update

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

* grabbed receipt dates from distributed cases

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

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

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

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

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

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

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

* add affinity start date to explain page

* add feature test to verify dates display

* update rake task and spec (#21731)

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

* add aod hearing cases to ama affinity cases seed

* fix lever spec

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

* initial imp. idea

* AC1: check for affinity_start_date on assignment

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

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

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

* remove unnecessarily included module from job (#21827)

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

* rework ready_for_distribution scope

* fix non-hearing docket distribution bug

* restart tests

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

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

* Update users_spec.rb

---------

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

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

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

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

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

---------

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

* APPEALS-47106 Caseflow Swagger (#21993)

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

* add rswag

* Update Gemfile.lock

* Setup yaml UI

* remove and reroute old swagger files

* update format and servers values

* Update route_docs_controller.rb

* Update cmp_controller.rb

* cmp endpoint yaml

* cmp endpoint to return 501

* CMP endpoint swagger flies

* update swagger files

* adjust server order, add auth token

* cmp parameter name change

* add comments

* Update users_controller.rb

* unit tests and linting

* lint fixes

* Update swagger_helper.rb

* APPEALS-48048 Swagger Updates (#21909)

* update servers to not include a host

* remove host for server

* remove generated swaggers from definitions

* remove internal API endpoints from having generated swagger

* IDT servers fixes

* disable CMP swagger in prod and prodtest

* set authorization correctly

* fix what is required for CMP upload

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

* Update decision_reviews.yaml

* Update ama_issues.yaml

* Update vacols_issues.yaml

* Update swagger.yaml

* fix check failures

* Update docs_controller_spec.rb

* fix unit tests

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update rswag_ui.rb

* Update lint.rake

* Update decision_reviews_spec.rb

* Update fetch_all_active_legacy_a…
* WIP

* cancel_corrresponence_task WIP

* Modal Working

* Modal WIP

* modal WIP

* WIP routing

* WIP working routes can cancel function

* WIP working banner

* Redux fix WIP

* WIP

* Spec test created and passing

* Passing jest test

* created cancel action for details redux store

* created action to remove task from redux store on cancel

* Fixing rubocop tests

* Fixed errors

* Code Climate update

* Adressing comments

* Addressing Comments

* Switch Record Status + Code Clean Up

* Sucess & Error banner updated

* Code climate WIP

* Fixing failing tests

* Resolving last code climate issue

* Remove comma

---------

Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>
Co-authored-by: HunJerBAH <Jeremy.Hunton@va.gov>
…2560)

* WIP

* cancel_corrresponence_task WIP

* Modal Working

* Modal WIP

* modal WIP

* WIP routing

* WIP working routes can cancel function

* WIP working banner

* Redux fix WIP

* WIP

* Spec test created and passing

* APPEALS-49727 - Complete Task Modal Work

* APPEALS-49727 - Updates

* APPEALS-49727 - Working Complete Action

* APPEALS-49727 - Banner Updates

* APPEALS-49727 - Update Completed Tasks

* APPEALS -49727 - Functionality completed

* APPEALS-49727 Testing updates, Linting Cleanup, Test Data

* APPEALS - 49727 -Testing updates, Linting Cleanup, Test Data

* Linting

* APPEALS-49727 - Lint updates

* Updated Optionality for modal - Submit on empty text

* Removed unused import

* APPEALS-49727 - Removed unneeded task filters

---------

Co-authored-by: Dev-KRedd <khalin.redding@va.gov>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>
Copy link

codeclimate bot commented Aug 29, 2024

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

Here's the issue category breakdown:

Category Count
Complexity 2

View more on Code Climate.

KiMauVA and others added 2 commits August 29, 2024 11:41
* WIP

* cancel_corrresponence_task WIP

* Modal Working

* Modal WIP

* modal WIP

* WIP routing

* WIP working routes can cancel function

* WIP working banner

* Redux fix WIP

* #49703 - initial commit

* #49703 - added CorrespondenceChangeTaskTypeModal

* WIP

* #49703#49828 - Task type dropdown options

* #49703 #49816 - submit button behaviour

* Spec test created and passing

* test

* Passing jest test

* created cancel action for details redux store

* created action to remove task from redux store on cancel

* Fixing rubocop tests

* Fixed errors

* #49703 #54132 - success banner action

* #49703 - lint

* #49703, #55639 - update redux store with type and instructions

* #49703, #55639 - update redux store with type and instructions

* #49703, #49705 - Update backend tests

* #49703, #49705 - Update backend tests

* #49703, #54132 - Update error warning banner

* revert changes

* #49703, #49704 - Update frontend tests

* #49703 - lint

* #49703 - lint

* #49703 - addressing a lint issue

---------

Co-authored-by: Dev-KRedd <khalin.redding@va.gov>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>
Co-authored-by: HunJerBAH <Jeremy.Hunton@va.gov>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
@cacevesva
Copy link
Contributor Author

test branch

@cacevesva cacevesva closed this Sep 4, 2024
@cacevesva cacevesva deleted the caceves/APPEALS-34965-demo-d branch September 4, 2024 21:46
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.