Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appeals 23420 merged 2 #22847

Closed
wants to merge 62 commits into from
Closed

Appeals 23420 merged 2 #22847

wants to merge 62 commits into from

Conversation

ronwabVa
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?

calvincostaBAH and others added 30 commits April 30, 2024 09:36
* enabled cavc affinity levers in UI

* updated rspec
#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>
* 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
* 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
…ous 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>
…1611)

* 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
* 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
* 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
* add affinity start date to explain page

* add feature test to verify dates display
* 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
* fix query, tested locally

* add basic test to verify csv downloads aren't broken
…et 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
…VC (#21730)

* add aod hearing cases to ama affinity cases seed

* fix lever spec
* 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
* 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>
… remand original judge (#22070)

* CSV download functional

* add tests, fix CSV query in CaseDocket

* fix lint
* 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
…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
craigrva and others added 28 commits July 29, 2024 10:23
…eld (#22473)

* implement new hearing requirement and test

* first pass at seed data for testing

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

* update for new 8.2.1.1 requirement

* fix rubocop warning

* fix error in seed file

* add new affinity scenario to seed data

* make some seed methods private

* fix rubocop warnings
…lease) (#22776)

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

The following config settings are not backwards compatible:

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

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

* ✅ Fix flakey spec

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

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

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

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

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

For more details, see Jira story APPEALS-54897:

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

* ✨ Add new utility module for adding DB indexes concurrently

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

* 🗑️ Deprecate `Caseflow::Migration`

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

* 🚨 Address linter / codeclimate complaints

* ✨ Introduce `SslRedirectExclusionPolicy`

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

* ♻️ Replace deprecated controller-level `force_ssl`

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

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

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

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

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

* ⬆️ Update rails and other gems as necessary

* 🐛 Fix 'uninitialized constant' error when loading app

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* 🔧 Assume default for `ActiveSupport.utc_to_local_returns_utc_offset_times`

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

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

The default is safe to assume.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* 🔥 Remove 'new_framework_defaults_6_1.rb'

* 🔧 Load defaults for Rails 6.1

* ♻️ Extract constant

* ♻️ Migrate to new Rails deprecation config where applicable

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

* 🩹 Add forgotten disallowed deprecation warning

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

#21614

* 💡 Update comment

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

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

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

* 🚨 Exclude 'config.ru' from Rubocop cops

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

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

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

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

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

* 🔧 Add etl migration paths to DB config

* 🔧 Update DB connection names in 'database_cleaner' config

* ♻️ Use new database-specific rake tasks

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

* ➖ Remove 'multiverse' gem

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

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

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

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

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

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

* 💚 Remove redundant DB migrations from CI workflow

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

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

Addresses the following error:

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

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

Addresses the following error:

  FrozenError: can't modify frozen Hash: {}

* ✅ Add test for `RoSchedulePeriod`

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

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

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

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

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

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

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

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

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

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

Addresses failures such as the below:

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

       expected: "76"
            got: 0.76e2

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

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

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

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

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

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

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

See related GH issue: rails/rails#38040

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

Addresses error:

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

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

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

* 🐛 Fix `CaseSearchResultsBase` validations

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

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

       expected: "Veteran file number missing"
            got: nil

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

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

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

Addresses the test failure below:

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

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

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

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

This change was implemented in PR rails/rails#39461

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

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

Addresses multiple test failures caused by the error below:

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

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

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

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

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

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

       expected: 3
            got: 2

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

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

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

Addresses the following test failure:

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

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

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

Address the following error, found during demo deployment:

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

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

Removes `bourbon` and `neat` dependencies.
…on (#22787)

* feature/appeals-45972 (#21950)

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

* Remove UUID from attrs sent_to metrics.

* pushing with some linting issues for visibility.

* Change config implementation.

* Remove UUID from spec

* remove uuid from update_appellant job

* diable rubocop for open_telemetry init

* OTEL fixes

* rescue, errors

---------

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

* add otel reqs

* Remove throw

* comment out otel file loop

* try vendor suggested config

* update otel config to match vendor

* update pg gem

* otel include dt_host file

* otel require bundler and rubygems

* otel subset of instrumentation

* Revert "update pg gem"

This reverts commit fc1a45d.

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

* otel add use_all except pg and redis

* otel require instruments

* otel fix typo

* otel fix typo

* otel comment out net_http

* otel silence aws sdk internals

* otel silence aws sdk internals

* otel add net http

* Individually use OTEL instruments (#22082)

* Individually use OTEL instruments
with options.

* disable AwsSdk only. Checking Rack options.

* re-require awssdk even while disabled.

* disable awssdk

* disable datadog for testing

* change sequence factory to properly seed

* updated opentelemetry and datadog configs

* rack context getter initalizer

* use one at a time

* add curly braces

* Revert change

* revert change

* Revert change

* Revert change

* Remove gemfile grouping

* Remove datadog.

* ActionPack and Actionview changes

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

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

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

* automated test for the duplicate hearing bug

* fix rubocop offense SpaceInsideBlockBraces

---------

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

---------

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

* Update bundler to 2.4.22

* Updating OTEL to use all and remove new relic gem

* Remove calls to new relic

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

* Update config for otel

* Reorder gems to fix linting issues

* Updating config and refactoring verbose gems to add all

* Reinstall gems

* Adding all instruments

* Update config to only include basic instruments

* Update Gemfile.lock

* Adding rake to gemfile

* Adding instruments

* Comment out PG and ActiveSupport

* Suppress AWS logs

* Remove redis and turn on actionview

* Turn actionview off

* Add Redis instrumentation back

* Turn ActionPack back on

* Disable Redis

* Remove mentions of Datadog

* Removed extra mentions of Datadog

* removed newrelic references and yml file

* Test updating workflow

* Revert workflow change

* Adding simplecov back

* Fixing linting error

* Removing by: attribute after removing keyword in metric service

* Adding simplecov lcov gem and updating workflow

* Update workflow

* Updating simplecov

* Revert simple cov

* Adding featureenvy skip for reek

* Update service name. (#22762)

---------

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

* Remove extra newline

* APPEALS-51045: Remove ReceiveNotificationJob (#22207)

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

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

* Set local env to utilize FIFO queues where appropriate

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

* Resolve failing test

* Remove defunct test

* Update make commands

---------

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

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

* adding and running migration

* adding comments to migration and re running db:migrate

* pushing up original scheam

* committing schema

* small edit to migration and deleting unnecessary columns from schema

---------

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

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

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

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

* Alter status messages

* Save more info in fake response

* Swap keys

* Add missing param

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

* Fix fasterer issue

---------

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

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

* Update fake response body

* Try enabling localstack in CI

* Init SqsService and alter most/all of the ProcessNotificationStatusUpdatesJob

* Create SQS queues in test env

* Change port formatting

* Mount docker socket

* Try localstack hostname

* Wait for localstack in CI

* Add more yarddoc comments

* Log errors and number of messages processed

* Add custom error classes

* Add yarddoc comments to SqsService class

* Create SqsService spec file

* Redo much of ProcessNotificationStatusUpdatesJob's spec file

* Disable line length checks for yarddoc comments

---------

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

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

* initial push

* rubocop'n

* fixing tests?

* rubocop'n

* addressing most of matt's comments

* removing yard doc files and keeping comment

* rubocop

---------

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

* Remove extra attribute

* Fix incorrect log counts

* Fix log statement

* Fix typo

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

* initial commit

* making rspec tests happy

* linting

* adding tests back and refactoring

* small char error

---------

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

* Sync decided appeals with states table (#22434)

* APPEALS-52882 Sync decided appeals decision_mailed status

* APPEALS-52882 Fix lint issues

* APPEALS-52882 Fix codeclimate issues

* APPEALS-52882 Address PR feedback

* APPEALS-52882 Address PR feedback

* Jcohen/APPEALS-52861 (#22450)

* APPEALS-52861 Bug fix implemented.

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

* APPEALS-52861 fixed method name error.

* APPEALS-52861 fixed some tests.

* APPEALS-52861 fixed More tests.

* APPEALS-52861 fixed More tests.

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

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

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

---------

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

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

* initial commit

* addressing comments

* small change

* making tests
happy

* fixing spec tests

* rubocop'n

* reverting

---------

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

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

* APPEALS-55159

* updating tests

* APPEALS-55159 Refactor permitted and required params

* APPEALS-55159 Fix linting issue

---------

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

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

* APPEALS-52872 Add rake task to sync decided appeals

* APPEALS-52872 Remove byebug

* APPEALS-52872 Fixing lint errors

* APPEALS-52872 Addressing performance issues

* APPEALS-52872 Addressing performance issues

* APPEALS-52872 Fix ENV variable update

* APPEALS-52872 Parallelizing AppealState updates

* APPEALS-52872 Remove byebug

---------

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

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

* APPEALS-54918 Update VA Notify fake service and initializer

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

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

* APPEALS-54918 Add missing argument to method definition

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

* APPEALS-54918 Prevent post requests in test env

* Rename ApiKeys seed file

* Fix linting error on require statement

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

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

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

* APPEALS-57351 add template name check to handle errors

* APPEALS-57351 Add template_name argument to spec tests

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

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

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

* APPEALS-57351 Add specs requested during review

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

---------

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

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

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: noahhansen-gov <166541737+noahhansen-gov@users.noreply.github.com>
Co-authored-by: nhansen3 <noah.hansen1323@gmail.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: prernadevbah <132498915+prernadevbah@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <121630615+JCohDev@users.noreply.github.com>
Co-authored-by: Jonathan Cohen <cohen_jonathan@bah.com>
* Add in appeals_tied_to_non_ssc_avljs methods and SQL

* Update case_docket.rb

* Update case_docket.rb

* APPEALS-51263 added the lever to the seeds file (#22149)

* Amybids/appeals 51263 (#22169)

* APPEALS-51263 added the lever to the seeds file

* APPEALS-51263 test cleanup for case_docket, case_distribution_levers_controller_spec and case_distribution_test_data_spec.rb

* APPEALS-51262 (#22176)

* creates trait in factory for non_ssc_avlj user

* updates user in user factory with new traits in staff factory

* adds randomized judge method

* replaces user create with a vacols staff create and limits css_id to 12 using slogid, adds judge_role for active smemgrp

* updates naming

---------

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

* APPEALS-45232. Added table in the DB and added requested columns (#22223)

* APPEALS-45232. Added table in the DB and added requested columns

* APPEALS-45232. Fix lint issues

* APPEALS-45232. Fixed the class name

* APPEALS-45232. Updated the column names from feedback

---------

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

* Sharsha/appeals 45200 (#22233)

* APPEALS-45200. create Return Appeals tied to non-SSC AVLJs job

* APPEALS-45200. WIP

---------

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

* Chrisbdetlef/appeals 45208 (#22305)

* Framework for seeds

* Add comments and fill in further methods

* Further shared dev work

* Update names

* Expanded possible functions

* More functions for shared work

* Combine everyones work into main branch

* Combined work - testing

* Combined work - testing complete

* rubocop fix

---------

Co-authored-by: Christopher Detlef <>

* APPEALS-45202.Added button to trigger the job and return the appeals (#22375)

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

* Updates slack_service.rb to include local/demo console printout message (#22343)

* APPEALS-51487 Location 63 Query (#22398)

* APPEALS-51487 Location 63 Query

* fix naming and change query

* Working code

* Add 2 day limit to query

* Remove commented out code

* Fix lint issues

* Remove binding.pry

---------

Co-authored-by: Christopher Detlef <>

* APPEALS-45248 ACD Controls Test Page Alerts for Run Seed Fils and Case Movement Section Buttons (#22386)

* APPEALS-45248 Add success banner alerts to Run seed files and case movement section buttons

* APPEALS-45248 add fail job button and refactored code

* Ricky/APPEALS-45204 (#22373)

* Added button, and initial csv generation of appeals tied to non ssc avljs

* WIP. APPEALS-45204 tweaks to Push data into CSV

* APPEALS-45204. fix the method error

* APPEALS-45204. Lint fix

* Updated query to fetch hearing and grab non ssc avlj names properly

* Fixed outstanding issues and cleaned up seeds

* implements new hearing_judge, separates assigned_avlj and signing_avlj

* Fixed linting issues and other clean up

---------

Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Michael Beard <michael.beard@va.gov>

* Ricky/APPEALS-45204 (#22452)

* Added button, and initial csv generation of appeals tied to non ssc avljs

* WIP. APPEALS-45204 tweaks to Push data into CSV

* APPEALS-45204. fix the method error

* APPEALS-45204. Lint fix

* Updated query to fetch hearing and grab non ssc avlj names properly

* Fixed outstanding issues and cleaned up seeds

* implements new hearing_judge, separates assigned_avlj and signing_avlj

* Fixed linting issues and other clean up

* Updated name of CSV download button

---------

Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: Michael Beard <michael.beard@va.gov>

* Chrisbdetlef/appeals 54138 (#22460)

* APPEALS-51487 Location 63 Query

* fix naming and change query

* Working code

* Add 2 day limit to query

* Remove commented out code

* Fix lint issues

* Remove binding.pry

* APPEALS-54138 Add button to seed non-SSC AVLJs

---------

Co-authored-by: Christopher Detlef <>

* Fix for routing table (#22466)

Co-authored-by: Christopher Detlef <>

* Chrisbdetlef/appeals 54138.1 (#22486)

* Fix for routing table

* Randomly select docket id number

---------

Co-authored-by: Christopher Detlef <>

* Updated query to correctly grab seed data (#22489)

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

* Ricky/APPEALS-51260 (#22497)

* Updated query to correctly grab seed data

* Replaced AOD and CAVC fields with Priority, fixed csv file name

---------

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

* APPEALS-54884. spec fix push priority appeals to judges job (#22505)

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

* exchanges spaces for hyphens, updates method to filter by unique veteran file numbers (#22524)

* updates seed file names to match AC and adds hyphens instead of spaces (#22530)

* Chrisbdetlef/appeals 54152 (#22531)

* APPEALS-54152 Move Appeals to loc 63

* Fix minor issues with the query and data displayed in the CSV

* APPEALS-54152 Move qualifying appeals to Loc 63

---------

Co-authored-by: Christopher Detlef <>

* APPEALS-54152.1 Fix issues with the process of making and moving appeals tied to nonSSC AVLJs (#22541)

Co-authored-by: Christopher Detlef <>

* Chrisbdetlef/appeals 54152.1 (#22544)

* APPEALS-54152.1 Fix issues with the process of making and moving appeals tied to nonSSC AVLJs

* TEST ONLY DO NOT MERGE

---------

Co-authored-by: Christopher Detlef <>

* Chrisbdetlef/appeals 54152.2 (#22554)

* APPEALS-54152.2 Change movement to loc 63 to 2 per AVLJ

* Fix lint issues and errors

* Remove artifact code

* Fix errors

---------

Co-authored-by: Christopher Detlef <>

* Code changes to account for duplicates from base query (#22582)

* Code changes to account for duplicates from base query

* Add warning to join constant

* Fix issue with empty array

---------

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

* mbeard/APPEALS-45203 (#22565)

* refactored to include new move_qualifying_appeals method

* updated filtered methods and eligible appeals, moved appeals variables

* moves logic for eligible and moved appeals into new method

* cleaned up filter_method, simplified other methods

* updates to failing test

* ensures appeals isn't nil when job is complete

* Fix the last name issue on loc 63 CSV (#22591)

Co-authored-by: Christopher Detlef <>

* APPEALS-45248 v2 ACD Controls Test Page Alerts for Run Seed Fils and Case Movement Section Buttons (#22449)

* APPEALS-45248 Add success banner alerts to Run seed files and case movement section buttons

* APPEALS-45248 add fail job button and refactored code

* APPEALS-45248 address ac2 of the story and set timer for banner alerts

* APPEALS-45248-v2 update button verbiage

* APPEALS-54061 added collapsible table to see the 15 latest ReturnLegacyAppealsToBoard log on test page

* APPEALS-54061 refactor code to address modified AC in the story

* fixed linting issues

* some lint fixes

---------

Co-authored-by: 631966 <amy.detwiler@va.gov>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>

* APPEALS-APPEALS-55680 added nil checking to the return legacy to appe… (#22607)

* APPEALS-APPEALS-55680 added nil checking to the return legacy to appeals to board job

* APPEALS-55680 finish job if no moved appeals

* APPEALS-55680 made the no record slack message into an array

* APPEALS-55680 fixed rubocop issues

* mbeard/APPEALS-55179 (#22615)

* adds constants and updates method to use constant

* changes lever_group

* APPEALS-55179. Fix the query and update the Constant value

* updates method and puts constants to lowercase

* adds nonsscavlj_number_of_appeals_to_move to failing spec array

---------

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

* mbeard/APPEALS-45203 (#22626)

* removes avljs from the slack message

* updates to slack messages

* APPEALS-54290 CSV for all tied VLJ cases (#22624)

Co-authored-by: Christopher Detlef <>

* APPEALS-56033 fixed duplicate, nil, and error handling

* APPEALS-56033 fixed duplicate, nil, and error handling (#22630)

* APPEALS-56033 fix job running on frontend

* APPEALS-56033 fixed linting error

* Amybids/appeals 56033 (#22635)

* APPEALS-56033 fixed duplicate, nil, and error handling

* APPEALS-56033 fix job running on frontend

* APPEALS-56033 fixed linting error

* Fix off by 1 error for returntoboard job (#22648)

* Fix off by 1 error for returntoboard job

* removed the extraneous space

* refactored the variables

* refactored variable names to fix rubocop issues

---------

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

* mbeard/APPEALS-55660 (#22653)

* Updates test coverage for full perform method

* fixed linting issues

* updates to receive and return a number of appeals moved

* updates value from 10 to 2 moved appeals

* adds trait to factory and lever to push priority spec

* APPEALS-56980 Fix for .perform_later functionality in higher environm… (#22671)

* APPEALS-56980 Fix for .perform_later functionality in higher environments

* Remove lines of code that aren't needed and add built in checker

* Fix 1 of 2 errors

* Move local variables out of intialize or callback methods

---------

Co-authored-by: Christopher Detlef <>

* APPEALS-55158 removed the skipped specs to make the test suite pass (#22651)

* Chrisbdetlef/appeals 54290 (#22647)

* APPEALS-54290 CSV for all tied VLJ cases

* Added support for AMA appeals

* Fix linting issues

---------

Co-authored-by: Christopher Detlef <>

* ricky/APPEALS-55123 (#22617)

* Added VLJ and Inactive Non-SSC AVLJ seeds

* Updated seeds to include signed and unsigned AMA appeals

* Fixed AMA hearing to not error on creation

---------

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

* Added docket back because sym doesn't provide the same information

* APPEALS-57322 Add logging for Not Ready to Distribute appeals (#22722)

* APPEALS-57322 Add logging for Not Ready to Distribute appeals

* Remove binding pry

---------

Co-authored-by: Christopher Detlef <>

* Change the button label (#22723)

* Change the button label

* Remove binding pry

---------

Co-authored-by: Christopher Detlef <>

* fix appeals ready to distribute

* Change the name of the SSC AVLJ (#22728)

* Change the name of the SSC AVLJ

* Remove binding pry

---------

Co-authored-by: Christopher Detlef <>

* APPEALS-57428. Update job log when job completes with no records (#22736)

* APPEALS-57428. Update job log when job completes with no records

* APPEALS-57428. Job stops if the returned appeals is nil

---------

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

* reverted work so that the legacy rows show up as NA (#22744)

* Sharsha/tes branch master (#22772)

* APPEALS-57428.Update job log when job completes with no records

* Upmerge master

* spec fix

* fixed some bug errors

* fixed linting issue

---------

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

* APPEALS-57711. fix the ama_rows logc (#22775)

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

* APPEALS-57801 Fix merging error (#22781)

* APPEALS-57801 Fix merging error

* rubocop fix

---------

Co-authored-by: Christopher Detlef <>

* APPEALS-57058. Automated Tests for the Queries (#22791)

* APPEALS-57058. WIP - check loc_63_appeals

* APPEALS-57058. more test coverage

---------

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

* Ricky/APPEALS-57057 (#22801)

* Created outline for CSV test for appeals tied to non ssc avljs

* Updated rspec for appeals tied to non ssc avlj to have full coverage

* Created initial spec file for appeeals tied to avljs and vljs query

* Added testing support appeals_tied_to_avljs_and_vljs_query

* Updated testing on appeals_tied_to_avlj_and_vljs

* Updated framework on location 63 appeals CSV rspec testing

* Fixed base test for appeals in location 63 CSV

* Updated data structure to properly check test

* Updated location 63 CSV to have full coverage

* Fixed linting

* Chrisbdetlef/appeals 55660 (#22798)

* Psuedo code for specs

* Framework for tests

* Split work

* APPEALS-55660. Test expansion (#22714)

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

* APPEALS-55660 Expanded test coverage for ReturnToBaordJob

* Combine work

* Fix linting and add some error handling

---------

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

* Chrisbdetlef/appeals 58192 (#22832)

* APPEALS-58192 Fix location 63 query test

* Fix rubocop issues

---------

Co-authored-by: Christopher Detlef <>

* fixed the migration inheritence

---------

Co-authored-by: Matthew Roth <roth_matthew@bah.com>
Co-authored-by: Blake Manus <33578594+Blake-Manus@users.noreply.github.com>
Co-authored-by: Michael Beard <michael.beard@va.gov>
Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: cdetlefva <133903625+cdetlefva@users.noreply.github.com>
Co-authored-by: Michael Beard <131783726+mbeardy@users.noreply.github.com>
Co-authored-by: kristeja <112115264+kristeja@users.noreply.github.com>
  Add search query service for the api response for the `/search` page
  Add restricted_statuses solution and initial RSpec test file

  Fix positioning of restricted_statuses array to under set_type

  Make modification that only prevents non-board users from viewing the assigned_to_location CSS IDs

  Only prevent vso employees/Private attorneys from viewing CSS IDs in restricted status state

  Refactor comment to better explain what is happening, and add proper staging to RSpec file

  Make restricted statuses array immutable

  Add more extensive test coverage (every restricted status type)
Merge branch 'prodtest/FY24Q4.5.0' into APPEALS-23420-merged
  Add search query service for the api response for the `/search` page
  Add restricted_statuses solution and initial RSpec test file

  Fix positioning of restricted_statuses array to under set_type

  Make modification that only prevents non-board users from viewing the assigned_to_location CSS IDs

  Only prevent vso employees/Private attorneys from viewing CSS IDs in restricted status state

  Refactor comment to better explain what is happening, and add proper staging to RSpec file

  Make restricted statuses array immutable

  Add more extensive test coverage (every restricted status type)
…ans-affairs/caseflow into APPEALS-23420-merged
@ronwabVa ronwabVa closed this Sep 16, 2024
@ronwabVa ronwabVa deleted the APPEALS-23420-merged-2 branch September 16, 2024 13:53
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.