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

Release R1.5.1 FY24Q3.5 #22017

Merged
merged 9 commits into from
Jun 27, 2024
Merged

Release R1.5.1 FY24Q3.5 #22017

merged 9 commits into from
Jun 27, 2024

Conversation

craigrva
Copy link
Contributor

@craigrva craigrva commented Jun 25, 2024

Release R1.5.1 FY24Q3.5

Description

Please explain the changes you made here.

Acceptance Criteria

  • Code compiles correctly

alex-guanipatin and others added 9 commits June 24, 2024 08:40
* 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>
* 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>
* 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-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>
* 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>
* Add Rswag and convert existing API documentation (#21778)

* add rswag

* Update Gemfile.lock

* Setup yaml UI

* remove and reroute old swagger files

* update format and servers values

* Update route_docs_controller.rb

* Update cmp_controller.rb

* cmp endpoint yaml

* cmp endpoint to return 501

* CMP endpoint swagger flies

* update swagger files

* adjust server order, add auth token

* cmp parameter name change

* add comments

* Update users_controller.rb

* unit tests and linting

* lint fixes

* Update swagger_helper.rb

* APPEALS-48048 Swagger Updates (#21909)

* update servers to not include a host

* remove host for server

* remove generated swaggers from definitions

* remove internal API endpoints from having generated swagger

* IDT servers fixes

* disable CMP swagger in prod and prodtest

* set authorization correctly

* fix what is required for CMP upload

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

* Update decision_reviews.yaml

* Update ama_issues.yaml

* Update vacols_issues.yaml

* Update swagger.yaml

* fix check failures

* Update docs_controller_spec.rb

* fix unit tests

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update rswag_ui.rb

* Update lint.rake

* Update decision_reviews_spec.rb

* Update fetch_all_active_legacy_appeals_job_spec.rb

* Update veterans_controller_spec.rb
* APPEALS-36759 Add sms_response_content and sms_response_time notifications table

* APPEALS-37003 First pass at job refactor

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

* APPEALS-37003 Update spec files

* APPEALS-37003 Update spec

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

* APPEALS-37003 Remove question mark

* Limit max retry attempts to 5

* Add ? to boolen return methods

* jcohen/APPEALS-43706 (#21444)

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

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

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

* Fix some spec failures unrelated to this branch

* Limit schema diff

* Add a missing tab

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

* Fix last unrelated failure.

* APPEALS-43706 linting issues in va_notify_service fixed.

---------

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

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

* Quarterly Notification Job refactoring

* APPEALS-43598 Fix lint issues for QuarterlyNotificationsJob refactor

* APPEALS-43598 Fix db schema.rb file

* APPEALS-43598 Fix schema.rb file

* APPEALS-43598 Refactoring QuarterlyNotificationsJob for readability

* APPEALS-43598 Refactoring QuarterlyNotificationsJob and removing extra methods

* [APPEALS-43598] Update method name

---------

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

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

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

* updates to pr

* pushing changes for tonight

* updating spec file to handle enabling and disabling feature flags

* Update format_message_status

* Lint roll

* fixing conflicts

* Updates to send notification spec

* Fix one of the legacy test cases

* Remove accidental push

* Fix remaining test

---------

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

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

* Cleanup files after uploading to VBMS

* Only delete file if it exists

* Resolve linter issue

* Update specs

* Trigger CodeClimate

---------

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

* Add appeal alias for notifiable

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

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

* fixing some errors

* updating factory

* updating tests

* updating tests and factory

* rubocop

---------

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

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

* APPEALS-43596 Adding tests

* APPEALS-43596 Fix codeclimate

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

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

* pushing changes

* updating tests

* rubocop

* rubocop'n

* deleting repeat constants

* removing file in favor of EVENT_TYPE_FILTERS.json

* removing instances of using VA_NOTIFY_TEMPLATE_NAMES and using EVENT_TYPE_FILTERS instead

* replacing all instances of strings with constants

* fixing bug

* rubocop'n

* rubocop'n

* rubocop

---------

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

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

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

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

* Group notification types as scopes

* Add new job

* Fix typo

* Add back batching

* Batch send messages

* Multithread job queueing

* Reconfigure bulk enqueueing to utilize send_notifications.fifo queue

* Update the comment on QuaterlyNotificationsJob#perform

to adhere to the RDoc standard

* Use constants for template name

* Provide a more descriptive var name

* Remove unused env var

* Fix linting issues

* Prevent error from being thrown early in init job

* Add RDoc comments to appeal_state

* Add rdoc comment to init job

* Add another rdoc comment to the init job

* Use a more specific error class whenever an appeal

cannot be located within the init job

* Add a more specific error to CaseflowJob#enqueue_batch_of_jobs

* Add test for SendNotificationJob.queue_name_suffix

* Update QuarterlyNotificationsJob tests

* Update appeal_state_spec.rb to cover new scopes

* Add spec file for NotificationInitializationJob

* Add CaseflowJob specs

* Add CaseflowJob specs

* Address rubocop issue (by ignoring it)

* Kicking off CodeClimate

* Fix some lint issues

* Freeze constant

---------

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

* Move spec file to proper location

* APPEALS-43599 (#21696)

* APPEALS-43599 Refactoring SendNotificationJob

* APPEALS-43599 Remove comments

* APPEALS-43599 Suppress code smells from reek

* APPEALS-43599 Suppress code smells from reek

* jcohen/APPEALS-43727 (#21589)

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

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

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

* APPEALS-43727 commit before merge from teammates work

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

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

* APPEALS-43727 tests passing, code works

* APPEALS-43727 adding tests to appeal_state_spec to test functionality

* APPEALS-43727 rspec tests in appeal_state.

* APPEALS-43727 tests pass.

* Fixing code climate duplicate code issue

* fixing case statement

* code climate things

* rubocop

* APPEALS-43727 work completed.

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

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

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

* Adjust spacing of comments in appeal_state.rb

* Utilize #external_id method over ternary

* Swap or conditional for blank?

* Fix another whitespace gap

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

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

* Update app/models/concerns/appeal_concern.rb

* APPEALS-43727 code/test edits

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

* APPEALS-43727 lint fix

---------

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

* APPEALS-46179 (#21712)

* APPEALS-46179 Create JobExecutionTimes table

* APPEALS-46179 Add comment

* APPEALS-46179 Update schema

* APPEALS-46193 (#21753)

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

* APPEALS-46193 Updating JobExecutionTimes table with an upsert query

* APPEALS-46193 Ignore JobExecutionTimes for certain jobs

* APPEALS-46193 Update ignore_job_execution_time? method

* APPEALS-46193 Adding tests

* Fix lint issues

* Update AWS dependencies

* Rollback gem reduction due to UAT issue

* Alter queue priority

* Forward error in SendNotificationJob

* Allow for notification audit records to remain in ProdTest

* Fix spec

* Fix typo in test fixture's name

* Fix lint infraction related to re-raising exceptions

* Address duplication CC error

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

* Add conditional for FOIA and Privacy Act mail

task to receives 'Privacy Act Pending' notifications

* Update spec

* Adjust some specs

* Add missing param

---------

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

* Remove byebug from spec

* Revert queue tweak

* Remove duplicate method

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

* initial commit

* refactoring methods to have constants instead of methods

* adding comments back in

---------

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

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

* initial commit

* rubocop'n

* rubcop'n

* fixing tests

---------

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

* Resolve missed conflict

* MattT/APPEALS-48514 (#21959)

* Prototype of privacy act fix

* Leave privacy act states intact upon decision mailed

* Remove unused param

* Attempt updating specs to cover new behavior

* Fix attr name typo

* Add missing bang

* Skip reek issue

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

---------

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

* Fix quarterly specs by add in necessary hearings

* Adjust spacing/ordering of gems (#21978)

* MattT/APPEALS-49085 (#21960)

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

* Fix whitespace issues

* Fix failing specs caused by an oversight on my part

* Fix lint issue

---------

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

* MattT/APPEALS-49212 (#21991)

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

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

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

* Add comment to new method

* Use constant for disposition type

* Fix typo in accessor

* Add spec for new appeal state action

* Create user in top scope

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

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

* Add nightly sync job spec

* Add disp task spec

* Add specs targeting the hearings controller

* Add sync script

* Eager load constants

* Add distinct

* Remove appeal_docketed from being reset

* Add script to adjust ama hearing statuses

* Correct mistype

* Add appeal_type clause

* Fix specs

* Lint fixes

* Flip conditionals in specs

* Fix var name

* Fix var

---------

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

* Backfill addition to script

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

* APPEALS-48966 Adding AppealState record for recently docketed appeals

* APPEALS-48966 Refactor code and add comments

* Delete extraneous files

* Revert to using constants value

---------

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

* Fix typo

---------

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

* APPEALS-37003 First pass at job refactor

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

* APPEALS-37003 Update spec files

* APPEALS-37003 Update spec

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

* APPEALS-37003 Remove question mark

* Limit max retry attempts to 5

* Add ? to boolen return methods

* jcohen/APPEALS-43706 (#21444)

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

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

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

* Fix some spec failures unrelated to this branch

* Limit schema diff

* Add a missing tab

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

* Fix last unrelated failure.

* APPEALS-43706 linting issues in va_notify_service fixed.

---------

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

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

* Quarterly Notification Job refactoring

* APPEALS-43598 Fix lint issues for QuarterlyNotificationsJob refactor

* APPEALS-43598 Fix db schema.rb file

* APPEALS-43598 Fix schema.rb file

* APPEALS-43598 Refactoring QuarterlyNotificationsJob for readability

* APPEALS-43598 Refactoring QuarterlyNotificationsJob and removing extra methods

* [APPEALS-43598] Update method name

---------

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

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

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

* updates to pr

* pushing changes for tonight

* updating spec file to handle enabling and disabling feature flags

* Update format_message_status

* Lint roll

* fixing conflicts

* Updates to send notification spec

* Fix one of the legacy test cases

* Remove accidental push

* Fix remaining test

---------

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

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

* Cleanup files after uploading to VBMS

* Only delete file if it exists

* Resolve linter issue

* Update specs

* Trigger CodeClimate

---------

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

* Add appeal alias for notifiable

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

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

* fixing some errors

* updating factory

* updating tests

* updating tests and factory

* rubocop

---------

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

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

* APPEALS-43596 Adding tests

* APPEALS-43596 Fix codeclimate

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

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

* pushing changes

* updating tests

* rubocop

* rubocop'n

* deleting repeat constants

* removing file in favor of EVENT_TYPE_FILTERS.json

* removing instances of using VA_NOTIFY_TEMPLATE_NAMES and using EVENT_TYPE_FILTERS instead

* replacing all instances of strings with constants

* fixing bug

* rubocop'n

* rubocop'n

* rubocop

---------

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

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

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

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

* Group notification types as scopes

* Add new job

* Fix typo

* Add back batching

* Batch send messages

* Multithread job queueing

* Reconfigure bulk enqueueing to utilize send_notifications.fifo queue

* Update the comment on QuaterlyNotificationsJob#perform

to adhere to the RDoc standard

* Use constants for template name

* Provide a more descriptive var name

* Remove unused env var

* Fix linting issues

* Prevent error from being thrown early in init job

* Add RDoc comments to appeal_state

* Add rdoc comment to init job

* Add another rdoc comment to the init job

* Use a more specific error class whenever an appeal

cannot be located within the init job

* Add a more specific error to CaseflowJob#enqueue_batch_of_jobs

* Add test for SendNotificationJob.queue_name_suffix

* Update QuarterlyNotificationsJob tests

* Update appeal_state_spec.rb to cover new scopes

* Add spec file for NotificationInitializationJob

* Add CaseflowJob specs

* Add CaseflowJob specs

* Address rubocop issue (by ignoring it)

* Kicking off CodeClimate

* Fix some lint issues

* Freeze constant

---------

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

* Move spec file to proper location

* APPEALS-43599 (#21696)

* APPEALS-43599 Refactoring SendNotificationJob

* APPEALS-43599 Remove comments

* APPEALS-43599 Suppress code smells from reek

* APPEALS-43599 Suppress code smells from reek

* jcohen/APPEALS-43727 (#21589)

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

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

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

* APPEALS-43727 commit before merge from teammates work

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

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

* APPEALS-43727 tests passing, code works

* APPEALS-43727 adding tests to appeal_state_spec to test functionality

* APPEALS-43727 rspec tests in appeal_state.

* APPEALS-43727 tests pass.

* Fixing code climate duplicate code issue

* fixing case statement

* code climate things

* rubocop

* APPEALS-43727 work completed.

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

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

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

* Adjust spacing of comments in appeal_state.rb

* Utilize #external_id method over ternary

* Swap or conditional for blank?

* Fix another whitespace gap

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

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

* Update app/models/concerns/appeal_concern.rb

* APPEALS-43727 code/test edits

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

* APPEALS-43727 lint fix

---------

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

* APPEALS-46179 (#21712)

* APPEALS-46179 Create JobExecutionTimes table

* APPEALS-46179 Add comment

* APPEALS-46179 Update schema

* APPEALS-46193 (#21753)

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

* APPEALS-46193 Updating JobExecutionTimes table with an upsert query

* APPEALS-46193 Ignore JobExecutionTimes for certain jobs

* APPEALS-46193 Update ignore_job_execution_time? method

* APPEALS-46193 Adding tests

* Fix lint issues

* Update AWS dependencies

* Rollback gem reduction due to UAT issue

* Alter queue priority

* Forward error in SendNotificationJob

* Allow for notification audit records to remain in ProdTest

* Fix spec

* Fix typo in test fixture's name

* Fix lint infraction related to re-raising exceptions

* Address duplication CC error

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

* Add conditional for FOIA and Privacy Act mail

task to receives 'Privacy Act Pending' notifications

* Update spec

* Adjust some specs

* Add missing param

---------

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

* Remove byebug from spec

* Revert queue tweak

* Remove duplicate method

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

* initial commit

* refactoring methods to have constants instead of methods

* adding comments back in

---------

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

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

* initial commit

* rubocop'n

* rubcop'n

* fixing tests

---------

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

* Resolve missed conflict

* MattT/APPEALS-48514 (#21959)

* Prototype of privacy act fix

* Leave privacy act states intact upon decision mailed

* Remove unused param

* Attempt updating specs to cover new behavior

* Fix attr name typo

* Add missing bang

* Skip reek issue

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

---------

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

* Fix quarterly specs by add in necessary hearings

* Adjust spacing/ordering of gems (#21978)

* MattT/APPEALS-49085 (#21960)

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

* Fix whitespace issues

* Fix failing specs caused by an oversight on my part

* Fix lint issue

---------

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

* MattT/APPEALS-49212 (#21991)

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

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

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

* Add comment to new method

* Use constant for disposition type

* Fix typo in accessor

* Add spec for new appeal state action

* Create user in top scope

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

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

* Add nightly sync job spec

* Add disp task spec

* Add specs targeting the hearings controller

* Add sync script

* Eager load constants

* Add distinct

* Remove appeal_docketed from being reset

* Add script to adjust ama hearing statuses

* Correct mistype

* Add appeal_type clause

* Fix specs

* Lint fixes

* Flip conditionals in specs

* Fix var name

* Fix var

---------

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

* Backfill addition to script

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

* APPEALS-48966 Adding AppealState record for recently docketed appeals

* APPEALS-48966 Refactor code and add comments

* Delete extraneous files

* Revert to using constants value

---------

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

* Fix typo

* Fix typo

* Fix seed script

* Fix seed script

* Ensure cleanup

* Change copy for Appeal Docketed status (#22006)

* Change copy for Appeal Docketed status

* Change case

---------

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

* Use status text value instead of key

---------

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

* add migration for appeal_affinities

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

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* Craig/appeals 44958 (#21564)

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

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

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

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

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

* add more tests

* test refactor

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

* disable new seed on reset

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

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

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

* swap distribution queries from distribution_task to appeal_affinities

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

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

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

* fix tests for date format update

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

* grabbed receipt dates from distributed cases

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

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

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

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

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

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

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

* add affinity start date to explain page

* add feature test to verify dates display

* update rake task and spec (#21731)

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

* add aod hearing cases to ama affinity cases seed

* fix lever spec

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

* initial imp. idea

* AC1: check for affinity_start_date on assignment

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

* updates to naming, instructions, and hook logic

* updates after review

* rspec coverage and addtional condition

* removed unused identifier

* removed reduntant 'self's

* added update on actual AA record

* updated to save aa record and addtional rspec

* added change to assignment on no record test

* check for assignment

* addd update to 'on_hold' status

* public method to handle legacy affinity appeals

* added .reload to :with_affinity_appeal

* added .reload to :ready_for_distribution

* updates to pass explain_spec

* switched boolean values

* typo

* readujsted order on :create for affinity appeal

* removed after(:create)

* testing rspec by readding after :create

* reloading in assertation

* addressing lint errors

* fix seeds/users_spec

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

* remove unnecessarily included module from job (#21827)

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

* rework ready_for_distribution scope

* fix non-hearing docket distribution bug

* restart tests

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

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

* prelim work on 48033

* refactored code a bit, working on data creation now

* created ama_affinity data

* fixing mispelt variable

* add back line that was removed

* updated users_spec to now pass

---------

Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Isaiah Saucedo <irsaucedo5@gmail.com>
Co-authored-by: Sean Parker <Sean.Parker3@va.gov>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
@craigrva craigrva changed the title Release/r.1.5.1 fy24 q3.5 Release R1.5.1 FY24Q3.5 Jun 25, 2024
Copy link

codeclimate bot commented Jun 25, 2024

Code Climate has analyzed commit 6ca18ab and detected 7 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 1
Security 1
Complexity 5

View more on Code Climate.

Copy link
Contributor

@roberttravispierce roberttravispierce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Release branch ready for merge to master.

@roberttravispierce roberttravispierce merged commit 02eb203 into master Jun 27, 2024
18 of 19 checks passed
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.

7 participants