)
- } />
{children}
;
diff --git a/client/app/components/SearchBar.stories.mdx b/client/app/components/SearchBar.stories.mdx
index 642b75ac6cf..ec6b174bda9 100644
--- a/client/app/components/SearchBar.stories.mdx
+++ b/client/app/components/SearchBar.stories.mdx
@@ -56,7 +56,7 @@ Labels can be set with the `title` property.
## Internal Text
Text can be set and shown inside of the search bar with the `internalText` property. This can be used to show extra
-information about the search. Check out [`DocumentSearch#getInternalText`](https://github.com/department-of-veterans-affairs/caseflow/blob/main/client%2Fapp%2Freader%2FDocumentSearch.jsx#L118)
+information about the search. Check out [`DocumentSearch#getInternalText`](https://github.com/department-of-veterans-affairs/caseflow/blob/master/client%2Fapp%2Freader%2FDocumentSearch.jsx#L118)
to see how we change this field dynamically as the user types to display the number of results.
@@ -82,4 +82,4 @@ disabled and shows a loading icon while waiting for results.
## Args
-
+
\ No newline at end of file
diff --git a/client/app/components/StyleGuideComponentTitle.jsx b/client/app/components/StyleGuideComponentTitle.jsx
index f286906d9cd..ba86ade3691 100644
--- a/client/app/components/StyleGuideComponentTitle.jsx
+++ b/client/app/components/StyleGuideComponentTitle.jsx
@@ -20,7 +20,7 @@ export default class StyleGuideComponentTitle extends React.PureComponent {
// isExternalLink is for any code sample that's outside the StyleGuide container directory
baseUrl = 'https://github.com/department-of-veterans-affairs/caseflow';
} else {
- baseUrl = 'https://github.com/department-of-veterans-affairs/caseflow/blob/main/client/app/containers/StyleGuide/';
+ baseUrl = 'https://github.com/department-of-veterans-affairs/caseflow/blob/master/client/app/containers/StyleGuide/';
}
/* eslint-enable max-len */
diff --git a/client/app/components/TableFilter.jsx b/client/app/components/TableFilter.jsx
index 248903e4fb4..bccd70ce974 100644
--- a/client/app/components/TableFilter.jsx
+++ b/client/app/components/TableFilter.jsx
@@ -75,11 +75,7 @@ class TableFilter extends React.PureComponent {
});
// Case insensitive ordering for the filter options
- return _.orderBy(
- filterOptionsFromApi.filter((option) => option.displayText),
- [(option) => option.displayText.toLowerCase()],
- ['asc']
- );
+ return _.orderBy(filterOptionsFromApi, [(option) => option.displayText.toLowerCase()], ['asc']);
}
const columnValues = tableDataByRow.map((obj) => {
diff --git a/client/app/containers/StyleGuide/StyleGuideDashboard.jsx b/client/app/containers/StyleGuide/StyleGuideDashboard.jsx
index 13c7448983c..547406d7f57 100644
--- a/client/app/containers/StyleGuide/StyleGuideDashboard.jsx
+++ b/client/app/containers/StyleGuide/StyleGuideDashboard.jsx
@@ -8,7 +8,7 @@ export default class StyleGuideDashboard extends React.PureComponent {
- Claim cannot be processed until decision date is entered.
-
-
+
+ Claim cannot be processed until decision date is entered.
+
-
-
- Claim created.
-
-
+
+ Claim created.
+
diff --git a/client/yarn.lock b/client/yarn.lock
index c844f0e37f6..d83474f96f3 100644
--- a/client/yarn.lock
+++ b/client/yarn.lock
@@ -2529,9 +2529,9 @@
exec-sh "^0.3.2"
minimist "^1.2.0"
-"@department-of-veterans-affairs/caseflow-frontend-toolkit@https://github.com/department-of-veterans-affairs/caseflow-frontend-toolkit#fa44cf3e":
+"@department-of-veterans-affairs/caseflow-frontend-toolkit@https://github.com/department-of-veterans-affairs/caseflow-frontend-toolkit#a98b291":
version "2.6.1"
- resolved "https://github.com/department-of-veterans-affairs/caseflow-frontend-toolkit#fa44cf3e009280d39275f16150990f8749b4818a"
+ resolved "https://github.com/department-of-veterans-affairs/caseflow-frontend-toolkit#a98b29188aaf2d85f7af749eda95cc02ed1282d2"
dependencies:
classnames "^2.2.5"
glamor "^2.20.40"
diff --git a/config/boot.rb b/config/boot.rb
index 9b06e9b8a7f..54cda1cdcc7 100644
--- a/config/boot.rb
+++ b/config/boot.rb
@@ -1,9 +1,5 @@
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
ENV["NLS_LANG"] = "AMERICAN_AMERICA.UTF8"
-require 'bundler/setup' # Set up gems listed in the Gemfile.
-require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
-
-# Pull this in before any other non-bundler/bootsnap gem to avoid SIGSEGV
-# during Oracle connection setup on arm64 architecture.
-require 'ruby-oci8'
+require "bundler/setup" # Set up gems listed in the Gemfile.
+require "bootsnap/setup" # Speed up boot time by caching expensive operations.
diff --git a/config/routes.rb b/config/routes.rb
index e0f15ef5319..3b14fac4202 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -302,7 +302,6 @@
post 'edit_ep', on: :member
end
match '/supplemental_claims/:claim_id/edit/:any' => 'supplemental_claims#edit', via: [:get]
- get '/remands(/*path)', to: redirect('/supplemental_claims/%{path}')
resources :decision_reviews, param: :business_line_slug do
resources :tasks, controller: :decision_reviews, param: :task_id, only: [:show, :update] do
diff --git a/db/migrate/20240716143816_add_type_column_and_index_to_supplemental_claims_for_remand_inheritance.rb b/db/migrate/20240716143816_add_type_column_and_index_to_supplemental_claims_for_remand_inheritance.rb
deleted file mode 100644
index f5e08799f29..00000000000
--- a/db/migrate/20240716143816_add_type_column_and_index_to_supplemental_claims_for_remand_inheritance.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-class AddTypeColumnAndIndexToSupplementalClaimsForRemandInheritance < ActiveRecord::Migration[6.1]
- include Caseflow::Migrations::AddIndexConcurrently
-
- def change
- safety_assured do
- add_column :supplemental_claims, :type, :string, default: "SupplementalClaim", null: false, comment: "The class name for the single table inheritance type of Supplemental Claim for example Remand"
- end
-
- add_safe_index :supplemental_claims, [:type], name: "index_supplemental_claims_on_type"
- end
-end
diff --git a/db/migrate/20240805154526_create_remands_view.rb b/db/migrate/20240805154526_create_remands_view.rb
deleted file mode 100644
index 80922efa246..00000000000
--- a/db/migrate/20240805154526_create_remands_view.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-class CreateRemandsView < ActiveRecord::Migration[6.1]
- def up
- safety_assured do
- execute <<-SQL
- CREATE VIEW remands AS
- SELECT *
- FROM supplemental_claims
- WHERE type = 'Remand';
- SQL
- end
- end
-
- def down
- safety_assured do
- execute <<-SQL
- DROP VIEW remands;
- SQL
- end
- end
-end
diff --git a/db/schema.rb b/db/schema.rb
index fb88838b8ac..3afc92fdb92 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -1877,13 +1877,11 @@
t.boolean "filed_by_va_gov", comment: "Indicates whether or not this form came from VA.gov"
t.boolean "legacy_opt_in_approved", comment: "Indicates whether a Veteran opted to withdraw their Supplemental Claim request issues from the legacy system if a matching issue is found. If there is a matching legacy issue and it is not withdrawn, then that issue is ineligible to be a new request issue and a contention will not be created for it."
t.date "receipt_date", comment: "The date that the Supplemental Claim form was received by central mail. Only issues decided prior to the receipt date will show up as contestable issues. It is also the claim date for any associated end products that are established. Supplemental Claims do not have the same timeliness restriction on contestable issues as Appeals and Higher Level Reviews."
- t.string "type", default: "SupplementalClaim", null: false, comment: "The class name for the single table inheritance type of Supplemental Claim for example Remand"
t.datetime "updated_at"
t.uuid "uuid", default: -> { "uuid_generate_v4()" }, null: false, comment: "The universally unique identifier for the Supplemental Claim. Can be used to link to the claim after it is completed."
t.string "veteran_file_number", null: false, comment: "PII. The file number of the Veteran that the Supplemental Claim is for."
t.boolean "veteran_is_not_claimant", comment: "Indicates whether the Veteran is the claimant on the Supplemental Claim form, or if the claimant is someone else like a spouse or a child. Must be TRUE if the Veteran is deceased."
t.index ["decision_review_remanded_type", "decision_review_remanded_id"], name: "index_decision_issues_on_decision_review_remanded"
- t.index ["type"], name: "index_supplemental_claims_on_type"
t.index ["updated_at"], name: "index_supplemental_claims_on_updated_at"
t.index ["uuid"], name: "index_supplemental_claims_on_uuid"
t.index ["veteran_file_number"], name: "index_supplemental_claims_on_veteran_file_number"
diff --git a/db/seeds/hearings.rb b/db/seeds/hearings.rb
index 6209ea3717f..dcb94aa4972 100644
--- a/db/seeds/hearings.rb
+++ b/db/seeds/hearings.rb
@@ -285,12 +285,14 @@ def created_by_user
# rubocop:disable Metrics/MethodLength
def create_hearing_subtree(appeal, hearing)
root_task = create(:root_task, appeal: appeal)
-
- distribution_task = create(:distribution_task, appeal: appeal, parent: root_task) if appeal.is_a?(Appeal)
-
+ distribution_task = create(
+ :distribution_task,
+ appeal: appeal,
+ parent: root_task
+ )
parent_hearing_task = create(
:hearing_task,
- parent: appeal.is_a?(Appeal) ? distribution_task : root_task,
+ parent: distribution_task,
appeal: appeal
)
diff --git a/db/seeds/veterans_health_administration.rb b/db/seeds/veterans_health_administration.rb
index c3161f82d72..9183c93352e 100644
--- a/db/seeds/veterans_health_administration.rb
+++ b/db/seeds/veterans_health_administration.rb
@@ -54,7 +54,6 @@ def create_supplemental_claims
3.times do
CLAIMANT_TYPES.each do |claimant_type|
create_sc_with_claimant(benefit_type, claimant_type)
- create_sc_remand(benefit_type, claimant_type)
end
end
end
@@ -63,7 +62,6 @@ def create_supplemental_claims
def create_hlr_with_claimant(benefit_type, claimant_type)
hlr = create(
:higher_level_review,
- :with_intake,
:with_request_issue,
:processed,
benefit_type: benefit_type,
@@ -76,7 +74,6 @@ def create_hlr_with_claimant(benefit_type, claimant_type)
def create_sc_with_claimant(benefit_type, claimant_type)
sc = create(
:supplemental_claim,
- :with_intake,
:with_request_issue,
:processed,
benefit_type: benefit_type,
@@ -86,16 +83,6 @@ def create_sc_with_claimant(benefit_type, claimant_type)
sc.create_business_line_tasks!
end
- def create_sc_remand(benefit_type, claimant_type)
- sc = create(
- :remand,
- benefit_type: benefit_type,
- claimant_type: claimant_type,
- number_of_claimants: 1
- )
- sc.create_business_line_tasks!
- end
-
# :reek:NestedIterators
# this method is creating most of the data, but we can't get around it because of how many PO/VISN combos there are
def create_vha_visn_pre_docket_queue
diff --git a/docs/tech-specs/2018-05-18-hearing-schedule.md b/docs/tech-specs/2018-05-18-hearing-schedule.md
index 076c8c5c97d..5a51355e4b3 100644
--- a/docs/tech-specs/2018-05-18-hearing-schedule.md
+++ b/docs/tech-specs/2018-05-18-hearing-schedule.md
@@ -1,11 +1,11 @@
-This document was moved from [appeals-team](https://github.com/department-of-veterans-affairs/appeals-team/blob/main/Project%20Folders/Caseflow%20Projects/Hearings/Hearing%20Schedule/Tech%20Specs/HearingSchedule.md).
+This document was moved from [appeals-team](https://github.com/department-of-veterans-affairs/appeals-team/blob/master/Project%20Folders/Caseflow%20Projects/Hearings/Hearing%20Schedule/Tech%20Specs/HearingSchedule.md).
## Caseflow Hearing Schedule
-Owner: Sharon Warner
-Date: 2018-05-18
-Reviewer(s):
-Review by:
+Owner: Sharon Warner
+Date: 2018-05-18
+Reviewer(s):
+Review by:
## Context
@@ -64,9 +64,9 @@ Because of the tight deadline, and the amount of data we need to input, we're go
1) Hearings allocation
1) Judge non-availability dates
-The RO non-availability dates, board non-availability dates, and hearings allocation will be uploaded together semi-annually, and the judge non-availability dates will be uploaded separately quarterly. The spreadsheet templates can be found [here](https://github.com/department-of-veterans-affairs/appeals-team/tree/main/Project%20Folders/Caseflow%20Projects/Hearings/Hearing%20Schedule/Designs).
+The RO non-availability dates, board non-availability dates, and hearings allocation will be uploaded together semi-annually, and the judge non-availability dates will be uploaded separately quarterly. The spreadsheet templates can be found [here](https://github.com/department-of-veterans-affairs/appeals-team/tree/master/Project%20Folders/Caseflow%20Projects/Hearings/Hearing%20Schedule/Designs).
-We will pull already-scheduled video and central office hearings and travel board hearings from VACOLS.
+We will pull already-scheduled video and central office hearings and travel board hearings from VACOLS.
## Overview - December Release
@@ -98,29 +98,29 @@ The NonAvailability table will include information for all three types of non-av
Each time a valid spreadsheet is uploaded, we'll record the dates that spreadsheet covers in SchedulePeriods. If a user uploads a second spreadsheet of the same type that covers date that have already been uploaded, we'll check to see if Finalized for the original spreadsheet is true or false. If Finalized is true, that means the information has already been uploaded to VACOLS, and we'll tell the user that they cannot re-upload a spreadsheet for those dates. If Finalized is false, we'll tell the user that they have already uploaded a spreadsheet for those dates and ask if they want to proceed. If the user wants to proceed, we'll delete all information associated with the original spreadsheet and then upload the new spreadsheet.
-We'll also check the following validations for each spreadsheet. If the uploaded spreadsheet breaks any of these validations, we'll ask the user to fix the error and re-upload the spreadsheet.
-
-1) The headers much match the template exactly.
+We'll also check the following validations for each spreadsheet. If the uploaded spreadsheet breaks any of these validations, we'll ask the user to fix the error and re-upload the spreadsheet.
+
+1) The headers much match the template exactly.
1) All dates should all be in this format: mm/dd/yyyy.
1) All dates should be within the date range specified by the hearing coordinator.
*RO Non-Availability*
-1) All BFREGOFF codes should match the city, state we have listed in regional_office.rb.
-1) Every RO listed in regional_office.rb should have a column.
-1) The dates listed for each RO should be unique.
+1) All BFREGOFF codes should match the city, state we have listed in regional_office.rb.
+1) Every RO listed in regional_office.rb should have a column.
+1) The dates listed for each RO should be unique.
*CO Non-Availability*
-
-1) The dates should be unique.
+
+1) The dates should be unique.
*Judge Non-Availability*
-1) The CSS id and judge name should match what we already have stored in our database.
-
-*Hearing Allocations*
+1) The CSS id and judge name should match what we already have stored in our database.
-1) All BFREGOFF codes should match the city, state we have listed in regional_office.rb.
-1) Every RO listed in regional_office.rb should have a row.
+*Hearing Allocations*
+
+1) All BFREGOFF codes should match the city, state we have listed in regional_office.rb.
+1) Every RO listed in regional_office.rb should have a row.
**User Permissions (May)**
@@ -155,7 +155,7 @@ We'll create two new buckets within the dsva-appeals-caseflow-prod bucket to sto
2. 2nd source is the travel board dates fetched from VACOLS
4. Divide the number of hearing days for each RO by the number of months selected in the timeframe. (RO1: 12 for 6 months ) -> 2 days per month.
1. It’s preferred to have RO hearing days distributed among the selected months (example: if an RO has 2 hearing days; it’s preferred to have each hearing day distributed among different months)
- 2. A priority is given for ROs that have multiple rooms available since they can hold more hearings per day
+ 2. A priority is given for ROs that have multiple rooms available since they can hold more hearings per day
3. It’s preferred to have whole number hearing days even if the hearing days cannot be evenly distributed ~ (if an RO has 25 hearing days, 25/6 = 4.16, each month shall have at least 4 hearing days for this RO and the remainder of days can be distributed among random months selected based on the calendar days available to the RO).
4. If the RO hearing days cannot be distributed evenly among the selected months due to increased non-availability days for the month, the remaining hearings are distributed through out the other months based on the available calendars days for the RO)
5. Select a random RO available date in the month to assign each of the divided RO hearing days.
@@ -194,8 +194,8 @@ To support querying for Travel Board hearings we need to add the following opera
2. If a judge is on a travel board, it’s for an entire week
1. No RO hearing days can be allocated to that judge a week prior or after the travel board week.
-Notes:
-There are three options for allocating judges:
+Notes:
+There are three options for allocating judges:
1. Shuffle the judges and allocate the hearing days one at a time to all the judges (It doesn't verify complete balance, since it's randomized for the current scheduled period)
2. Fetch all hearing days for all judges for the current federal fiscal year, allocate the hearing days to initially to the judges with the least amount of hearings to make sure the hearing days are evently distributed to all judges.
@@ -214,7 +214,7 @@ Example error:
**August Rollout**
-Unfortunately, the hearing coordinators are required to build the schedule for the first six months of FY2019 before our August 1st roll-out date. However, the hearing coordinators will use Caseflow to assign those hearing days to judges and to build the schedule for the second six months of FY2019.
+Unfortunately, the hearing coordinators are required to build the schedule for the first six months of FY2019 before our August 1st roll-out date. However, the hearing coordinators will use Caseflow to assign those hearing days to judges and to build the schedule for the second six months of FY2019.
We will also create a test case that the hearing coordinators can use to create a mock hearing schedule for the first six months of FY2019. They can compare this mock schedule to the schedule they have already manually created to confirm the scheduling is working as expected.
diff --git a/docs/tech-specs/2018-06-21-vacols-caseflow-transition.md b/docs/tech-specs/2018-06-21-vacols-caseflow-transition.md
index 001e937ad2a..bb0331ed2e9 100644
--- a/docs/tech-specs/2018-06-21-vacols-caseflow-transition.md
+++ b/docs/tech-specs/2018-06-21-vacols-caseflow-transition.md
@@ -1,16 +1,16 @@
-This document was moved from [appeals-team](https://github.com/department-of-veterans-affairs/appeals-team/blob/main/Project%20Folders/Caseflow%20Projects/Hearings/Hearing%20Schedule/Tech%20Specs/VacolsCaseflowTransition.md).
+This document was moved from [appeals-team](https://github.com/department-of-veterans-affairs/appeals-team/blob/master/Project%20Folders/Caseflow%20Projects/Hearings/Hearing%20Schedule/Tech%20Specs/VacolsCaseflowTransition.md).
-## VACOLS to Caseflow Transition
+## VACOLS to Caseflow Transition
-Owner: Oscar Ramirez
-Date: 2018-06-21 (Updated 2018-08-08)
-Reviewer(s): Sharon Warner, Alex Prokop
-Review by: 2018-08-13
+Owner: Oscar Ramirez
+Date: 2018-06-21 (Updated 2018-08-08)
+Reviewer(s): Sharon Warner, Alex Prokop
+Review by: 2018-08-13
## Context
-Once the AMA legislation goes live on February 14, 2019 the Board will assign appeals to specific hearing days, taking over a task performed by regional offices today. This technical specification outlines the events that need to take place to make this transition of responsibilities as smooth as possible
+Once the AMA legislation goes live on February 14, 2019 the Board will assign appeals to specific hearing days, taking over a task performed by regional offices today. This technical specification outlines the events that need to take place to make this transition of responsibilities as smooth as possible
-## Overview
+## Overview
AMA appeals are any appeals processed under the workflow defined by the new legislation. AMA appeals will be processed exclusively in Caseflow, while Legacy appeals will continue to be stored in the VACOLS database. New Legacy Appeals may continue to flow into the system after February of 2019 as Veterans have up to a year to appeal a claim.
For the August 2018 release of the Hearing Schedule product the calendar of hearing days allocated to regional offices will be stored in VACOLS. Regional offices will continue to manage slotting appeals to hearing days using the VACOLS UI.
@@ -21,7 +21,7 @@ When the AMA legislation is in place the calendar of hearing days will be stored
This hearing type is discontinued for AMA appeals but we need to continue to support it while there are legacy appeals that chose this hearing in the system.
-A Travel Board Hearing Schedule is very different than the next two types of hearings. They are organized in trips that last several days. Each trip has one or more participants. The participants are one or more judges, and possibly one or more attorneys.
+A Travel Board Hearing Schedule is very different than the next two types of hearings. They are organized in trips that last several days. Each trip has one or more participants. The participants are one or more judges, and possibly one or more attorneys.
**Central Office Hearings**
@@ -33,7 +33,7 @@ These hearings will continue with the AMA legislation. The Veteran travels to a
The Board allocates a certain number of hearing days for a Fiscal Year to each regional office based on the number of appeals requiring hearings.
-The ER diagram below highlights the different data attributes for each hearing type.
+The ER diagram below highlights the different data attributes for each hearing type.
![Data Model](2018-06-21-hearing-schedule-data-model.png)
@@ -79,28 +79,28 @@ Once AMA hearings start, the audio files for these hearings may have to be store
## Reports
The Hearing Management team is reviewing the existing reports to let us know which continue to be valid and need migration to Caseflow. Their review is ongoing as of this writing. A cursory review of the applications used by the Regional Offices and by Hearing Management reveals the following reports. There may be more but these are the obvious ones directly dealing with hearings data.
-vclrpts app
-Custom Rpts --> CO, Travel Board, Video Request Summary
-Annual Rpts --> BVA Hearings Held
-
-Vacols3 app
-Hearings --> Video Hearings
-Hearings --> Travel Board Hearings
-Hearings --> CO Hearings
-
-Roaccess
-Hearings --> Travel Board Requests
-Hearings --> Formal Hearings Pending
-Hearings --> Formal Hearing Disposition Detail
-Hearings --> Forman Hearing Disposition Summary
-Hearings --> Certified BVA Awaiting Travel Board
-Hearings --> BVA VLJs --> Update Travel Board Docket
-Hearings --> BVA VLJs --> Update Video Docket <-- Are these used by VLJs or Hearing Coordinators?
-Hearings --> BVA VLJs --> Update / Print CO Docket
-Hearings --> View/Print Virtual TB or Video Docket
-
-Mgmt Rpts --> BVA Hearing Schedule (TB, Video, CO)
-Mgmt Rpts --> BVA Hearing Disposition Summary by RO
+vclrpts app
+Custom Rpts --> CO, Travel Board, Video Request Summary
+Annual Rpts --> BVA Hearings Held
+
+Vacols3 app
+Hearings --> Video Hearings
+Hearings --> Travel Board Hearings
+Hearings --> CO Hearings
+
+Roaccess
+Hearings --> Travel Board Requests
+Hearings --> Formal Hearings Pending
+Hearings --> Formal Hearing Disposition Detail
+Hearings --> Forman Hearing Disposition Summary
+Hearings --> Certified BVA Awaiting Travel Board
+Hearings --> BVA VLJs --> Update Travel Board Docket
+Hearings --> BVA VLJs --> Update Video Docket <-- Are these used by VLJs or Hearing Coordinators?
+Hearings --> BVA VLJs --> Update / Print CO Docket
+Hearings --> View/Print Virtual TB or Video Docket
+
+Mgmt Rpts --> BVA Hearing Schedule (TB, Video, CO)
+Mgmt Rpts --> BVA Hearing Disposition Summary by RO
**NB: Outcome of Hearing Management report review may affect the data model as additional attributes may need to be associated with either individual hearings or the schedule.**
@@ -112,7 +112,7 @@ Mgmt Rpts --> BVA Hearing Disposition Summary by RO
- appeal_id - how do we associate to both LegacyAppeal and Appeal models.
- How is team assigned? Do we need it? In VACOLS UI the team field is populated based on what is on the staff table for the judge.
- Remove veteran_id as this information can be fetched from the appeal.
-- Remove media_type? For hearings since September 2017 there were 25 which used cassette tape.
+- Remove media_type? For hearings since September 2017 there were 25 which used cassette tape.
- Rename media_problem to recording_problem.
- Rename hold_days_vlj to hold_days. Does it generate an alert after n days?
- Separate hearing prep data from hearings data? When appeal is rescheduled do we want to keep the hearings detail data? We would move the hearings row and associate it with another HearingDay row.
diff --git a/docs/tech-specs/2018-08-16-slotting-veterans.md b/docs/tech-specs/2018-08-16-slotting-veterans.md
index 1ad120cfdec..9606276f885 100644
--- a/docs/tech-specs/2018-08-16-slotting-veterans.md
+++ b/docs/tech-specs/2018-08-16-slotting-veterans.md
@@ -1,11 +1,11 @@
-This document was moved from [appeals-team](https://github.com/department-of-veterans-affairs/appeals-team/blob/main/Project%20Folders/Caseflow%20Projects/Hearings/Hearing%20Schedule/Tech%20Specs/SlottingVeterans.md).
+This document was moved from [appeals-team](https://github.com/department-of-veterans-affairs/appeals-team/blob/master/Project%20Folders/Caseflow%20Projects/Hearings/Hearing%20Schedule/Tech%20Specs/SlottingVeterans.md).
## Slotting Veterans - October 19th Release
-Owner: Sharon Warner
-Date: 2018-08-16
-Reviewer(s):
-Review by:
+Owner: Sharon Warner
+Date: 2018-08-16
+Reviewer(s):
+Review by:
## Context
@@ -18,7 +18,7 @@ While previously, RO hearing coordinators handled assigning veterans to hearing
In order to allow our users to slot veterans to hearing days, we will provide two data elements:
1) A list of veterans who are ready for hearings, filtered by RO and hearing type, and sorted by priority and docket order (CAVC, AOD, other)
-2) A list of upcoming hearing days, filtered by RO and hearing type, along with the number of available slots
+2) A list of upcoming hearing days, filtered by RO and hearing type, along with the number of available slots
The hearing coordinators will use these data elements to assign veterans to the appropriate hearing days. We will also build search functionality so hearing coordinators can search for individual cases.
@@ -66,12 +66,12 @@ The homepage for this functionality will exist at /hearings/schedule/assign.
## Rollout Plan
-**CO Hearings**— This functionality will be released October 19th, 2018. Our first user will be the Central Office Hearing Coordinator at the Board. They will use Caseflow to slot veterans for central office hearings. We confirmed with the Hearings Management Branch that all Central Office appeals to be scheduled area already available in Location 57, which is already part of their normal processes for scheduling CO hearings.
+**CO Hearings**— This functionality will be released October 19th, 2018. Our first user will be the Central Office Hearing Coordinator at the Board. They will use Caseflow to slot veterans for central office hearings. We confirmed with the Hearings Management Branch that all Central Office appeals to be scheduled area already available in Location 57, which is already part of their normal processes for scheduling CO hearings.
-The Project Management Team will develop training materials and we will schedule a training with the CO Hearing Coordinator.
+The Project Management Team will develop training materials and we will schedule a training with the CO Hearing Coordinator.
-**One Regional Office** — After successful rollout to Central Office hearings, the board will take over slotting veterans for 1 RO that does not have any alternate hearing locations through Caseflow. For this to work, the Board will need to activate, case review, and move these appeals to Location 57 so that Caseflow can display those Veterans to schedule.
+**One Regional Office** — After successful rollout to Central Office hearings, the board will take over slotting veterans for 1 RO that does not have any alternate hearing locations through Caseflow. For this to work, the Board will need to activate, case review, and move these appeals to Location 57 so that Caseflow can display those Veterans to schedule.
-**Full Roll out** - On February 14th, 2019, the board will take over slotting veterans for all ROs. The Board will need to have appeals that are ready to be scheduled activated, reviewed, and in location 57.
+**Full Roll out** - On February 14th, 2019, the board will take over slotting veterans for all ROs. The Board will need to have appeals that are ready to be scheduled activated, reviewed, and in location 57.
## Research Notes
diff --git a/docs/tech-specs/2018-11-14-schedule-hearing-task.md b/docs/tech-specs/2018-11-14-schedule-hearing-task.md
index fe2639c8738..5b742f0c752 100644
--- a/docs/tech-specs/2018-11-14-schedule-hearing-task.md
+++ b/docs/tech-specs/2018-11-14-schedule-hearing-task.md
@@ -1,14 +1,14 @@
-This document was moved from [appeals-team](https://github.com/department-of-veterans-affairs/appeals-team/blob/main/Project%20Folders/Caseflow%20Projects/Hearings/Hearing%20Schedule/Tech%20Specs/ScheduleHearingTask.md).
+This document was moved from [appeals-team](https://github.com/department-of-veterans-affairs/appeals-team/blob/master/Project%20Folders/Caseflow%20Projects/Hearings/Hearing%20Schedule/Tech%20Specs/ScheduleHearingTask.md).
## Schedule Hearing Task
-Owner: Sharon Warner & Andrew Lomax
-Date: 2018-11-14
+Owner: Sharon Warner & Andrew Lomax
+Date: 2018-11-14
Reviewers: Lowell Wood
## Context
-We are refactoring the way we create Hearing Scheduling tasks on the Case Details page!
+We are refactoring the way we create Hearing Scheduling tasks on the Case Details page!
Previously, we created a Schedule Hearing task anytime a user navigated to the Case Details page from the Assign Hearings page. Unfortunately this leaves out necessary functionality; for example, sometimes users will navigate to the Case Details page from search and need to schedule a hearing.
@@ -16,7 +16,7 @@ To fix this, we are now going to allow Hearings Management Branch users to creat
## Overview
-When on the Case Details page, all Hearings Management Branch users will have the ability to create a Schedule Hearing task for the appeal as long as 1) The appeal does not already have a hearing with no disposition, and 2) The appeal does not already have an open Schedule Hearing task.
+When on the Case Details page, all Hearings Management Branch users will have the ability to create a Schedule Hearing task for the appeal as long as 1) The appeal does not already have a hearing with no disposition, and 2) The appeal does not already have an open Schedule Hearing task.
When a user begins working on the Schedule Hearing task, a modal is displayed. This modal will display a noneditable hearing location (Central Office or the RO for a video hearing) and dropdown of upcoming hearing dates with available slots for that hearing location. If the user has navigated to the Case Details page from the Assign Hearings page, the hearing date will be prepopulated with the date the user selected on the Assign Hearings page. If the user has navigated to the Case Details page a different way, the date will not be prepopulated.
diff --git a/docs/tech-specs/2018-11-16-co-parent-records-transition.md b/docs/tech-specs/2018-11-16-co-parent-records-transition.md
index b831702044b..f173a4d07aa 100644
--- a/docs/tech-specs/2018-11-16-co-parent-records-transition.md
+++ b/docs/tech-specs/2018-11-16-co-parent-records-transition.md
@@ -1,11 +1,11 @@
-This document was moved from [appeals-team](https://github.com/department-of-veterans-affairs/appeals-team/blob/main/Project%20Folders/Caseflow%20Projects/Hearings/Hearing%20Schedule/Tech%20Specs/COParentRecordsTransition.md).
+This document was moved from [appeals-team](https://github.com/department-of-veterans-affairs/appeals-team/blob/master/Project%20Folders/Caseflow%20Projects/Hearings/Hearing%20Schedule/Tech%20Specs/COParentRecordsTransition.md).
-## CO Parent Records to Caseflow
+## CO Parent Records to Caseflow
-Owner: Sharon Warner
+Owner: Sharon Warner
Date: 2018-11-16
-Reviewer(s): Oscar Ramirez, Meredith Stewart, & Andrew Lomax
-Review by: 2018-11-18
+Reviewer(s): Oscar Ramirez, Meredith Stewart, & Andrew Lomax
+Review by: 2018-11-18
## Context
diff --git a/docs/tech-specs/2018-11-28-legacy-issue-establishment.md b/docs/tech-specs/2018-11-28-legacy-issue-establishment.md
index f1adcc74693..3eabcaf036d 100644
--- a/docs/tech-specs/2018-11-28-legacy-issue-establishment.md
+++ b/docs/tech-specs/2018-11-28-legacy-issue-establishment.md
@@ -1,4 +1,4 @@
-This document was moved from [appeals-team](https://github.com/department-of-veterans-affairs/appeals-team/blob/main/Project%20Folders/Caseflow%20Projects/Intake/Tech%20Specs/legacy-issue-establishment.md).
+This document was moved from [appeals-team](https://github.com/department-of-veterans-affairs/appeals-team/blob/master/Project%20Folders/Caseflow%20Projects/Intake/Tech%20Specs/legacy-issue-establishment.md).
# Legacy Issue Optin
@@ -37,9 +37,9 @@ Example schema:
-------------------------------+-----------------------------+-----------+-------------------------------
id | bigint | not null | autoincrement
request_issue_id | bigint | not null |
- submitted_at | timestamp without time zone | |
- attempted_at | timestamp without time zone | |
- processed_at | timestamp without time zone | |
+ submitted_at | timestamp without time zone | |
+ attempted_at | timestamp without time zone | |
+ processed_at | timestamp without time zone | |
error | character varying | |
```
diff --git a/docs/tech-specs/2018-11-30-alternate-hearing-locations.md b/docs/tech-specs/2018-11-30-alternate-hearing-locations.md
index 257c277de8d..9df595e4af0 100644
--- a/docs/tech-specs/2018-11-30-alternate-hearing-locations.md
+++ b/docs/tech-specs/2018-11-30-alternate-hearing-locations.md
@@ -1,10 +1,10 @@
-This document was moved from [appeals-team](https://github.com/department-of-veterans-affairs/appeals-team/blob/main/Project%20Folders/Caseflow%20Projects/Hearings/Hearing%20Schedule/Tech%20Specs/AlternateHearingLocations.md).
+This document was moved from [appeals-team](https://github.com/department-of-veterans-affairs/appeals-team/blob/master/Project%20Folders/Caseflow%20Projects/Hearings/Hearing%20Schedule/Tech%20Specs/AlternateHearingLocations.md).
## Alternate Hearing Locations
-Owner: Andrew Lomax
-Date: 2018-11-30
-Reviewer(s): Sharon Warner
+Owner: Andrew Lomax
+Date: 2018-11-30
+Reviewer(s): Sharon Warner
Review by: 2018-11-30
## Context
@@ -17,7 +17,7 @@ We have compiled a list of all alternate hearing locations for each RO and need
- Assign Hearings page
## Overview
-[Research](https://github.com/department-of-veterans-affairs/caseflow/issues/7507)
+[Research](https://github.com/department-of-veterans-affairs/caseflow/issues/7507)
[Facility Locator API](https://github.com/department-of-veterans-affairs/caseflow/issues/7545)
#### Necessary data
diff --git a/docs/tech-specs/2018-12-06-legacy-issue-optin-and-rollback.md b/docs/tech-specs/2018-12-06-legacy-issue-optin-and-rollback.md
index e18b7a79611..4f764d86b51 100644
--- a/docs/tech-specs/2018-12-06-legacy-issue-optin-and-rollback.md
+++ b/docs/tech-specs/2018-12-06-legacy-issue-optin-and-rollback.md
@@ -1,4 +1,4 @@
-This document was moved from [appeals-team](https://github.com/department-of-veterans-affairs/appeals-team/blob/main/Project%20Folders/Caseflow%20Projects/Intake/Tech%20Specs/legacy-issue-optin-and-rollback.md).
+This document was moved from [appeals-team](https://github.com/department-of-veterans-affairs/appeals-team/blob/master/Project%20Folders/Caseflow%20Projects/Intake/Tech%20Specs/legacy-issue-optin-and-rollback.md).
# Legacy issue opt-in and rollback
@@ -25,7 +25,7 @@ This requires overwriting the existing disposition.
We still need to determine how to approach remanded issues. Here are three proposals.
### 1
-Create a different follow up post-remand appeal for each issue closed (one appeal for each issue). Store which post-remand appeal gets created for each issue.
+Create a different follow up post-remand appeal for each issue closed (one appeal for each issue). Store which post-remand appeal gets created for each issue.
If all of the issues on the appeal are closed, close the appeal. This would mean that all of the issues on the appeal are closed, or if the issue has a disposition of "3", then it is associated with a post-remand appeal.
diff --git a/docs/tech-specs/2019-01-28-hearing-task-flow.md b/docs/tech-specs/2019-01-28-hearing-task-flow.md
index c02ddbcc86d..e3c3bfe7743 100644
--- a/docs/tech-specs/2019-01-28-hearing-task-flow.md
+++ b/docs/tech-specs/2019-01-28-hearing-task-flow.md
@@ -1,11 +1,11 @@
-This document was moved from [appeals-team](https://github.com/department-of-veterans-affairs/appeals-team/blob/main/Project%20Folders/Caseflow%20Projects/Hearings/Hearing%20Schedule/Tech%20Specs/HearingTaskFlow.md).
+This document was moved from [appeals-team](https://github.com/department-of-veterans-affairs/appeals-team/blob/master/Project%20Folders/Caseflow%20Projects/Hearings/Hearing%20Schedule/Tech%20Specs/HearingTaskFlow.md).
## Hearing Task Flow
-Owner: Sharon Warner
-Date: 2019-01-28
-Reviewer(s):
-Review by:
+Owner: Sharon Warner
+Date: 2019-01-28
+Reviewer(s):
+Review by:
## Task Hierarchy
![](2019-01-28-hearing-task-flow.png)
@@ -71,26 +71,26 @@ Review by:
While most of the hearings associated tasks can be completed through the queue framework, the disposition task can only be completed through either the hearing prep daily docket or the hearing schedule daily docket. Because users may not understand the consequences of selecting dispositions on these pages, we will put safeguards in place to ensure we're not unnecessarily creating and deleting tasks.
-***Disposition Job***
+***Disposition Job***
When a user marks a hearing as canceled, no show, or held, we will immediately save the disposition to the hearings table, but we will not take any task actions to move the appeal forward. The disposition will remain editable in the UI.
We will create an overnight job to pull in all appeals with 1) open DispositionTasks that are not on hold, and 2) a hearing with a disposition that was not held that day (hearing coordinators and judges regularly update dispositions the day after a hearing was schedule). This job will perform the necessary actions described above to move appeals forward.
-***Postponed Hearings***
+***Postponed Hearings***
When a user marks a hearing as postponed, we will both mark the hearing as postponed in the database and immediately create the necessary tasks to move the appeal forward. We are differentiating this case because postponing a hearing can require immediate action on the resulting tasks from the hearings management branch.
-***UI***
+***UI***
The hearing prep and hearing schedule daily dockets will be updated such that the hearing dispositions are only editable if either 1) the appeal's DispositionTask is open and not on hold or 2) the appeal does not have a DispositionTask (legacy hearings scheduled prior to 2/1). We will also remove the autosave feature from the hearing prep daily docket and implement a save button.
## VACOLS Locations for Legacy Appeals
-***Appeals in Location 57***
+***Appeals in Location 57***
We will run a job to continuously move appeals from location 57 to Caseflow. There should never be any appeal in location 57 that 1) has requested a video or CO hearing and 2) does not have an open hearing, for more than an hour.
-***Appeals in Locations 36/38***
+***Appeals in Locations 36/38***
The hearings management branch will need to move appeals out of locations 36 and 38 as their associated hearings are held. We will no longer be putting appeals in these locations.
-***Appeals in Location 'Caseflow'***
+***Appeals in Location 'Caseflow'***
We will add alerts in Looker to ensure that appeals do not get lost in Caseflow. The ticket for this is [here](https://github.com/department-of-veterans-affairs/caseflow/issues/8992).
## Open Questions
diff --git a/docs/tech-specs/2019-04-11-hearing-prep-merge.md b/docs/tech-specs/2019-04-11-hearing-prep-merge.md
index 85bb75f47b3..2f37b48db0a 100644
--- a/docs/tech-specs/2019-04-11-hearing-prep-merge.md
+++ b/docs/tech-specs/2019-04-11-hearing-prep-merge.md
@@ -1,15 +1,15 @@
-This document was moved from [appeals-team](https://github.com/department-of-veterans-affairs/appeals-team/blob/main/Project%20Folders/Caseflow%20Projects/Hearings/Hearing%20Schedule/Tech%20Specs/HearingPrepMerge.md).
+This document was moved from [appeals-team](https://github.com/department-of-veterans-affairs/appeals-team/blob/master/Project%20Folders/Caseflow%20Projects/Hearings/Hearing%20Schedule/Tech%20Specs/HearingPrepMerge.md).
## Hearing Prep Merge
-Owner: Sharon Warner
-Date: 2019-04-11
-Reviewer(s):
-Review by:
+Owner: Sharon Warner
+Date: 2019-04-11
+Reviewer(s):
+Review by:
## Context
-When Caseflow Hearing Prep was first developed 2 years ago, hearings' master records (records that group hearings by type, date, regional office, and judge) were stored in inconsistent ways in VACOLS. Video hearings were all linked to master records in the hearings table; CO hearings did not have any concept of master records; and travel board hearings had master records stored in a completely different table. Because these master records were so inconsistent, we determined it would be easier to not use master records within hearing prep and instead group hearings in our own way.
+When Caseflow Hearing Prep was first developed 2 years ago, hearings' master records (records that group hearings by type, date, regional office, and judge) were stored in inconsistent ways in VACOLS. Video hearings were all linked to master records in the hearings table; CO hearings did not have any concept of master records; and travel board hearings had master records stored in a completely different table. Because these master records were so inconsistent, we determined it would be easier to not use master records within hearing prep and instead group hearings in our own way.
Since Caseflow Hearing Schedule's rollout, however, we now have a consistent implementation of master records, now called hearing days, stored in caseflow's database. We also already have implemented hearing schedule views and daily dockets based on these hearing days. In order to minimize discrepancies between Hearing Prep and Hearing Schedule, we are merging Hearing Prep's hearing schedule views and daily dockets into Hearing Schedule.
diff --git a/docs/tech-specs/2019-08-01-establish-930-corrections.md b/docs/tech-specs/2019-08-01-establish-930-corrections.md
index 68ef514587f..8168a6c29c8 100644
--- a/docs/tech-specs/2019-08-01-establish-930-corrections.md
+++ b/docs/tech-specs/2019-08-01-establish-930-corrections.md
@@ -1,4 +1,4 @@
-This document was moved from [appeals-team](https://github.com/department-of-veterans-affairs/appeals-team/blob/main/Project%20Folders/Caseflow%20Projects/Intake/Tech%20Specs/establish-930-corrections.md).
+This document was moved from [appeals-team](https://github.com/department-of-veterans-affairs/appeals-team/blob/master/Project%20Folders/Caseflow%20Projects/Intake/Tech%20Specs/establish-930-corrections.md).
# Creating 930 corrections for request issues with decision issues
**Notes:**
diff --git a/docs/tech-specs/2019-10-10-integrating-caseflow-with-pexip.md b/docs/tech-specs/2019-10-10-integrating-caseflow-with-pexip.md
index 6a6d2ed20db..af789e0a6da 100644
--- a/docs/tech-specs/2019-10-10-integrating-caseflow-with-pexip.md
+++ b/docs/tech-specs/2019-10-10-integrating-caseflow-with-pexip.md
@@ -1,4 +1,4 @@
-This document was moved from [appeals-team](https://github.com/department-of-veterans-affairs/appeals-team/blob/main/Project%20Folders/Caseflow%20Projects/Hearings/Telehearings/tech-specs/Integrating%20Caseflow%20with%20Pexip.md).
+This document was moved from [appeals-team](https://github.com/department-of-veterans-affairs/appeals-team/blob/master/Project%20Folders/Caseflow%20Projects/Hearings/Telehearings/tech-specs/Integrating%20Caseflow%20with%20Pexip.md).
# Integration with Pexip for Virtual Hearings
@@ -15,7 +15,7 @@ There is an additional component to email the participants of the conference tha
- [Epic](https://app.zenhub.com/workspaces/caseflow-5915dd178f67e20b5553ba0c/issues/department-of-veterans-affairs/caseflow/11132)
- [Tech Spec](https://app.zenhub.com/workspace/o/department-of-veterans-affairs/caseflow/issues/12012)
- [Implementation](https://app.zenhub.com/workspace/o/department-of-veterans-affairs/caseflow/issues/11730)
-
+
### Resources
- [Pexip homepage](https://www.pexip.com)
@@ -26,7 +26,7 @@ There is an additional component to email the participants of the conference tha
- [Pexip browser support](https://docs.pexip.com/admin/interoperability.htm)
- [Slack Thread on Deployment](https://dsva.slack.com/archives/CAM9FJ85P/p1570459327417500)
- [Mapping Host to IP](https://github.com/department-of-veterans-affairs/appeals-deployment/blob/2b67911264124e41e887cf810f735c0d1eb8c493/ansible/vars/va-services.yml)
-
+
## Overview
To support the BVA's video conferencing initiative, Caseflow will need to be able to manage Pexip conferences from creation to deletion using the Pexip API.
@@ -348,7 +348,7 @@ Where:
The URL must always include `https:///webapp/?` But the remainder of the fields are optional. If a field is not specified in the URL, the user joining the conference will be asked to fill in the appropriate fields in a form before joining the conference.
-We can pre-fill some or all of these fields and allow participants the participants to review and make changes before joining or we can format the URL so that the participants are taken straight into the conference. The latter is preferable as we will display a link on the hearing docket for judges and send emails containing the URL with detailed instructions to all participants.
+We can pre-fill some or all of these fields and allow participants the participants to review and make changes before joining or we can format the URL so that the participants are taken straight into the conference. The latter is preferable as we will display a link on the hearing docket for judges and send emails containing the URL with detailed instructions to all participants.
### Deleting Conferences for Past Hearings
diff --git a/docs/tech-specs/README.md b/docs/tech-specs/README.md
index cad1a687571..3d9efc8e903 100644
--- a/docs/tech-specs/README.md
+++ b/docs/tech-specs/README.md
@@ -17,8 +17,8 @@ This folder contains tech specs for the Caseflow team.
## In order to write a tech spec and get it reviewed do the following:
1. Clone this repo
-2. Start drafting a tech spec by opening a PR creating a file titled YYYY-MM-DD-(tech-spec-name).md in this folder with your tech spec. You can use the [tech spec template here](https://github.com/department-of-veterans-affairs/caseflow/blob/main/.github/ISSUE_TEMPLATE/tech-spec.md)
+2. Start drafting a tech spec by opening a PR creating a file titled YYYY-MM-DD-(tech-spec-name).md in this folder with your tech spec. You can use the [tech spec template here](https://github.com/department-of-veterans-affairs/caseflow/blob/master/.github/ISSUE_TEMPLATE/tech-spec.md)
3. Post in #appeals-development and request for others to review the tech spec
4. Schedule time on the VA Appeals calendar with your scrum team or the whole Caseflow engineering team as appropriate to discuss the tech spec
-5. Once comments are addressed, the tech spec is finalized and your PR is approved, merge your commit to main so that the tech spec is preserved for future team mates
+5. Once comments are addressed, the tech spec is finalized and your PR is approved, merge your commit to master so that the tech spec is preserved for future team mates
6. Link your tech spec in future PRs that implement the changes
diff --git a/lib/helpers/scripts/missing_vacols_hearing_job_fix.sh b/lib/helpers/scripts/missing_vacols_hearing_job_fix.sh
deleted file mode 100644
index 211908d47a9..00000000000
--- a/lib/helpers/scripts/missing_vacols_hearing_job_fix.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#! /bin/bash
-cd /opt/caseflow-certification/src; bin/rails c << DONETOKEN
-x = MissingVacolsHearingJobFix.new
-x.perform
-DONETOKEN
diff --git a/package.json b/package.json
new file mode 100644
index 00000000000..e361aad526b
--- /dev/null
+++ b/package.json
@@ -0,0 +1,5 @@
+{
+ "dependencies": {
+ "node": "16.16.0"
+ }
+}
diff --git a/scripts/dev_env_setup_step1.sh b/scripts/dev_env_setup_step1.sh
index d49852d6f45..e29b26b96da 100755
--- a/scripts/dev_env_setup_step1.sh
+++ b/scripts/dev_env_setup_step1.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# This script automates the Developer Setup described here:
-# https://github.com/department-of-veterans-affairs/caseflow/blob/main/README.md#developer-setup
+# https://github.com/department-of-veterans-affairs/caseflow/blob/master/README.md#developer-setup
# It is okay to run this script multiple times.
# Only Mac has been tested.
diff --git a/scripts/dev_env_setup_step2.sh b/scripts/dev_env_setup_step2.sh
index d8698878fb2..7df7a9dab77 100755
--- a/scripts/dev_env_setup_step2.sh
+++ b/scripts/dev_env_setup_step2.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# Continuation of Developer Setup at
-# https://github.com/department-of-veterans-affairs/caseflow/blob/main/README.md#install-ruby-dependencies
+# https://github.com/department-of-veterans-affairs/caseflow/blob/master/README.md#install-ruby-dependencies
function detectVersion(){
# https://stackoverflow.com/questions/3466166/how-to-check-if-running-in-cygwin-mac-or-linux
@@ -50,5 +50,5 @@ Congratulations
"
echo 'Finish the manual set up from "Database environment setup":
- https://github.com/department-of-veterans-affairs/caseflow/blob/main/README.md#database-environment-setup
+ https://github.com/department-of-veterans-affairs/caseflow/blob/master/README.md#database-environment-setup
'
diff --git a/scripts/whats-next b/scripts/whats-next
index e3532c4cbef..ac930ab72e3 100755
--- a/scripts/whats-next
+++ b/scripts/whats-next
@@ -1,4 +1,4 @@
#!/bin/sh
LATEST_DEPLOY_TAG=`git tag --list 'deployed/*' | sort -r | head -1`
-git log --pretty=format:"%h%x09%an%x09%x09%s" $LATEST_DEPLOY_TAG...main
+git log --pretty=format:"%h%x09%an%x09%x09%s" $LATEST_DEPLOY_TAG...master
diff --git a/spec/controllers/decision_reviews_controller_spec.rb b/spec/controllers/decision_reviews_controller_spec.rb
index 911bad2b8a4..4280faa4987 100644
--- a/spec/controllers/decision_reviews_controller_spec.rb
+++ b/spec/controllers/decision_reviews_controller_spec.rb
@@ -79,7 +79,7 @@
expect(response.status).to eq 200
expect(response.headers["Content-Type"]).to include "text/csv"
expect(response.body).to start_with("business_line")
- expect(response.body.match?(task.appeal.class.review_title)).to eq true
+ expect(response.body.match?(task.appeal_type)).to eq true
end
end
end
@@ -306,23 +306,6 @@
end
end
- let!(:in_progress_remand_tasks) do
- (0...10).map do |task_num|
- task = create(
- :remand_task,
- assigned_to: non_comp_org,
- assigned_at: task_num.minutes.ago + 1.minute.ago
- )
- task.appeal.update!(veteran_file_number: veteran.file_number)
- create(:request_issue, :nonrating, decision_review: task.appeal, benefit_type: non_comp_org.url)
-
- # Generate some random request issues for testing issue type filters
- generate_request_issues(task, non_comp_org)
-
- task
- end
- end
-
let!(:completed_hlr_tasks) do
(1..20).map do |task_num|
task = create(
@@ -369,29 +352,6 @@
end
end
- let!(:completed_remand_tasks) do
- (1..10).map do |task_num|
- task = create(
- :remand_task,
- assigned_to: non_comp_org,
- assigned_at: task_num.days.ago,
- closed_at: (2 * task_num).hours.ago
- )
- task.completed!
- # Explicitly set the closed_at time again to try to avoid test flakiness
- task.closed_at = Time.zone.now - (2 * task_num).hours
- task.appeal.update!(veteran_file_number: veteran.file_number)
- create(:request_issue, :nonrating, decision_review: task.appeal, benefit_type: non_comp_org.url)
-
- # Generate some random request issues for testing issue type filters
- generate_request_issues(task, non_comp_org)
-
- task.save
- # Attempt to reload after save to avoid potential test flakiness
- task.reload
- end
- end
-
before { non_comp_org.add_user(user) }
subject { get :index, params: query_params, format: :json }
@@ -430,23 +390,6 @@
end
).to be true
end
-
- it "Only Remand Tasks are shown when filtered" do
- get :index,
- params: query_params.merge(
- filter: ["col=decisionReviewType&val=Remand"],
- page: 1
- ),
- format: :json
-
- response_body = JSON.parse(response.body)
-
- expect(
- response_body["tasks"]["data"].all? do |task|
- task["type"] == "decision_review_task" && task["attributes"]["type"] == "Remand"
- end
- ).to be true
- end
end
shared_examples "issue type query filtering" do
@@ -495,9 +438,7 @@
}
end
- let(:in_progress_tasks) do
- in_progress_hlr_tasks + on_hold_hlr_tasks + in_progress_sc_tasks + in_progress_remand_tasks
- end
+ let(:in_progress_tasks) { in_progress_hlr_tasks + on_hold_hlr_tasks + in_progress_sc_tasks }
include_examples "task query filtering"
include_examples "issue type query filtering"
@@ -510,30 +451,30 @@
expect(response.status).to eq(200)
response_body = JSON.parse(response.body)
- expect(response_body["total_task_count"]).to eq 94
+ expect(response_body["total_task_count"]).to eq 84
expect(response_body["tasks_per_page"]).to eq 15
- expect(response_body["task_page_count"]).to eq 7
+ expect(response_body["task_page_count"]).to eq 6
expect(
task_ids_from_response_body(response_body)
).to match_array task_ids_from_seed(in_progress_tasks, (0...15), :assigned_at)
end
- it "page 7 displays last 4 tasks" do
- query_params[:page] = 7
+ it "page 6 displays last 9 tasks" do
+ query_params[:page] = 6
subject
expect(response.status).to eq(200)
response_body = JSON.parse(response.body)
- expect(response_body["total_task_count"]).to eq 94
+ expect(response_body["total_task_count"]).to eq 84
expect(response_body["tasks_per_page"]).to eq 15
- expect(response_body["task_page_count"]).to eq 7
+ expect(response_body["task_page_count"]).to eq 6
expect(
task_ids_from_response_body(response_body)
- ).to match_array task_ids_from_seed(in_progress_tasks, (-4..in_progress_tasks.size), :assigned_at)
+ ).to match_array task_ids_from_seed(in_progress_tasks, (-9..in_progress_tasks.size), :assigned_at)
end
end
@@ -545,7 +486,7 @@
}
end
- let(:completed_tasks) { completed_sc_tasks + completed_hlr_tasks + completed_remand_tasks }
+ let(:completed_tasks) { completed_sc_tasks + completed_hlr_tasks }
include_examples "task query filtering"
include_examples "issue type query filtering"
@@ -558,34 +499,34 @@
expect(response.status).to eq(200)
response_body = JSON.parse(response.body)
- expect(response_body["total_task_count"]).to eq 50
+ expect(response_body["total_task_count"]).to eq 40
expect(response_body["tasks_per_page"]).to eq 15
- expect(response_body["task_page_count"]).to eq 4
+ expect(response_body["task_page_count"]).to eq 3
expect(
task_ids_from_response_body(response_body)
).to match_array task_ids_from_seed(completed_tasks, (0...15), :closed_at)
end
- it "page 4 displays last 5 tasks" do
- query_params[:page] = 4
+ it "page 3 displays last 10 tasks" do
+ query_params[:page] = 3
subject
expect(response.status).to eq(200)
response_body = JSON.parse(response.body)
- expect(response_body["total_task_count"]).to eq 50
+ expect(response_body["total_task_count"]).to eq 40
expect(response_body["tasks_per_page"]).to eq 15
- expect(response_body["task_page_count"]).to eq 4
+ expect(response_body["task_page_count"]).to eq 3
expect(
task_ids_from_response_body(response_body)
- ).to match_array task_ids_from_seed(completed_tasks, (-5..completed_tasks.size), :closed_at)
+ ).to match_array task_ids_from_seed(completed_tasks, (-10..completed_tasks.size), :closed_at)
end
end
- context "vha org with incomplete tasks" do
+ context "vha org incomplete_tasks" do
let(:non_comp_org) { VhaBusinessLine.singleton }
context "incomplete_tasks" do
@@ -663,7 +604,7 @@
end
# The Vha Businessline in_progress should not include on_hold since it uses active for the tasks query
- let(:in_progress_tasks) { in_progress_hlr_tasks + in_progress_sc_tasks + in_progress_remand_tasks }
+ let(:in_progress_tasks) { in_progress_hlr_tasks + in_progress_sc_tasks }
it "page 1 displays first 15 tasks" do
query_params[:page] = 1
@@ -673,7 +614,7 @@
expect(response.status).to eq(200)
response_body = JSON.parse(response.body)
- expect(response_body["total_task_count"]).to eq 74
+ expect(response_body["total_task_count"]).to eq 64
expect(response_body["tasks_per_page"]).to eq 15
expect(response_body["task_page_count"]).to eq 5
@@ -880,52 +821,11 @@
end
let!(:task_event) do
- create(:issue_modification_request,
- :with_higher_level_review_with_decision,
- :edit_of_request,
- :update_decider,
- :with_request_issue,
- nonrating_issue_category: "Medical and Dental Care Reimbursement")
- end
-
- let!(:issue_modification_request_modification) do
- create(:issue_modification_request,
- :with_request_issue,
- request_type: "modification",
- decision_review: task_event.decision_review)
- end
-
- let!(:issue_modification_request_withdrawal) do
- create(:issue_modification_request,
- :with_request_issue,
- :withdrawal,
- decision_review: task_event.decision_review)
- end
-
- let!(:issue_modification_request_removal) do
- create(:issue_modification_request,
- :with_request_issue,
- request_type: "removal",
- decision_review: task_event.decision_review)
- end
- let!(:issue_modification_request_cancel) do
- create(:issue_modification_request,
- :cancel_of_request,
- decision_review: task_event.decision_review)
- end
-
- let(:task_id) { task_event.decision_review.tasks.ids[0] }
-
- let!(:remand_task_event) do
- create(:remand_vha_task)
- end
-
- let!(:remand_task_event) do
- create(:remand_vha_task)
+ create(:higher_level_review_vha_task_with_decision)
end
it "should return task details" do
- get :history, params: { task_id: task_id, decision_review_business_line_slug: vha_org.url },
+ get :history, params: { task_id: task_event.id, decision_review_business_line_slug: vha_org.url },
format: :json
expect(response.status).to eq 200
@@ -933,57 +833,11 @@
res = JSON.parse(response.body)
expected_events = [
- { "taskID" => task_id, "eventType" => "added_issue", "claimType" => "Higher-Level Review",
+ { "taskID" => task_event.id, "eventType" => "added_issue", "claimType" => "Higher-Level Review",
"readableEventType" => "Added issue" },
{ "eventType" => "claim_creation", "readableEventType" => "Claim created" },
{ "eventType" => "in_progress", "readableEventType" => "Claim status - In progress" },
- { "eventType" => "completed_disposition", "readableEventType" => "Completed disposition" },
- { "eventType" => "addition", "readableEventType" => "Requested issue addition" },
- { "eventType" => "pending", "readableEventType" => "Claim status - Pending" },
- { "eventType" => "request_approved", "readableEventType" => "Approval of request - issue addition" },
- { "eventType" => "request_edited", "readableEventType" => "Edit of request - issue addition" },
- { "eventType" => "modification", "readableEventType" => "Requested issue modification" },
- { "eventType" => "removal", "readableEventType" => "Requested issue removal" },
- { "eventType" => "request_cancelled", "readableEventType" => "Cancellation of request" },
- { "eventType" => "withdrawal", "readableEventType" => "Requested issue withdrawal" }
- ]
-
- expected_events.each do |expected_attributes|
- expect(res).to include(
- a_hash_including("attributes" => a_hash_including(expected_attributes))
- )
- end
- end
-
- it "should return remand task details" do
- get :history, params: { task_id: remand_task_event.id, decision_review_business_line_slug: vha_org.url },
- format: :json
-
- expect(response.status).to eq 200
-
- res = JSON.parse(response.body)
-
- expected_events = [
- { "taskID" => remand_task_event.id, "eventType" => "added_issue", "claimType" => "Remand" }
- ]
-
- expected_events.each do |expected_attributes|
- expect(res).to include(
- a_hash_including("attributes" => a_hash_including(expected_attributes))
- )
- end
- end
-
- it "should return remand task details" do
- get :history, params: { task_id: remand_task_event.id, decision_review_business_line_slug: vha_org.url },
- format: :json
-
- expect(response.status).to eq 200
-
- res = JSON.parse(response.body)
-
- expected_events = [
- { "taskID" => remand_task_event.id, "eventType" => "added_issue", "claimType" => "Remand" }
+ { "eventType" => "completed_disposition", "readableEventType" => "Completed disposition" }
]
expected_events.each do |expected_attributes|
diff --git a/spec/factories/appeal.rb b/spec/factories/appeal.rb
index e26ccc43b7c..c73c2424981 100644
--- a/spec/factories/appeal.rb
+++ b/spec/factories/appeal.rb
@@ -686,7 +686,7 @@
create(:request_issue,
benefit_type: "vha",
nonrating_issue_category: "Caregiver | Other",
- nonrating_issue_description: "VHA - Caregiver",
+ nonrating_issue_description: "VHA - Caregiver ",
decision_review: appeal,
decision_date: 1.month.ago)
appeal.reload
diff --git a/spec/factories/higher_level_review.rb b/spec/factories/higher_level_review.rb
index 8880a175a42..612fdafeab7 100644
--- a/spec/factories/higher_level_review.rb
+++ b/spec/factories/higher_level_review.rb
@@ -167,7 +167,7 @@
create(:request_issue,
benefit_type: "vha",
nonrating_issue_category: "Caregiver | Other",
- nonrating_issue_description: "VHA - Caregiver",
+ nonrating_issue_description: "VHA - Caregiver ",
decision_review: higher_level_review,
decision_date: 1.month.ago)
diff --git a/spec/factories/issue_modification_request.rb b/spec/factories/issue_modification_request.rb
index 48fb4d8cb12..17ea37cbafc 100644
--- a/spec/factories/issue_modification_request.rb
+++ b/spec/factories/issue_modification_request.rb
@@ -6,8 +6,7 @@
request_reason { Faker::Lorem.sentence }
benefit_type { "vha" }
- nonrating_issue_description { Faker::Lorem.sentence }
- nonrating_issue_category { Constants::ISSUE_CATEGORIES["vha"].sample }
+ nonrating_issue_category {}
status { "assigned" }
decision_date { Time.zone.today - rand(0..29) }
@@ -16,36 +15,14 @@
remove_original_issue { false }
requestor_id { create(:user).id }
- trait :withdrawal do
- request_type { "withdrawal" }
- withdrawal_date { Time.zone.today - rand(0..29) }
- end
-
trait :update_decider do
after(:create) do |imr, evaluator|
- imr.status = evaluator.status == "assigned" ? "approved" : evaluator.status
+ imr.status = evaluator.status || "approved"
imr.decider_id = create(:user).id
imr.save!
end
end
- trait :edit_of_request do
- after(:create) do |imr, evaluator|
- imr.request_reason = "I edited this request."
- imr.nonrating_issue_category = evaluator.nonrating_issue_category ||
- Constants::ISSUE_CATEGORIES[evaluator.benefit_type].sample
- imr.status = evaluator.status
- imr.save!
- end
- end
-
- trait :cancel_of_request do
- after(:create) do |imr|
- imr.status = "cancelled"
- imr.save!
- end
- end
-
trait :with_request_issue do
request_issue do
create(:request_issue,
@@ -70,7 +47,6 @@
trait :with_supplemental_claim do
decision_review do
create(:supplemental_claim,
- :with_intake,
:with_vha_issue,
:update_assigned_at,
:processed,
@@ -81,21 +57,8 @@
trait :with_higher_level_review do
decision_review do
create(:higher_level_review,
- :with_intake,
- :with_vha_issue,
- :update_assigned_at,
- :processed,
- claimant_type: :veteran_claimant)
- end
- end
-
- trait :with_higher_level_review_with_decision do
- decision_review do
- create(:higher_level_review,
- :with_intake,
:with_vha_issue,
:update_assigned_at,
- :with_decision,
:processed,
claimant_type: :veteran_claimant)
end
diff --git a/spec/factories/supplemental_claim.rb b/spec/factories/supplemental_claim.rb
index 2ed4c7ef5a2..39ed9b6df54 100644
--- a/spec/factories/supplemental_claim.rb
+++ b/spec/factories/supplemental_claim.rb
@@ -282,16 +282,5 @@
decision_review: sc)
end
end
-
- factory :remand, class: Remand do
- type { Remand.name }
- decision_review_remanded do
- create(
- :appeal,
- :with_decision_issue,
- disposition: "remanded"
- )
- end
- end
end
end
diff --git a/spec/factories/task.rb b/spec/factories/task.rb
index bf6787b7f1b..3478613c729 100644
--- a/spec/factories/task.rb
+++ b/spec/factories/task.rb
@@ -431,11 +431,6 @@ def self.find_first_task_or_create(appeal, task_type, **kwargs)
assigned_by { nil }
end
- factory :remand_task, class: DecisionReviewTask do
- appeal { create(:remand, benefit_type: "nca") }
- assigned_by { nil }
- end
-
factory :supplemental_claim_poa_task, class: DecisionReviewTask do
appeal do
create(:supplemental_claim,
@@ -516,19 +511,6 @@ def self.find_first_task_or_create(appeal, task_type, **kwargs)
assigned_to { VhaBusinessLine.singleton }
end
- factory :remand_vha_task, class: DecisionReviewTask do
- appeal do
- create(
- :remand,
- :with_vha_issue,
- benefit_type: "vha",
- claimant_type: :veteran_claimant
- )
- end
- assigned_by { nil }
- assigned_to { VhaBusinessLine.singleton }
- end
-
factory :supplemental_claim_vha_task_incomplete, class: DecisionReviewTask do
appeal do
create(
diff --git a/spec/feature/intake/supplemental_claim/edit_spec.rb b/spec/feature/intake/supplemental_claim/edit_spec.rb
index 1aa698d7434..3f2df22e705 100644
--- a/spec/feature/intake/supplemental_claim/edit_spec.rb
+++ b/spec/feature/intake/supplemental_claim/edit_spec.rb
@@ -930,25 +930,5 @@ def click_cancel(visit_page)
safe_click "#decision-date"
expect(page).to have_button("Add this issue", disabled: true)
end
-
- context "with a remand" do
- let(:remand) { create(:remand_vha_task, assigned_at: 1.minute.ago) }
-
- before do
- remand.appeal.establish!
- end
-
- let(:edit_url) do
- "/supplemental_claims/#{remand.appeal.uuid}/edit"
- end
-
- it "should not allow editing" do
- visit edit_url
-
- expect(page).to have_content(COPY::REMANDS_NOT_EDITABLE)
- expect(page).not_to have_css(".cf-select__control")
- expect(page).to have_button("Establish", disabled: true)
- end
- end
end
end
diff --git a/spec/feature/non_comp/dispositions_spec.rb b/spec/feature/non_comp/dispositions_spec.rb
index 7d270821654..36fb413bc45 100644
--- a/spec/feature/non_comp/dispositions_spec.rb
+++ b/spec/feature/non_comp/dispositions_spec.rb
@@ -502,28 +502,6 @@ def find_disabled_disposition(disposition, description = nil)
end
end
end
-
- context "viewing a remand" do
- let(:in_progress_remand_task) do
- create(:remand_vha_task, assigned_at: 1.minute.ago)
- end
-
- let(:dispositions_url) { "#{business_line_url}/tasks/#{in_progress_remand_task.id}" }
-
- it "should disable the request issue modification button" do
- visit dispositions_url
-
- expect(page).to have_css(".usa-button-disabled", text: "Request issue modification")
- expect(page).to have_content(COPY::REMANDS_NOT_EDITABLE)
- end
-
- it "should disable the edit issues button" do
- User.authenticate!(user: admin_user)
- visit dispositions_url
-
- expect(page).to have_css(".usa-button-disabled", text: "Edit Issues")
- end
- end
end
def enable_feature_flag_and_redirect_to_disposition
diff --git a/spec/feature/non_comp/individual_claim_history_spec.rb b/spec/feature/non_comp/individual_claim_history_spec.rb
index a5d01b3b835..f7d5a141752 100644
--- a/spec/feature/non_comp/individual_claim_history_spec.rb
+++ b/spec/feature/non_comp/individual_claim_history_spec.rb
@@ -10,885 +10,27 @@
let(:non_comp_org) { VhaBusinessLine.singleton }
let(:user) { create(:default_user, css_id: "REPORT USER", full_name: "Report User") }
let(:veteran) { create(:veteran) }
+ let!(:task) { create(:higher_level_review_vha_task_with_decision) }
+ let(:task_history_url) { "/decision_reviews/vha/tasks/#{task.id}/history" }
+ let(:events) { ClaimHistoryService.new(non_comp_org, task_id: task.id).build_events }
before do
User.stub = user
non_comp_org.add_user(user)
OrganizationsUser.make_user_admin(user, non_comp_org)
+ visit task_history_url
end
- def click_filter_option(filter_text)
- sort = find("[aria-label='Filter by Activity']")
- sort.click
+ scenario "display the claim history table" do
+ number_of_events = events.length
- dropdown_filter = page.find(class: "cf-dropdown-filter")
- dropdown_filter.find("label", text: filter_text, match: :prefer_exact).click
- end
-
- def clear_filter_option(filter_text)
- sort = find("[aria-label='Filter by Activity. Filtering by #{filter_text}']")
- sort.click
-
- clear_button_filter = page.find(class: "cf-clear-filter-button-wrapper")
- clear_button_filter.click
- end
-
- describe "Check for event hitsoty activity dynamic labels" do
- let!(:task_event) do
- create(:issue_modification_request,
- :with_higher_level_review_with_decision,
- nonrating_issue_category: "Medical and Dental Care Reimbursement")
- end
-
- # Edited then approved
- let!(:issue_modification_request_modification_edit) do
- request = create(:issue_modification_request,
- :with_request_issue,
- :edit_of_request,
- request_type: "modification",
- decision_review: task_event.decision_review)
- request.update(status: "approved")
- request
- end
-
- let!(:issue_modification_request_withdrawal_edit) do
- request = create(:issue_modification_request,
- :with_request_issue,
- :edit_of_request,
- :withdrawal,
- decision_review: task_event.decision_review)
- request.update(status: "approved")
- request
- end
-
- let!(:issue_modification_request_addition_edit) do
- request = create(:issue_modification_request,
- :edit_of_request,
- decision_review: task_event.decision_review)
- request.update(status: "approved")
- request
- end
-
- let!(:issue_modification_request_removal_edit) do
- request = create(:issue_modification_request,
- :with_request_issue,
- :edit_of_request,
- request_type: "removal",
- decision_review: task_event.decision_review)
- request.update(status: "approved")
- request
- end
-
- # cancelled
- let!(:cancelled_issue_modification_request_modification) do
- create(:issue_modification_request,
- :with_request_issue,
- :cancel_of_request,
- request_type: "modification",
- decision_review: task_event.decision_review)
- end
-
- let!(:cancelled_issue_modification_request_withdrawal) do
- create(:issue_modification_request,
- :with_request_issue,
- :cancel_of_request,
- :withdrawal,
- decision_review: task_event.decision_review)
- end
-
- let!(:cancelled_issue_modification_request_addition) do
- create(:issue_modification_request,
- :cancel_of_request,
- decision_review: task_event.decision_review)
- end
-
- let!(:cancelled_issue_modification_request_removal) do
- create(:issue_modification_request,
- :with_request_issue,
- :cancel_of_request,
- request_type: "removal",
- decision_review: task_event.decision_review)
- end
-
- # Rejected aka Denied
- let!(:denied_issue_modification_request_modification) do
- request = create(:issue_modification_request,
- :with_request_issue,
- request_type: "modification",
- decision_review: task_event.decision_review)
-
- request.update(
- status: "denied",
- decision_reason: "Decision for denial"
- )
- request
- end
-
- let!(:denied_issue_modification_request_withdrawal) do
- request = create(:issue_modification_request,
- :with_request_issue,
- :withdrawal,
- decision_review: task_event.decision_review)
-
- request.update(
- status: "denied",
- decision_reason: "Decision for denial"
- )
- request
- end
-
- let!(:denied_issue_modification_request_addition) do
- request = create(:issue_modification_request,
- decision_review: task_event.decision_review)
-
- request.update(
- status: "denied",
- decision_reason: "Decision for denial"
- )
- request
- end
-
- let!(:denied_issue_modification_request_removal) do
- request = create(:issue_modification_request,
- :with_request_issue,
- request_type: "removal",
- decision_review: task_event.decision_review)
-
- request.update(
- status: "denied",
- decision_reason: "Decision for denial"
- )
- request
- end
-
- let!(:claim_closed) do
- create(:higher_level_review_vha_task_with_decision)
- end
-
- let(:task_id) { task_event.decision_review.tasks.ids[0] }
-
- let(:task_history_url) { "/decision_reviews/vha/tasks/#{task_id}/history" }
- let(:events) { ClaimHistoryService.new(non_comp_org, task_id: task_id).build_events }
-
- before do
- visit task_history_url
- end
-
- let(:event_types) { events.map(&:readable_event_type).uniq.sort! }
-
- context "Testing all Event Types" do
- it "Filtering each event and verifiying row attributes" do
- step "display the claim history table count" do
- expect(page).to have_text("Viewing 1-15 of #{events.length} total")
-
- click_filter_option("Approval of request - issue addition (1)")
- expect(event_types.include?("Approval of request - issue addition")).to be_truthy
-
- table = page.find("tbody")
- expect(table).to have_selector("tr", count: 1)
-
- table_row = table.first('tr[id^="table-row"]')
- expect(table_row).to have_content("Approval of request - issue addition")
- expect(table_row).to have_content("Request decision:")
- expect(table_row).to have_content("Request originated by:")
-
- expect(table_row).to have_content("View original request")
- table_row.first("a", text: "View original request").click
-
- expect(table_row).to have_content("Hide original request")
- expect(table_row).to have_content("Benefit type:")
- expect(table_row).to have_content("Issue type:")
- expect(table_row).to have_content("Issue description:")
- expect(table_row).to have_content("Decision date:")
- expect(table_row).to have_content("Addition request reason:")
- clear_filter_option("Approval of request - issue addition")
- end
-
- step "Checking Approval of request - issue modification" do
- click_filter_option("Approval of request - issue modification (1)")
- expect(event_types.include?("Approval of request - issue modification")).to be_truthy
-
- table = page.find("tbody")
- expect(table).to have_selector("tr", count: 1)
-
- table_row = table.first('tr[id^="table-row"]')
- expect(table_row).to have_content("Approval of request - issue modification")
- expect(table_row).to have_content("Request decision:")
- expect(table_row).to have_content("Remove original issue:")
- expect(table_row).to have_content("Request originated by")
- expect(table_row).to have_content("View original request")
-
- first("a", text: "View original request").click
- expect(table_row).to have_content("Hide original request")
-
- expect(table_row).to have_content("Benefit type:")
- expect(table_row).to have_content("Current issue type:")
- expect(table_row).to have_content("Current issue description:")
- expect(table_row).to have_content("Current decision date:")
- expect(table_row).to have_content("New issue type:")
- expect(table_row).to have_content("New issue description:")
- expect(table_row).to have_content("New decision date:")
- expect(table_row).to have_content("Modification request reason:")
- clear_filter_option("Approval of request - issue modification")
- end
-
- step "Checking Approval of request - issue removal" do
- click_filter_option("Approval of request - issue removal (1)")
- table = page.find("tbody")
- expect(table).to have_selector("tr", count: 1)
- expect(event_types.include?("Approval of request - issue removal")).to be_truthy
-
- table_row = table.first('tr[id^="table-row"]')
- expect(table_row).to have_content("Approval of request - issue removal")
- expect(table_row).to have_content("Request decision:")
- expect(table_row).to have_content("Request originated by")
- expect(table_row).to have_content("View original request")
-
- expect(table_row).to have_content("View original request")
- first("a", text: "View original request").click
- expect(table_row).to have_content("Hide original request")
-
- expect(table_row).to have_content("Benefit type:")
- expect(table_row).to have_content("Issue type:")
- expect(table_row).to have_content("Issue description:")
- expect(table_row).to have_content("Decision date:")
- expect(table_row).to have_content("Removal request reason:")
- clear_filter_option("Approval of request - issue removal")
- end
-
- step "Checking Approval of request - issue withdrawal" do
- click_filter_option("Approval of request - issue withdrawal (1)")
- expect(event_types.include?("Approval of request - issue withdrawal")).to be_truthy
-
- table = page.find("tbody")
- table_row = table.first('tr[id^="table-row"]')
- expect(table_row).to have_content("Approval of request - issue withdrawal")
- expect(table_row).to have_content("Request decision:")
- expect(table_row).to have_content("Request originated by")
- expect(table_row).to have_content("View original request")
-
- expect(table_row).to have_content("View original request")
- first("a", text: "View original request").click
- expect(table_row).to have_content("Hide original request")
-
- expect(table_row).to have_content("Benefit type:")
- expect(table_row).to have_content("Issue type:")
- expect(table_row).to have_content("Issue description:")
- expect(table_row).to have_content("Decision date:")
- expect(table_row).to have_content("Withdrawal request reason:")
- expect(table_row).to have_content("Withdrawal request date:")
- clear_filter_option("Approval of request - issue withdrawal")
- end
-
- step "Checking Cancellation of request" do
- click_filter_option("Cancellation of request")
- expect(event_types.include?("Cancellation of request")).to be_truthy
- table = page.find("tbody")
-
- expect(table).to have_selector("tr", count: 4)
- clear_filter_option("Cancellation of request")
- end
-
- step "Checking Edit of request - issue addition" do
- click_filter_option("Edit of request - issue addition (1)")
- expect(event_types.include?("Edit of request - issue addition")).to be_truthy
-
- table = page.find("tbody")
- expect(table).to have_selector("tr", count: 1)
-
- table_row = table.first('tr[id^="table-row"]')
-
- expect(table_row).to have_content("Edit of request - issue addition")
- expect(table_row).to have_content("New issue type:")
- expect(table_row).to have_content("New issue description:")
- expect(table_row).to have_content("New decision date:")
- expect(table_row).to have_content("New addition request reason:")
-
- expect(table_row).to have_content("View original request")
- first("a", text: "View original request").click
- expect(table_row).to have_content("Hide original request")
-
- expect(table_row).to have_content("Benefit type:")
- expect(table_row).to have_content("Issue type:")
- expect(table_row).to have_content("Issue description:")
- expect(table_row).to have_content("Decision date:")
- expect(table_row).to have_content("Addition request reason:")
- clear_filter_option("Edit of request - issue addition")
- end
-
- step "Checking Edit of request - issue modification" do
- click_filter_option("Edit of request - issue modification (1)")
- expect(event_types.include?("Edit of request - issue modification")).to be_truthy
- table = page.find("tbody")
- expect(table).to have_selector("tr", count: 1)
-
- table_row = table.first('tr[id^="table-row"]')
- expect(table_row).to have_content("Edit of request - issue modification")
-
- expect(table_row).to have_content("New issue type:")
- expect(table_row).to have_content("New issue description:")
- expect(table_row).to have_content("New decision date:")
- expect(table_row).to have_content("New modification request reason:")
-
- expect(table_row).to have_content("View original request")
- first("a", text: "View original request").click
- expect(table_row).to have_content("Hide original request")
-
- expect(table_row).to have_content("Benefit type:")
- expect(table_row).to have_content("Current issue type:")
- expect(table_row).to have_content("Current issue description:")
- expect(table_row).to have_content("Current decision date:")
- expect(table_row).to have_content("New issue type:")
- expect(table_row).to have_content("New issue description:")
- expect(table_row).to have_content("New decision date:")
- expect(table_row).to have_content("Modification request reason:")
-
- clear_filter_option("Edit of request - issue modification")
- end
-
- step "Checking Edit of request - issue removal" do
- click_filter_option("Edit of request - issue removal (4)")
- expect(event_types.include?("Edit of request - issue removal")).to be_truthy
-
- table = page.find("tbody")
- expect(table).to have_selector("tr", count: 4)
-
- table_row = table.first('tr[id^="table-row"]')
- expect(table_row).to have_content("Edit of request - issue removal")
- expect(table_row).to have_content("New removal request reason:")
-
- expect(table_row).to have_content("View original request")
- first("a", text: "View original request").click
- expect(table_row).to have_content("Hide original request")
-
- expect(table_row).to have_content("Benefit type:")
- expect(table_row).to have_content("Issue type:")
- expect(table_row).to have_content("Issue description:")
- expect(table_row).to have_content("Decision date:")
- expect(table_row).to have_content("Removal request reason:")
- clear_filter_option("Edit of request - issue removal")
- end
-
- step "Checking Edit of request - issue withdrawal" do
- click_filter_option("Edit of request - issue withdrawal (4)")
- expect(event_types.include?("Edit of request - issue withdrawal")).to be_truthy
-
- table = page.find("tbody")
- expect(table).to have_selector("tr", count: 4)
-
- table_row = table.first("tr")
- expect(table_row).to have_content("Edit of request - issue withdrawal")
- expect(table_row).to have_content("New withdrawal request reason:")
- expect(table_row).to have_content("New withdrawal request date:")
-
- expect(table_row).to have_content("View original request")
- first("a", text: "View original request").click
- expect(table_row).to have_content("Hide original request")
-
- expect(table_row).to have_content("Benefit type:")
- expect(table_row).to have_content("Issue type:")
- expect(table_row).to have_content("Issue description:")
- expect(table_row).to have_content("Decision date:")
- expect(table_row).to have_content("Withdrawal request reason:")
- expect(table_row).to have_content("Withdrawal request date:")
- clear_filter_option("Edit of request - issue withdrawal")
- end
-
- step "Checking Rejection of request - issue addition" do
- click_filter_option("Rejection of request - issue addition (1)")
- expect(event_types.include?("Rejection of request - issue addition")).to be_truthy
-
- table = page.find("tbody")
- expect(table).to have_selector("tr", count: 1)
-
- table_row = table.first("tr")
- expect(table_row).to have_content("Request decision:")
- expect(table_row).to have_content("Reason for rejection:")
- expect(table_row).to have_content("Request originated by:")
-
- expect(table_row).to have_content("View original request")
- first("a", text: "View original request").click
- expect(table_row).to have_content("Hide original request")
-
- expect(table_row).to have_content("Benefit type:")
- expect(table_row).to have_content("Issue type:")
- expect(table_row).to have_content("Issue description:")
- expect(table_row).to have_content("Decision date:")
- expect(table_row).to have_content("Addition request reason:")
-
- clear_filter_option("Rejection of request - issue addition")
- end
-
- step "Checking Rejection of request - issue modification" do
- click_filter_option("Rejection of request - issue modification (1)")
- expect(event_types.include?("Rejection of request - issue modification")).to be_truthy
-
- table = page.find("tbody")
- expect(table).to have_selector("tr", count: 1)
-
- table_row = table.first("tr")
- expect(table_row).to have_content("Request decision:")
- expect(table_row).to have_content("Reason for rejection:")
- expect(table_row).to have_content("Request originated by:")
-
- expect(table_row).to have_content("View original request")
- first("a", text: "View original request").click
- expect(table_row).to have_content("Hide original request")
-
- expect(table_row).to have_content("Benefit type:")
- expect(table_row).to have_content("Current issue type:")
- expect(table_row).to have_content("Current issue description:")
- expect(table_row).to have_content("New issue type:")
- expect(table_row).to have_content("New issue description:")
- expect(table_row).to have_content("New decision date:")
- expect(table_row).to have_content("Modification request reason:")
-
- clear_filter_option("Rejection of request - issue modification")
- end
-
- step "Checking Rejection of request - issue removal" do
- click_filter_option("Rejection of request - issue removal (1)")
- expect(event_types.include?("Rejection of request - issue removal")).to be_truthy
-
- table = page.find("tbody")
- expect(table).to have_selector("tr", count: 1)
-
- table_row = table.first("tr")
- expect(table_row).to have_content("Request decision:")
- expect(table_row).to have_content("Reason for rejection:")
- expect(table_row).to have_content("Request originated by:")
-
- expect(table_row).to have_content("View original request")
- first("a", text: "View original request").click
- expect(table_row).to have_content("Hide original request")
-
- expect(table_row).to have_content("Benefit type:")
- expect(table_row).to have_content("Issue type:")
- expect(table_row).to have_content("Issue description:")
- expect(table_row).to have_content("Issue type:")
- expect(table_row).to have_content("Decision date:")
-
- clear_filter_option("Rejection of request - issue removal")
- end
-
- step "Checking Rejection of request - issue withdrawal" do
- click_filter_option("Rejection of request - issue withdrawal (1)")
- expect(event_types.include?("Rejection of request - issue withdrawal")).to be_truthy
-
- table = page.find("tbody")
- expect(table).to have_selector("tr", count: 1)
-
- table_row = table.first("tr")
- expect(table_row).to have_content("Request decision:")
- expect(table_row).to have_content("Reason for rejection:")
- expect(table_row).to have_content("Request originated by:")
-
- expect(table_row).to have_content("View original request")
- first("a", text: "View original request").click
-
- expect(table_row).to have_content("Hide original request")
- expect(table_row).to have_content("Benefit type:")
- expect(table_row).to have_content("Issue type:")
- expect(table_row).to have_content("Issue description:")
- expect(table_row).to have_content("Decision date:")
- expect(table_row).to have_content("Withdrawal request reason:")
- expect(table_row).to have_content("Withdrawal request date:")
-
- clear_filter_option("Rejection of request - issue withdrawal")
- end
-
- step "Checking Added issue" do
- click_filter_option("Added issue")
- expect(event_types.include?("Added issue")).to be_truthy
-
- table = page.find("tbody")
- expect(table).to have_selector("tr", count: 10)
-
- table_row = table.first("tr")
- expect(table_row).to have_content("Benefit type:")
- expect(table_row).to have_content("Issue type:")
- expect(table_row).to have_content("Issue description:")
- expect(table_row).to have_content("Decision date:")
-
- clear_filter_option("Added issue")
- end
-
- step "checking Requested issue addition" do
- click_filter_option("Requested issue addition (4)")
- expect(event_types.include?("Requested issue addition")).to be_truthy
-
- table = page.find("tbody")
- expect(table).to have_selector("tr", count: 4)
-
- table_row = table.first("tr")
- expect(table_row).to have_content("Requested issue addition")
- expect(table_row).to have_content("Benefit type:")
- expect(table_row).to have_content("Issue type:")
- expect(table_row).to have_content("Issue description:")
- expect(table_row).to have_content("Decision date:")
- expect(table_row).to have_content("Addition request reason:")
-
- clear_filter_option("Requested issue addition")
- end
-
- step "Checking Requested issue modification" do
- click_filter_option("Requested issue modification (3)")
- expect(event_types.include?("Requested issue modification")).to be_truthy
-
- table = page.find("tbody")
- expect(table).to have_selector("tr", count: 3)
-
- table_row = table.first('tr[id^="table-row"]')
- expect(table_row).to have_content("Requested issue modification")
- expect(table_row).to have_content("Benefit type:")
- expect(table_row).to have_content("Current issue type:")
- expect(table_row).to have_content("Current issue description:")
- expect(table_row).to have_content("Current decision date:")
- expect(table_row).to have_content("New issue type:")
- expect(table_row).to have_content("New issue description:")
- expect(table_row).to have_content("New decision date:")
- expect(table_row).to have_content("Modification request reason:")
-
- clear_filter_option("Requested issue modification")
- end
-
- step "Checking Requested issue removal" do
- click_filter_option("Requested issue removal (3)")
- expect(event_types.include?("Requested issue removal")).to be_truthy
-
- table = page.find("tbody")
- expect(table).to have_selector("tr", count: 3)
-
- table_row = table.first('tr[id^="table-row"]')
- expect(table_row).to have_content("Requested issue removal")
-
- expect(table_row).to have_content("Benefit type:")
- expect(table_row).to have_content("Issue type:")
- expect(table_row).to have_content("Issue description:")
- expect(table_row).to have_content("Decision date:")
- expect(table_row).to have_content("Removal request reason:")
-
- clear_filter_option("Requested issue removal")
- end
-
- step "Checking Requested issue withdrawal" do
- click_filter_option("Requested issue withdrawal (3)")
- expect(event_types.include?("Requested issue withdrawal")).to be_truthy
-
- table = page.find("tbody")
- expect(table).to have_selector("tr", count: 3)
-
- table_row = table.first("tr")
- expect(table_row).to have_content("Requested issue withdrawal")
-
- expect(table_row).to have_content("Benefit type:")
- expect(table_row).to have_content("Issue type:")
- expect(table_row).to have_content("Issue description:")
- expect(table_row).to have_content("Decision date:")
- expect(table_row).to have_content("Withdrawal request reason:")
- expect(table_row).to have_content("Withdrawal request date:")
-
- clear_filter_option("Requested issue withdrawal")
- end
-
- step "Checking Claim status - Pending" do
- click_filter_option("Claim status - Pending (1)")
- expect(event_types.include?("Claim status - Pending")).to be_truthy
-
- table = page.find("tbody")
- expect(table).to have_selector("tr", count: 1)
-
- table_row = table.first("tr")
- expect(table_row).to have_content("Claim status - Pending")
- expect(table_row).to have_content("Claim cannot be processed until VHA admin reviews pending requests.")
-
- clear_filter_option("Claim status - Pending")
- end
-
- step "Checking Claim created" do
- click_filter_option("Claim created (1)")
- expect(event_types.include?("Claim created")).to be_truthy
-
- table = page.find("tbody")
- expect(table).to have_selector("tr", count: 1)
-
- table_row = table.first("tr")
- expect(table_row).to have_content("Claim created")
- expect(table_row).to have_content("Claim created.")
- end
- end
- end
-
- context "should do expected details to show claim close for a claim close" do
- before { visit "/decision_reviews/vha/tasks/#{claim_closed.id}/history" }
-
- it "Claim closed" do
- click_filter_option("Claim closed (1)")
-
- table = page.find("tbody")
- expect(table).to have_selector("tr", count: 1)
-
- table_row = table.first("tr")
- expect(table_row).to have_content("Claim closed")
- expect(table_row).to have_content("Claim decision date:")
- end
- end
- end
-
- describe "check for dynamic data coming in" do
- let!(:task_event_two) do
- create(:issue_modification_request,
- :with_higher_level_review_with_decision,
- nonrating_issue_category: "Medical and Dental Care Reimbursement")
- end
- let(:task_event_two_id) { task_event_two.decision_review.tasks.ids[0] }
-
- let!(:approved_modification_edit) do
- create(:issue_modification_request,
- request_type: "modification",
- decision_review: task_event_two.decision_review,
- request_issue: task_event_two.decision_review.request_issues.first,
- request_reason: "Initial request reason",
- decision_date: 2.days.ago)
- end
-
- let!(:cancelled_issue_modification_request_modification) do
- create(:issue_modification_request,
- :with_request_issue,
- :cancel_of_request,
- request_type: "modification",
- decision_review: task_event_two.decision_review)
- end
-
- let!(:denied_issue_modification_request_modification) do
- request = create(:issue_modification_request,
- :with_request_issue,
- request_type: "modification",
- decision_review: task_event_two.decision_review)
-
- request.update(
- status: "denied",
- decision_reason: "Decision for approval"
- )
- request
- end
-
- let(:events) { ClaimHistoryService.new(non_comp_org, task_id: task_event_two_id).build_events }
-
- before do
- Timecop.freeze(Time.zone.now)
- # approved_modification_edit
- Timecop.travel(2.minutes.from_now)
-
- # Edit the request to create a request edit event
- approved_modification_edit.update!(request_reason: "I edited this request.",
- nonrating_issue_category: "CHAMPVA",
- nonrating_issue_description: "Newly edited issue description")
-
- Timecop.travel(2.minutes.from_now)
- approved_modification_edit.update!(status: "approved")
- end
-
- after do
- Timecop.return
- end
-
- context "Check for data output" do
- it "check for the correct data for Edited Request Modification" do
- visit "/decision_reviews/vha/tasks/#{task_event_two_id}/history"
- click_filter_option("Edit of request - issue modification (1)")
-
- original_modification_request = events.detect { |e| e.event_type == :request_edited }
-
- new_decision_date = original_modification_request.new_decision_date
- request_issue_decision_date = Date.parse(original_modification_request.decision_date)
-
- table = page.find("tbody")
- expect(table).to have_selector("tr", count: 1)
- table_row = table.first('tr[id^="table-row"]')
- expect(table_row).to have_content("Edit of request - issue modification")
- expect(table_row).to have_content("New issue type: #{approved_modification_edit.nonrating_issue_category}")
- expect(table_row).to have_content(
- "New issue description: #{approved_modification_edit.nonrating_issue_description}"
- )
- expect(table_row).to have_content(
- "New decision date: #{approved_modification_edit.decision_date.strftime('%m/%d/%Y')}"
- )
- expect(table_row).to have_content(
- "New modification request reason: #{approved_modification_edit.request_reason}"
- )
-
- expect(table_row).to have_content("View original request")
- first("a", text: "View original request").click
- expect(table_row).to have_content("Hide original request")
-
- expect(table_row).to have_content("Benefit type: Veterans Health Administration")
- expect(table_row).to have_content("Current issue type: #{original_modification_request.issue_type}")
- expect(table_row).to have_content(
- "Current issue description: #{original_modification_request.issue_description}"
- )
- expect(table_row).to have_content(
- "Current decision date: #{request_issue_decision_date.strftime('%m/%d/%Y')}"
- )
- expect(table_row).to have_content("New issue type: #{original_modification_request.new_issue_type}")
- expect(table_row).to have_content(
- "New issue description: #{original_modification_request.new_issue_description}"
- )
-
- expect(table_row).to have_content("New decision date: #{new_decision_date.strftime('%m/%d/%Y')}")
- expect(table_row).to have_content(
- "Modification request reason: #{original_modification_request.previous_modification_request_reason}"
- )
-
- clear_filter_option("Edit of request - issue modification")
-
- step "check for the correct data for Approval of request - issue modification" do
- click_filter_option("Approval of request - issue modification (1)")
-
- original_modification_request = events.reverse.find { |e| e.event_type == :request_approved }
- new_decision_date = Date.parse(original_modification_request.new_decision_date)
- request_issue_decision_date = Date.parse(original_modification_request.decision_date)
-
- table = page.find("tbody")
- expect(table).to have_selector("tr", count: 1)
- table_row = table.first('tr[id^="table-row"]')
- expect(table_row).to have_content("Approval of request - issue modification")
-
- expect(table_row).to have_content("Request decision: #{
- original_modification_request.issue_modification_request_status == 'denied' ? 'Rejected' : 'Approved'
- }")
-
- expect(table_row).to have_content("Remove original issue: #{
- original_modification_request.remove_original_issue ? 'Yes' : 'No'
- }")
- expect(table_row).to have_content("Request originated by: #{original_modification_request.requestor}")
-
- expect(table_row).to have_content("View original request")
- first("a", text: "View original request").click
- expect(table_row).to have_content("Hide original request")
-
- expect(table_row).to have_content("Benefit type: Veterans Health Administration")
- expect(table_row).to have_content("Current issue type: #{original_modification_request.issue_type}")
- expect(table_row).to have_content(
- "Current issue description: #{original_modification_request.issue_description}"
- )
- expect(table_row).to have_content(
- "Current decision date: #{request_issue_decision_date.strftime('%m/%d/%Y')}"
- )
- expect(table_row).to have_content("New issue type: #{original_modification_request.new_issue_type}")
- expect(table_row).to have_content(
- "New issue description: #{original_modification_request.new_issue_description}"
- )
- expect(table_row).to have_content("New decision date: #{new_decision_date.strftime('%m/%d/%Y')}")
- expect(table_row).to have_content(
- "Modification request reason: #{original_modification_request.modification_request_reason}"
- )
-
- clear_filter_option("Approval of request - issue modification")
- end
-
- step "check for the correct data for denied request modification" do
- click_filter_option("Rejection of request - issue modification (1)")
-
- original_modification_request = events.detect { |e| e.event_type == :request_denied }
- new_decision_date = Date.parse(original_modification_request.new_decision_date)
- request_issue_decision_date = Date.parse(original_modification_request.decision_date)
-
- table = page.find("tbody")
- expect(table).to have_selector("tr", count: 1)
- table_row = table.first('tr[id^="table-row"]')
- expect(table_row).to have_content("Rejection of request - issue modification")
-
- expect(table_row).to have_content("Request decision: #{
- original_modification_request.issue_modification_request_status == 'denied' ? 'Rejected' : 'Approved'
- }")
- expect(table_row).to have_content("Request originated by: #{original_modification_request.requestor}")
-
- expect(table_row).to have_content("View original request")
- first("a", text: "View original request").click
- expect(table_row).to have_content("Hide original request")
-
- expect(table_row).to have_content("Benefit type: Veterans Health Administration")
- expect(table_row).to have_content("Current issue type: #{original_modification_request.issue_type}")
- expect(table_row).to have_content(
- "Current issue description: #{original_modification_request.issue_description}"
- )
- expect(table_row).to have_content(
- "Current decision date: #{request_issue_decision_date.strftime('%m/%d/%Y')}"
- )
- expect(table_row).to have_content("New issue type: #{original_modification_request.new_issue_type}")
- expect(table_row).to have_content(
- "New issue description: #{original_modification_request.new_issue_description}"
- )
- expect(table_row).to have_content("New decision date: #{new_decision_date.strftime('%m/%d/%Y')}")
- expect(table_row).to have_content(
- "Modification request reason: #{original_modification_request.modification_request_reason}"
- )
-
- clear_filter_option("Rejection of request - issue modification")
- end
-
- step "check for the correct data for Cancellation of request" do
- click_filter_option("Cancellation of request (1)")
-
- original_modification_request = events.detect { |e| e.event_type == :request_cancelled }
-
- new_decision_date = Date.parse(original_modification_request.new_decision_date)
- request_issue_decision_date = Date.parse(original_modification_request.decision_date)
-
- table = page.find("tbody")
- expect(table).to have_selector("tr", count: 1)
- table_row = table.first('tr[id^="table-row"]')
- expect(table_row).to have_content("Cancellation of request")
-
- expect(table_row).to have_content("Benefit type: Veterans Health Administration")
- expect(table_row).to have_content(
- "Current issue type: #{original_modification_request.issue_type}"
- )
- expect(table_row).to have_content(
- "Current issue description: #{original_modification_request.issue_description}"
- )
- expect(table_row).to have_content(
- "Current decision date: #{request_issue_decision_date.strftime('%m/%d/%Y')}"
- )
- expect(table_row).to have_content("New issue type: #{original_modification_request.new_issue_type}")
- expect(table_row).to have_content(
- "New issue description: #{original_modification_request.new_issue_description}"
- )
- expect(table_row).to have_content("New decision date: #{new_decision_date.strftime('%m/%d/%Y')}")
- expect(table_row).to have_content(
- "Modification request reason: #{original_modification_request.modification_request_reason}"
- )
- end
- end
- end
- end
-
- describe "check for cancelled claim" do
- let!(:cancelled_claim) do
- create(:supplemental_claim, :with_vha_issue, :with_update_users)
- end
-
- before do
- cancelled_claim.establish!
- cancelled_claim.request_issues.update(closed_status: "withdrawn", closed_at: Time.zone.now)
- cancelled_claim.tasks.update(status: "cancelled")
- cancelled_claim.reload
-
- visit "/decision_reviews/vha/tasks/#{cancelled_claim.tasks[0].id}/history"
- end
-
- context "should do expected details to show claim closed when cancelled" do
- it "Claim Cancelled" do
- click_filter_option("Claim closed (1)")
+ expect(page).to have_text("Viewing 1-#{number_of_events} of #{number_of_events} total")
- table = page.find("tbody")
- expect(table).to have_selector("tr", count: 1)
+ table = page.find("tbody")
+ expect(table).to have_selector("tr", count: number_of_events)
- table_row = table.first("tr")
- expect(table_row).to have_content("Claim closed")
- expect(table_row).to have_content("Claim cancelled.")
- end
+ events.each do |event|
+ expect(page).to have_text(event.readable_event_type)
end
end
end
diff --git a/spec/feature/non_comp/report_page_spec.rb b/spec/feature/non_comp/report_page_spec.rb
index dd022f03252..b714a8d328e 100644
--- a/spec/feature/non_comp/report_page_spec.rb
+++ b/spec/feature/non_comp/report_page_spec.rb
@@ -6,13 +6,11 @@
require_relative "../../../app/services/claim_change_history/change_history_filter_parser.rb"
feature "NonComp Report Page", :postgres do
- include DownloadHelpers
let(:non_comp_org) { VhaBusinessLine.singleton }
let(:user) { create(:default_user, css_id: "REPORT USER", full_name: "Report User") }
let(:vha_report_url) { "/decision_reviews/vha/report" }
before do
- clear_downloads
User.stub = user
non_comp_org.add_user(user)
OrganizationsUser.make_user_admin(user, non_comp_org)
@@ -58,8 +56,18 @@
expect(page).to have_button("Generate task report", disabled: false)
click_button "Generate task report"
+ # This might happen too fast for capybara
+ # expect(page).to have_button("Generate task report", disabled: true)
+ # expect(page).to have_content("Generating CSV...")
+
# Check the csv to make sure it returns the filter row, the column header row, and all 15 event rows
- change_history_csv_file(17)
+ csv_file = change_history_csv_file
+ number_of_rows = CSV.read(csv_file).length
+ expect(number_of_rows).to eq(17)
+
+ # CSV.foreach(csv_file) do |row|
+ # puts "Row: #{row}"
+ # end
# Add in some specific event filters now
fill_in_specific_event_filters(["Added issue", "Completed disposition"])
@@ -69,7 +77,9 @@
click_button "Generate task report"
# Check the csv to make sure it returns the filter row, the column header row, and the 6 event rows
- change_history_csv_file(8)
+ csv_file = change_history_csv_file
+ number_of_rows = CSV.read(csv_file).length
+ expect(number_of_rows).to eq(8)
clear_filters
@@ -85,7 +95,9 @@
expect(page).to have_button("Generate task report", disabled: false)
click_button "Generate task report"
- change_history_csv_file(6)
+ csv_file = change_history_csv_file
+ number_of_rows = CSV.read(csv_file).length
+ expect(number_of_rows).to eq(6)
# After submitting the form add one more condition and submit the form again
add_personnel_condition_with_values([user.full_name])
@@ -102,7 +114,9 @@
expect(page).to have_button("Generate task report", disabled: false)
click_button "Generate task report"
- change_history_csv_file(2)
+ csv_file = change_history_csv_file
+ number_of_rows = CSV.read(csv_file).length
+ expect(number_of_rows).to eq(2)
end
it "should submit several types of status reports successfully and generate CSVs for each submission" do
@@ -116,7 +130,9 @@
click_button "Generate task report"
# Check the csv to make sure it returns the filter row, the column header row, and one event row per task (3)
- change_history_csv_file(5)
+ csv_file = change_history_csv_file
+ number_of_rows = CSV.read(csv_file).length
+ expect(number_of_rows).to eq(5)
# Click the status Summary radio button
find("label", text: "Summary").click
@@ -125,7 +141,9 @@
click_button "Generate task report"
# Check the csv to make sure it returns the filter row, the column header row, all 15 event rows
- change_history_csv_file(17)
+ csv_file = change_history_csv_file
+ number_of_rows = CSV.read(csv_file).length
+ expect(number_of_rows).to eq(17)
# Select a specific status of cancelled
fill_in_specific_status_filters(["Cancelled"])
@@ -134,7 +152,9 @@
click_button "Generate task report"
# Check the csv to make sure it returns the filter row, the column header row, and 0 event rows
- change_history_csv_file(2)
+ csv_file = change_history_csv_file
+ number_of_rows = CSV.read(csv_file).length
+ expect(number_of_rows).to eq(2)
clear_filters
@@ -148,7 +168,9 @@
click_button "Generate task report"
# Check the csv to make sure it returns the filter row, the column header row, and the last two HLR event rows
- change_history_csv_file(4)
+ csv_file = change_history_csv_file
+ number_of_rows = CSV.read(csv_file).length
+ expect(number_of_rows).to eq(4)
# Add another condition that has no matches
add_issue_disposition_with_values(["Denied"])
@@ -156,7 +178,9 @@
click_button "Generate task report"
# Check the csv to make sure it returns the filter row, the column header row, all 0 event rows
- change_history_csv_file(2)
+ csv_file = change_history_csv_file
+ number_of_rows = CSV.read(csv_file).length
+ expect(number_of_rows).to eq(2)
end
context "when request fails" do
@@ -282,7 +306,7 @@ def add_personnel_condition_with_values(values)
def add_decision_review_condition_with_values(values)
add_condition("Decision Review Type")
- fill_in_multi_select_condition(values, "Decision Review Type", ".decision-review-types")
+ fill_in_decision_review_type(values)
end
def add_days_waiting_with_values(time_range, num_days, end_days = nil)
@@ -297,7 +321,7 @@ def add_issue_disposition_with_values(values)
def add_issue_type_with_values(values)
add_condition("Issue Type")
- fill_in_multi_select_condition(values, "Issue Type", ".issue-types")
+ fill_in_multi_select_condition(values, "Issue Type", "issue-types")
end
def clear_filters
@@ -306,19 +330,14 @@ def clear_filters
expect(page).to have_button("Generate task report", disabled: true)
end
- def latest_download
- downloads.max_by { |file| File.mtime(file) }
- end
-
- def download_csv
- wait_for_download
- CSV.read(latest_download)
- end
+ def change_history_csv_file
+ sleep 5
+ # Copied from Capybara setup
+ download_directory = Rails.root.join("tmp/downloads_#{ENV['TEST_SUBCATEGORY'] || 'all'}")
+ list_of_files = Dir.glob(File.join(download_directory, "*")).select { |f| File.file?(f) }
+ latest_file = list_of_files.max_by { |f| File.birthtime(f) }
- def change_history_csv_file(rows)
- csv_file = download_csv
- expect(csv_file).to_not eq(nil)
- expect(csv_file.length).to eq(rows)
- clear_downloads
+ expect(latest_file).to_not eq(nil)
+ latest_file
end
end
diff --git a/spec/feature/non_comp/reviews_spec.rb b/spec/feature/non_comp/reviews_spec.rb
index 1cf36ba917c..f250c84ca98 100644
--- a/spec/feature/non_comp/reviews_spec.rb
+++ b/spec/feature/non_comp/reviews_spec.rb
@@ -10,7 +10,6 @@
let(:veteran_b_on_hold) { create(:veteran, first_name: "Gaius", participant_id: "601172", ssn: "191039395") }
let(:veteran_a_pending) { create(:veteran, first_name: "Dave", participant_id: "55667788", ssn: "123456789") }
let(:veteran_c) { create(:veteran, first_name: "Ccc", participant_id: "1002345", ssn: "128455943") }
- let(:veteran_remand) { create(:veteran, first_name: "B. Stark", participant_id: "100234567", ssn: "128455999") }
let(:claimant_type) { :veteran_claimant }
let(:hlr_a_on_hold) do
create(:higher_level_review, veteran_file_number: veteran_a_on_hold.file_number, claimant_type: claimant_type)
@@ -25,7 +24,6 @@
let(:hlr_b) { create(:higher_level_review, veteran_file_number: veteran_b.file_number, claimant_type: claimant_type) }
let(:hlr_c) { create(:higher_level_review, veteran_file_number: veteran_c.file_number, claimant_type: claimant_type) }
let(:appeal) { create(:appeal, veteran: veteran_c) }
- let(:remand) { create(:remand, veteran_file_number: veteran_remand.file_number, claimant_type: claimant_type) }
let!(:request_issue_a) do
create(:request_issue, :nonrating, nonrating_issue_category: "Caregiver | Other", decision_review: hlr_a)
@@ -59,10 +57,6 @@
create(:request_issue, :nonrating, nonrating_issue_category: "Other", decision_review: hlr_a_pending)
end
- let!(:remand_request_issue) do
- create(:request_issue, :nonrating, nonrating_issue_category: "Beneficiary Travel", decision_review: remand)
- end
-
let!(:modification_request_a) do
create(:issue_modification_request, decision_review: hlr_a_pending, requestor: user)
end
@@ -113,12 +107,7 @@
:in_progress,
appeal: appeal,
assigned_to: non_comp_org,
- assigned_at: 1.day.ago),
- create(:higher_level_review_task,
- :in_progress,
- appeal: remand,
- assigned_to: non_comp_org,
- assigned_at: today)
+ assigned_at: 1.day.ago)
]
end
@@ -199,9 +188,9 @@ def current_table_rows
scenario "displays tasks page with decision_review_queue_ssn_column feature toggle disabled" do
visit BASE_URL
expect(page).to have_content("Veterans Health Administration")
- expect(page).to have_content("Incomplete Tasks (2)")
- expect(page).to have_content("Pending Tasks (1)")
- expect(page).to have_content("In Progress Tasks (4)")
+ expect(page).to have_content("Incomplete Tasks")
+ expect(page).to have_content("Pending Tasks")
+ expect(page).to have_content("In Progress Tasks")
expect(page).to have_content("Completed Tasks")
# default is the in progress page if no tab is specified in the url
@@ -209,24 +198,21 @@ def current_table_rows
expect(page).to have_content("Issues")
expect(page).to have_content("Issue Type")
expect(page).to have_content("Higher-Level Review", count: 2)
- expect(page).to have_content("Remand", count: 1)
expect(page).to have_content("Board Grant")
expect(page).to have_content(veteran_a.name)
expect(page).to have_content(veteran_b.name)
expect(page).to have_content(veteran_c.name)
- expect(page).to have_content(veteran_remand.name)
expect(page).to_not have_content(veteran_a_on_hold.name)
expect(page).to_not have_content(veteran_b_on_hold.name)
expect(page).to have_content(vet_id_column_header)
expect(page).to have_content(vet_a_id_column_value)
expect(page).to have_content(vet_b_id_column_value)
expect(page).to have_content(vet_c_id_column_value)
-
expect(page).to have_no_content(search_box_label)
# ordered by assigned_at descending
expect(page).to have_content(
- /#{veteran_b.name}.+\s#{veteran_remand.name}.+\s#{veteran_c.name}.+\s#{veteran_a.name}/
+ /#{veteran_b.name}.+\s#{veteran_c.name}.+\s#{veteran_a.name}/
)
click_on "Incomplete Tasks"
@@ -255,6 +241,7 @@ def current_table_rows
expect(page).to have_content("Higher-Level Review", count: 2)
expect(page).to have_content("Date Completed")
+ # decision_date = hlr_b.request_issues.first.decision_date.strftime("%m\/%d\/%y")
decision_date = hlr_b.tasks.first.closed_at.strftime("%m/%d/%y")
# ordered by closed_at descending
expect(page).to have_content(
@@ -275,9 +262,9 @@ def current_table_rows
scenario "displays tasks page" do
visit BASE_URL
expect(page).to have_content("Veterans Health Administration")
- expect(page).to have_content("Incomplete Tasks (2)")
- expect(page).to have_content("Pending Tasks (1)")
- expect(page).to have_content("In Progress Tasks (4)")
+ expect(page).to have_content("Incomplete Tasks")
+ expect(page).to have_content("Pending Tasks")
+ expect(page).to have_content("In Progress Tasks")
expect(page).to have_content("Completed Tasks")
# default is the in progress page if no tab is specified in the url
@@ -387,7 +374,7 @@ def current_table_rows
table_rows = current_table_rows
expect(table_rows.last.include?("Caregiver | Other\nCHAMPVA\n")).to eq true
- expect(table_rows.first.include?(" Beneficiary Travel ")).to eq true
+ expect(table_rows.first.include?(" Camp Lejune Family Member ")).to eq true
# Issue Types desc
order_buttons[:issues_type].click
@@ -396,7 +383,7 @@ def current_table_rows
)
table_rows = current_table_rows
- expect(table_rows.last.include?(" Beneficiary Travel ")).to eq true
+ expect(table_rows.last.include?(" Camp Lejune Family Member ")).to eq true
expect(table_rows.first.include?("Caregiver | Other\nCHAMPVA")).to eq true
# Days waiting asc
@@ -528,30 +515,22 @@ def current_table_rows
end
end
- scenario "filtering reviews by appeal type" do
+ scenario "filtering reviews by appeal type", skip: true do
visit BASE_URL
-
- expect(page).to have_content("Higher-Level Review")
- expect(page).to have_content("Board Grant")
- expect(page).to have_content("Remand")
-
find("[aria-label='Filter by type']").click
# Check that task counts are being transmitted correctly from backend
expect(page).to have_content("Board Grant (1)")
expect(page).to have_content("Higher-Level Review (2)")
- expect(page).to have_content("Remand (1)")
find("label", text: "Higher-Level Review").click
- expect(page).to have_content("Higher-Level Review", count: 2)
+ expect(page).to have_content("Higher-Level Review")
expect(page).to_not have_content("Board Grant")
- expect(page).to_not have_content("Remand")
find(".cf-clear-filters-link").click
expect(page).to have_content("Board Grant")
- expect(page).to have_content("Remand")
end
- scenario "filtering reviews by issue type" do
+ scenario "filtering reviews by issue type", skip: true do
visit BASE_URL
find("[aria-label='Filter by issue type']").click
@@ -559,7 +538,6 @@ def current_table_rows
expect(page).to have_content("Caregiver | Other (1)")
expect(page).to have_content("Camp Lejune Family Member (1)")
expect(page).to have_content("CHAMPVA (1)")
- expect(page).to have_content("Beneficiary Travel (1)")
find("label", text: "Caregiver | Other").click
expect(page).to have_content("Caregiver | Other")
@@ -569,19 +547,16 @@ def current_table_rows
# Verify the filter counts for the incomplete tab
click_on "Incomplete Tasks"
- expect(page).to have_content(COPY::VHA_INCOMPLETE_TAB_DESCRIPTION)
find("[aria-label='Filter by issue type']").click
expect(page).to have_content("Clothing Allowance (1)")
expect(page).to have_content("Other (1)")
click_on "Pending Tasks"
- expect(page).to have_content(COPY::VHA_PENDING_REQUESTS_TAB_DESCRIPTION)
find("[aria-label='Filter by issue type']").click
expect(page).to have_content("Other (1)")
# Verify the filter counts for the completed tab
click_on "Completed Tasks"
- expect(page).to have_content(COPY::QUEUE_PAGE_COMPLETE_LAST_SEVEN_DAYS_TASKS_DESCRIPTION)
find("[aria-label='Filter by issue type']").click
expect(page).to have_content("Apportionment (1)")
expect(page).to have_content("Camp Lejune Family Member (1)")
@@ -775,17 +750,17 @@ def current_table_rows
assigned_at: last_week)
]
end
+ scenario "Duplicate issue types like Beneficiary Travel should be removed from the visible list of issue types" do
+ visit BASE_URL
+ hlr_c_regex = /#{veteran_c.name} #{veteran_c.ssn} 3\nBeneficiary Travel\nEligibility for Dental Treatment\n6 days Higher-Level Review/ # rubocop:disable Layout/LineLength
+ expect(page).to have_content(
+ hlr_c_regex
+ )
+ end
scenario "Ordering issue types should ignore duplicates when ordering" do
visit BASE_URL
- step "Duplicate issue types like Beneficiary Travel should be removed from the visible list of issue types" do
- hlr_c_regex = /#{veteran_c.name} #{veteran_c.ssn} 3\nBeneficiary Travel\nEligibility for Dental Treatment\n6 days Higher-Level Review/ # rubocop:disable Layout/LineLength
- expect(page).to have_content(
- hlr_c_regex
- )
- end
-
issues_type_sort_button = find(:xpath, '//*[@id="case-table-description"]/thead/tr/th[4]/span/span[2]')
issues_type_sort_button.click
@@ -813,7 +788,7 @@ def current_table_rows
expect(table_rows.first.include?("B Veteran")).to eq true
end
- scenario "The Issue type column should orderable and filterable at the same time" do
+ scenario "The Issue type column should orderable and filterable at the same time", skip: true do
visit BASE_URL
issues_type_sort_button = find(:xpath, '//*[@id="case-table-description"]/thead/tr/th[4]/span/span[2]')
@@ -841,9 +816,6 @@ def current_table_rows
table_rows = current_table_rows
- sort_header = find('th[aria-labelledby="header-appealIssueTypes"]')
- expect(sort_header[:'aria-sort']).to eq("ascending")
-
expect(table_rows.first.include?("A Veteran")).to eq true
expect(table_rows.last.include?("D Veteran")).to eq true
@@ -851,9 +823,6 @@ def current_table_rows
table_rows = current_table_rows
- sort_header = find('th[aria-labelledby="header-appealIssueTypes"]')
- expect(sort_header[:'aria-sort']).to eq("descending")
-
expect(table_rows.first.include?("D Veteran")).to eq true
expect(table_rows.last.include?("A Veteran")).to eq true
@@ -861,9 +830,6 @@ def current_table_rows
expect(page).to have_content("Spina Bifida Treatment (Non-Compensation)")
table_rows = current_table_rows
-
- sort_header = find('th[aria-labelledby="header-appealIssueTypes"]')
- expect(sort_header[:'aria-sort']).to eq("descending")
expect(table_rows.first.include?("B Veteran")).to eq true
expect(table_rows.last.include?("A Veteran")).to eq true
end
@@ -999,7 +965,7 @@ def current_table_rows
pagination = page.find(class: "cf-pagination-pages", match: :first)
pagination.find("Button", text: "2", match: :first).click
- expect(page).to have_content("Viewing 16-30 of 34 total")
+ expect(page).to have_content("Viewing 16-30 of 33 total")
# Navigate to another tab
click_button("Incomplete Tasks")
@@ -1031,11 +997,9 @@ def current_table_rows
expect(page).to have_content("Issue Type")
expect(page).to have_content("Higher-Level Review", count: 4)
expect(page).to have_content("Board Grant")
- expect(page).to have_content("Remand")
expect(page).to have_content(veteran_a.name)
expect(page).to have_content(veteran_b.name)
expect(page).to have_content(veteran_c.name)
- expect(page).to have_content(veteran_remand.name)
expect(page).to have_content(veteran_a_on_hold.name)
expect(page).to have_content(veteran_b_on_hold.name)
expect(page).to have_content(vet_id_column_header)
@@ -1046,7 +1010,7 @@ def current_table_rows
# ordered by assigned_at descending
expect(page).to have_content(
- /#{veteran_b.name}.+\s#{veteran_remand.name}.+\s#{veteran_c.name}.+\s#{veteran_a.name}/
+ /#{veteran_b.name}.+\s#{veteran_c.name}.+\s#{veteran_a.name}/
)
click_on "Completed Tasks"
diff --git a/spec/jobs/missing_vacols_hearing_job_fix_spec.rb b/spec/jobs/missing_vacols_hearing_job_fix_spec.rb
deleted file mode 100644
index 69759d8d59f..00000000000
--- a/spec/jobs/missing_vacols_hearing_job_fix_spec.rb
+++ /dev/null
@@ -1,87 +0,0 @@
-# frozen_string_literal: true
-
-describe MissingVacolsHearingJobFix do
- subject { MissingVacolsHearingJobFix.new }
- let!(:hearing) { create(:legacy_hearing, :with_tasks) }
- let!(:hearing2) { create(:legacy_hearing, :with_tasks) }
- let!(:hearing3) { create(:legacy_hearing, :with_tasks) }
-
- context "missing_vacols_hearing" do
- context "when AssignHearingDispositionTask is outdated and the associated hearing doesn't exist in VACOLS" do
- it "cancels the task" do
- task = AssignHearingDispositionTask.find_by(appeal: hearing.appeal)
- task2 = AssignHearingDispositionTask.find_by(appeal: hearing2.appeal)
- task3 = AssignHearingDispositionTask.find_by(appeal: hearing3.appeal)
-
- vacols_case2 = VACOLS::CaseHearing.find_by(hearing_pkseq: task2.hearing.vacols_id)
- vacols_case3 = VACOLS::CaseHearing.find_by(hearing_pkseq: task3.hearing.vacols_id)
-
- task2.update(assigned_at: 3.years.ago)
- task3.update(assigned_at: 1.year.ago)
-
- expect(task.status).to eq("assigned")
- expect(task2.status).to eq("assigned")
- expect(VACOLS::CaseHearing.count).to eq(3)
- vacols_case2.destroy!
- vacols_case3.destroy!
-
- expect(VACOLS::CaseHearing.count).to eq(1)
- subject.perform
-
- expect(VACOLS::CaseHearing.count).to eq(1)
- expect(task.reload.status).to eq("assigned")
- expect(task2.reload.status).to eq("cancelled")
- expect(task3.reload.status).to eq("cancelled")
- expect(task.hearing).to_not eq(nil)
- expect(task3.hearing).to_not eq(nil)
- end
- end
- context "when one of the AssignHearingDispositionTasks does not have an associated hearing" do
- it "continues with the rest of the tasks and logs the error" do
- allow(Rails.logger).to receive(:error)
- task2 = AssignHearingDispositionTask.find_by(appeal: hearing2.appeal)
- task3 = AssignHearingDispositionTask.find_by(appeal: hearing3.appeal)
- vacols_case2 = VACOLS::CaseHearing.find_by(hearing_pkseq: task2.hearing.vacols_id)
- vacols_case3 = VACOLS::CaseHearing.find_by(hearing_pkseq: task3.hearing.vacols_id)
- task2.update(assigned_at: 3.years.ago)
- task3.update(assigned_at: 1.year.ago)
- string = "ALERT------- Task Id's: #{task2.id} are missing associated "\
- "hearings. This requires manual remediation------- ALERT"
- vacols_case2.destroy
- vacols_case3.destroy
- task2.hearing.destroy
- expect(task2.status).to eq(Constants.TASK_STATUSES.assigned)
- expect(task3.status).to eq(Constants.TASK_STATUSES.assigned)
- expect(task3.status).to eq(Constants.TASK_STATUSES.assigned)
- Rails.logger.should_receive(:error).with(string)
- subject.perform
- expect(task3.reload.status).to eq(Constants.TASK_STATUSES.cancelled)
- expect(task2.reload.status).to eq(Constants.TASK_STATUSES.assigned)
- end
- end
- context "when one of the qualifying tasks is outside of the assigned_at parameters " do
- it "should not process tasks that have an 'assigned_at' of over 7 years or before 5 months" do
- task2 = AssignHearingDispositionTask.find_by(appeal: hearing2.appeal)
- task3 = AssignHearingDispositionTask.find_by(appeal: hearing3.appeal)
- vacols_case2 = VACOLS::CaseHearing.find_by(hearing_pkseq: task2.hearing.vacols_id)
- vacols_case3 = VACOLS::CaseHearing.find_by(hearing_pkseq: task3.hearing.vacols_id)
-
- task2.update(assigned_at: 3.months.ago)
- task3.update(assigned_at: 8.years.ago)
- vacols_case2.destroy
- vacols_case3.destroy
-
- expect(task2.status).to eq(Constants.TASK_STATUSES.assigned)
- expect(task3.status).to eq(Constants.TASK_STATUSES.assigned)
- subject.perform
- expect(task2.status).to eq(Constants.TASK_STATUSES.assigned)
- expect(task3.status).to eq(Constants.TASK_STATUSES.assigned)
- end
- end
- context "when there are no qualifying AssignHearingDispositionTasks" do
- it "should not fail/ return a successful message" do
- expect(subject.perform).to be_truthy
- end
- end
- end
-end
diff --git a/spec/lib/helpers/association_wrapper_spec.rb b/spec/lib/helpers/association_wrapper_spec.rb
index 4c8140a921a..86e157dc91b 100644
--- a/spec/lib/helpers/association_wrapper_spec.rb
+++ b/spec/lib/helpers/association_wrapper_spec.rb
@@ -26,7 +26,6 @@
[:legacy_appeal, "LegacyAppeal", "LegacyAppeal", nil, nil],
[:supplemental_claim, "SupplementalClaim", "SupplementalClaim", nil, nil],
[:higher_level_review, "HigherLevelReview", "HigherLevelReview", nil, nil],
- [:remand, "Remand", "Remand", nil, nil],
[:attorney_case_reviews, "AttorneyCaseReview", nil, nil, nil],
[:task_timers, "TaskTimer", nil, nil, nil],
[:cached_appeal, "CachedAppeal", nil, nil, nil]
@@ -46,8 +45,7 @@
[:ama_appeal, nil],
[:legacy_appeal, nil],
[:higher_level_review, nil],
- [:supplemental_claim, nil],
- [:remand, nil]
+ [:supplemental_claim, nil]
]
expect(subject.select_associations.map { |assoc| [assoc.name, assoc.options[:foreign_key]] }).to match_array [
[:versions, nil],
@@ -64,8 +62,7 @@
[:ama_appeal, "appeal_id"],
[:legacy_appeal, "appeal_id"],
[:higher_level_review, "appeal_id"],
- [:supplemental_claim, "appeal_id"],
- [:remand, "appeal_id"]
+ [:supplemental_claim, "appeal_id"]
]
map_foreign_keys = lambda { |assoc|
@@ -89,8 +86,6 @@
[:legacy_appeal, true, false, "appeal_id", "legacy_appeal_id", nil],
[:higher_level_review, true, false, "appeal_id", "higher_level_review_id", nil],
[:supplemental_claim, true, false, "appeal_id", "supplemental_claim_id", nil],
- # Polymorphic `belongs_to :appeal`-related STI associations
- [:remand, true, false, "appeal_id", "remand_id", nil],
# has_many declared in Task
# Note: JudgeCaseReview is not listed; that `belongs_to` association can be traced from JudgeCaseReview
[:attorney_case_reviews, false, false, "task_id", "attorney_case_review_id", nil],
diff --git a/spec/models/appeal_spec.rb b/spec/models/appeal_spec.rb
index 038ba98ee74..48f10bb8329 100644
--- a/spec/models/appeal_spec.rb
+++ b/spec/models/appeal_spec.rb
@@ -278,15 +278,14 @@
let!(:not_remanded_decision_issue) { create(:decision_issue, decision_review: appeal) }
- it "creates remand, request issues, and starts processing" do
+ it "creates supplemental claim, request issues, and starts processing" do
subject
- remanded_supplemental_claims = Remand.where(decision_review_remanded: appeal)
+ remanded_supplemental_claims = SupplementalClaim.where(decision_review_remanded: appeal)
expect(remanded_supplemental_claims.count).to eq(2)
vbms_remand = remanded_supplemental_claims.find_by(benefit_type: "compensation")
- expect(vbms_remand.type).to eq(Remand.name)
expect(vbms_remand).to have_attributes(
receipt_date: decision_date.to_date
)
@@ -298,7 +297,6 @@
expect(vbms_remand.tasks).to be_empty
caseflow_remand = remanded_supplemental_claims.find_by(benefit_type: "nca")
- expect(caseflow_remand.type).to eq(Remand.name)
expect(caseflow_remand).to have_attributes(
receipt_date: decision_date.to_date
)
diff --git a/spec/models/business_line_spec.rb b/spec/models/business_line_spec.rb
index ef3205c1c03..f9e382d4742 100644
--- a/spec/models/business_line_spec.rb
+++ b/spec/models/business_line_spec.rb
@@ -29,18 +29,6 @@
end
end
- context "Remand tasks" do
- let!(:task_filters) { ["col=decisionReviewType&val=Remand"] }
-
- it "Returning only Remand tasks" do
- expect(
- subject.all? do |task|
- task.type == DecisionReviewTask.name && task.appeal.type == Remand.name
- end
- ).to eq true
- end
- end
-
context "Veteran Record Request tasks" do
let!(:task_filters) { ["col=decisionReviewType&val=VeteranRecordRequest"] }
@@ -67,6 +55,7 @@
it "Attempting to return only Board Grant Effectuation tasks amounts to either only completed tasks
or any empty result" do
tasks = subject
+
expect(tasks.empty? || tasks.all?(&:completed?)).to eq true
end
end
@@ -138,10 +127,6 @@
create_list(:higher_level_review_task, 5, assigned_to: business_line)
end
- let!(:remand_tasks_on_active_decision_reviews) do
- create_list(:remand_vha_task, 5, assigned_to: business_line)
- end
-
let!(:board_grant_effectuation_tasks) do
tasks = create_list(:board_grant_effectuation_task, 5, assigned_to: business_line)
@@ -180,13 +165,12 @@
after { FeatureToggle.disable!(:board_grant_effectuation_task) }
it "All tasks associated with active decision reviews and BoardGrantEffectuationTasks are included" do
- expect(subject.size).to eq 25
+ expect(subject.size).to eq 20
expect(subject.map(&:id)).to match_array(
(veteran_record_request_on_active_appeals +
board_grant_effectuation_tasks +
hlr_tasks_on_active_decision_reviews +
- sc_tasks_on_active_decision_reviews +
- remand_tasks_on_active_decision_reviews
+ sc_tasks_on_active_decision_reviews
).pluck(:id)
)
end
@@ -198,12 +182,11 @@
before { FeatureToggle.disable!(:board_grant_effectuation_task) }
it "All tasks associated with active decision reviews are included, but not BoardGrantEffectuationTasks" do
- expect(subject.size).to eq 20
+ expect(subject.size).to eq 15
expect(subject.map(&:id)).to match_array(
(veteran_record_request_on_active_appeals +
hlr_tasks_on_active_decision_reviews +
- sc_tasks_on_active_decision_reviews +
- remand_tasks_on_active_decision_reviews
+ sc_tasks_on_active_decision_reviews
).pluck(:id)
)
end
@@ -262,14 +245,6 @@
)
end
- let!(:completed_remand_tasks) do
- add_veteran_and_request_issues_to_decision_reviews(
- complete_all_tasks(
- create_list(:remand_task, 5, assigned_to: business_line)
- )
- )
- end
-
let!(:open_sc_tasks) do
add_veteran_and_request_issues_to_decision_reviews(
create_list(:supplemental_claim_task, 5, assigned_to: business_line)
@@ -320,13 +295,12 @@
let!(:task_filters) { nil }
it "All completed tasks are included in results" do
- expect(subject.size).to eq 25
+ expect(subject.size).to eq 20
expect(subject.map(&:id)).to match_array(
(completed_hlr_tasks +
completed_sc_tasks +
completed_board_grant_effectuation_tasks +
- completed_veteran_record_requests +
- completed_remand_tasks
+ completed_veteran_record_requests
).pluck(:id)
)
end
@@ -420,10 +394,6 @@
create_list(:supplemental_claim_vha_task, 5, assigned_to: business_line)
end
- let!(:remand_tasks_on_active_decision_reviews) do
- create_list(:remand_vha_task, 5, assigned_to: business_line)
- end
-
# Set some on hold tasks as well
let!(:on_hold_sc_tasks_on_active_decision_reviews) do
tasks = create_list(:supplemental_claim_vha_task, 5, assigned_to: business_line)
@@ -473,14 +443,13 @@
after { FeatureToggle.disable!(:board_grant_effectuation_task) }
it "All tasks associated with active decision reviews and BoardGrantEffectuationTasks are included" do
- expect(subject.size).to eq 30
+ expect(subject.size).to eq 25
expect(subject.map(&:id)).to match_array(
(veteran_record_request_on_active_appeals +
board_grant_effectuation_tasks +
hlr_tasks_on_active_decision_reviews +
sc_tasks_on_active_decision_reviews +
- on_hold_sc_tasks_on_active_decision_reviews +
- remand_tasks_on_active_decision_reviews
+ on_hold_sc_tasks_on_active_decision_reviews
).pluck(:id)
)
end
@@ -492,13 +461,12 @@
before { FeatureToggle.disable!(:board_grant_effectuation_task) }
it "All tasks associated with active decision reviews are included, but not BoardGrantEffectuationTasks" do
- expect(subject.size).to eq 25
+ expect(subject.size).to eq 20
expect(subject.map(&:id)).to match_array(
(veteran_record_request_on_active_appeals +
hlr_tasks_on_active_decision_reviews +
sc_tasks_on_active_decision_reviews +
- on_hold_sc_tasks_on_active_decision_reviews +
- remand_tasks_on_active_decision_reviews
+ on_hold_sc_tasks_on_active_decision_reviews
).pluck(:id)
)
end
@@ -518,29 +486,6 @@
benefit_type: "vha",
claimant_type: :dependent_claimant))
end
- let!(:hlr_task_with_imr) do
- create(:issue_modification_request,
- :with_higher_level_review,
- :edit_of_request,
- nonrating_issue_category: "Medical and Dental Care Reimbursement",
- nonrating_issue_description: "Reimbursement note description")
- end
-
- let!(:sc_task_with_imr) do
- create(:issue_modification_request,
- :with_supplemental_claim,
- :edit_of_request,
- nonrating_issue_category: "Medical and Dental Care Reimbursement",
- nonrating_issue_description: "Reimbursement note description")
- end
-
- let!(:remand_task) do
- create(:remand_vha_task,
- appeal: create(:remand,
- benefit_type: "vha",
- claimant_type: :dependent_claimant))
- end
-
let(:decision_issue) { create(:decision_issue, disposition: "denied", benefit_type: hlr_task.appeal.benefit_type) }
let(:intake_user) { create(:user, full_name: "Alexander Dewitt", css_id: "ALEXVHA", station_id: "103") }
let(:decision_user) { create(:user, full_name: "Gaius Baelsar", css_id: "GAIUSVHA", station_id: "104") }
@@ -549,7 +494,7 @@
let(:hlr_task_1_ri_1_expectation) do
a_hash_including(
"nonrating_issue_category" => "Caregiver | Other",
- "nonrating_issue_description" => "VHA - Caregiver",
+ "nonrating_issue_description" => "VHA - Caregiver ",
"task_id" => hlr_task.id,
"veteran_file_number" => hlr_task.appeal.veteran_file_number,
"intake_user_name" => hlr_task.appeal.intake.user.full_name,
@@ -587,7 +532,7 @@
let(:hlr_task_2_ri_1_expectation) do
a_hash_including(
"nonrating_issue_category" => "Caregiver | Other",
- "nonrating_issue_description" => "VHA - Caregiver",
+ "nonrating_issue_description" => "VHA - Caregiver ",
"task_id" => hlr_task2.id,
"veteran_file_number" => hlr_task2.appeal.veteran_file_number,
"intake_user_name" => intake_user.full_name,
@@ -641,48 +586,6 @@
"days_waiting" => (Time.zone.today - Date.parse(sc_task.assigned_at.iso8601)).to_i
)
end
- let(:imr_hlr_expectation) do
- a_hash_including(
- "requested_issue_type" => "Medical and Dental Care Reimbursement",
- "requested_issue_description" => "Reimbursement note description",
- "remove_original_issue" => false,
- "modification_request_reason" => "I edited this request.",
- "request_type" => "addition",
- "issue_modification_request_status" => "assigned",
- "decision_review_type" => "HigherLevelReview"
- )
- end
- let(:imr_sc_expectation) do
- a_hash_including(
- "requested_issue_type" => "Medical and Dental Care Reimbursement",
- "requested_issue_description" => "Reimbursement note description",
- "remove_original_issue" => false,
- "modification_request_reason" => "I edited this request.",
- "request_type" => "addition",
- "issue_modification_request_status" => "assigned",
- "decision_reason" => nil,
- "decision_review_type" => "SupplementalClaim"
- )
- end
- let(:remand_task_1_ri_1_expectation) do
- a_hash_including(
- "nonrating_issue_category" => "Clothing Allowance",
- "nonrating_issue_description" => "This is a Clothing Allowance issue",
- "task_id" => remand_task.id,
- "veteran_file_number" => remand_task.appeal.veteran_file_number,
- "intake_user_name" => nil,
- "intake_user_css_id" => nil,
- "intake_user_station_id" => nil,
- "disposition" => nil,
- "decision_user_name" => nil,
- "decision_user_css_id" => nil,
- "decision_user_station_id" => nil,
- "claimant_name" => remand_task.appeal.claimant.name,
- "task_status" => remand_task.status,
- "request_issue_benefit_type" => "vha",
- "days_waiting" => (Time.zone.today - Date.parse(remand_task.assigned_at.iso8601)).to_i
- )
- end
let(:all_expectations) do
[
@@ -690,8 +593,7 @@
hlr_task_1_ri_2_expectation,
hlr_task_2_ri_1_expectation,
hlr_task_2_ri_2_expectation,
- sc_task_1_ri_1_expectation,
- remand_task_1_ri_1_expectation
+ sc_task_1_ri_1_expectation
]
end
@@ -704,16 +606,8 @@
nonrating_issue_category: "Camp Lejune Family Member",
nonrating_issue_description: "This is a Camp Lejune issue",
benefit_type: "vha")
- remand_issue = create(:request_issue,
- nonrating_issue_category: "Clothing Allowance",
- nonrating_issue_description: "This is a Clothing Allowance issue",
- benefit_type: "vha",
- decision_review: remand_task.appeal)
hlr_task.appeal.request_issues << issue
hlr_task2.appeal.request_issues << issue2
- remand_task.appeal.request_issues << remand_issue
- remand_task.save
- remand_task.reload
# Add a different intake user to the second hlr task for data differences
second_intake = hlr_task2.appeal.intake
@@ -747,22 +641,21 @@
context "without filters" do
it "should return all rows" do
- expect(subject.count).to eq 8
+ expect(subject.count).to eq 5
expect(subject.entries).to include(*all_expectations)
end
end
context "with task_id filter" do
context "with multiple task ids" do
- let(:change_history_filters) { { task_id: [hlr_task.id, sc_task.id, remand_task.id] } }
+ let(:change_history_filters) { { task_id: [hlr_task.id, sc_task.id] } }
it "should return rows for all matching ids" do
- expect(subject.entries.count).to eq(4)
+ expect(subject.entries.count).to eq(3)
expect(subject.entries).to include(
hlr_task_1_ri_1_expectation,
hlr_task_1_ri_2_expectation,
- sc_task_1_ri_1_expectation,
- remand_task_1_ri_1_expectation
+ sc_task_1_ri_1_expectation
)
end
end
@@ -783,7 +676,7 @@
let(:change_history_filters) { { claim_type: "SupplementalClaim" } }
it "should only return rows for the filtered claim type" do
- expect(subject.entries.count).to eq(2)
+ expect(subject.entries.count).to eq(1)
expect(subject.entries).to include(sc_task_1_ri_1_expectation)
end
end
@@ -792,19 +685,8 @@
let(:change_history_filters) { { claim_type: "HigherLevelReview" } }
it "should only return rows for the filtered claim type" do
- expect(subject.entries.count).to eq(5)
- expect(subject.entries).to include(
- *(all_expectations - [sc_task_1_ri_1_expectation] - [remand_task_1_ri_1_expectation])
- )
- end
- end
-
- context "Remand claim filter" do
- let(:change_history_filters) { { claim_type: ["Remand"] } }
-
- it "should only return rows for the filtered claim type" do
- expect(subject.entries.count).to eq(1)
- expect(subject.entries).to include(remand_task_1_ri_1_expectation)
+ expect(subject.entries.count).to eq(4)
+ expect(subject.entries).to include(*(all_expectations - [sc_task_1_ri_1_expectation]))
end
end
end
@@ -821,32 +703,6 @@
end
end
- context "with task status filter pending" do
- let(:change_history_filters) { { task_status: ["pending"] } }
-
- it "should only return rows for the filtered status types" do
- expect(subject.entries.count).to eq(2)
- expect(subject.entries).to include(
- imr_hlr_expectation,
- imr_sc_expectation
- )
- end
- end
-
- context "with task status filter pending and completed" do
- let(:change_history_filters) { { task_status: %w[pending completed] } }
-
- it "should only return rows for the filtered status types" do
- expect(subject.entries.count).to eq(4)
- expect(subject.entries).to include(
- hlr_task_1_ri_1_expectation,
- hlr_task_1_ri_2_expectation,
- imr_hlr_expectation,
- imr_sc_expectation
- )
- end
- end
-
context "with dispositions filter" do
context "with multiple disposition filters" do
let(:change_history_filters) { { dispositions: %w[Granted denied] } }
@@ -873,12 +729,11 @@
let(:change_history_filters) { { dispositions: ["Blank"] } }
it "should return rows that do not have a disposition" do
- expect(subject.entries.count).to eq(6)
+ expect(subject.entries.count).to eq(3)
expect(subject.entries).to include(
hlr_task_2_ri_1_expectation,
hlr_task_2_ri_2_expectation,
- sc_task_1_ri_1_expectation,
- remand_task_1_ri_1_expectation
+ sc_task_1_ri_1_expectation
)
end
@@ -886,25 +741,16 @@
let(:change_history_filters) { { dispositions: %w[denied Blank] } }
it "should return rows that match denied or have no disposition" do
- expect(subject.entries.count).to eq(7)
+ expect(subject.entries.count).to eq(4)
expect(subject.entries).to include(
hlr_task_1_ri_2_expectation,
hlr_task_2_ri_1_expectation,
hlr_task_2_ri_2_expectation,
- sc_task_1_ri_1_expectation,
- remand_task_1_ri_1_expectation
+ sc_task_1_ri_1_expectation
)
end
end
end
-
- context "with a single disposition filter and task status pending" do
- let(:change_history_filters) { { dispositions: ["denied"], task_status: ["pending"] } }
-
- it "should only not return any row since pending task cannot have disposition" do
- expect(subject.entries.count).to eq(0)
- end
- end
end
context "with issue types filter" do
@@ -912,7 +758,7 @@
let(:change_history_filters) { { issue_types: ["Beneficiary Travel", "CHAMPVA"] } }
it "should only return rows for the filtered issue type values" do
- expect(subject.entries.count).to eq(3)
+ expect(subject.entries.count).to eq(2)
expect(subject.entries).to include(
hlr_task_1_ri_2_expectation,
sc_task_1_ri_1_expectation
@@ -924,22 +770,13 @@
let(:change_history_filters) { { issue_types: ["Caregiver | Other"] } }
it "should only return rows for the filtered issue type values" do
- expect(subject.entries.count).to eq(3)
+ expect(subject.entries.count).to eq(2)
expect(subject.entries).to include(
hlr_task_1_ri_1_expectation,
hlr_task_2_ri_1_expectation
)
end
end
-
- context "with a single issue type filter and pending task status" do
- let(:change_history_filters) { { issue_types: ["Caregiver | Other"], task_status: ["pending"] } }
-
- it "should only return rows for the filtered issue type values" do
- expect(subject.entries.count).to eq(1)
- expect(subject.entries).to include(imr_hlr_expectation)
- end
- end
end
context "with days waiting filter" do
@@ -947,7 +784,7 @@
let(:change_history_filters) { { days_waiting: { number_of_days: 6, operator: "<" } } }
it "should only return rows that are under the filtered days waiting value" do
- expect(subject.entries.count).to eq(4)
+ expect(subject.entries.count).to eq(2)
expect(subject.entries).to include(
hlr_task_2_ri_1_expectation,
hlr_task_2_ri_2_expectation
@@ -959,10 +796,9 @@
let(:change_history_filters) { { days_waiting: { number_of_days: 11, operator: ">" } } }
it "should only return rows that are over the filtered days waiting value" do
- expect(subject.entries.count).to eq(2)
+ expect(subject.entries.count).to eq(1)
expect(subject.entries).to include(
- sc_task_1_ri_1_expectation,
- remand_task_1_ri_1_expectation
+ sc_task_1_ri_1_expectation
)
end
end
@@ -984,9 +820,7 @@
it "should only return rows that are between the number of days and end of days" do
expect(subject.entries.count).to eq(4)
- expect(subject.entries).to include(
- *(all_expectations - [sc_task_1_ri_1_expectation] - [remand_task_1_ri_1_expectation])
- )
+ expect(subject.entries).to include(*(all_expectations - [sc_task_1_ri_1_expectation]))
end
end
end
@@ -1006,9 +840,7 @@
it "only return rows where either an intake, decisions, or updates user matches the station id" do
expect(subject.entries.count).to eq(4)
- expect(subject.entries).to include(
- *(all_expectations - [sc_task_1_ri_1_expectation] - [remand_task_1_ri_1_expectation])
- )
+ expect(subject.entries).to include(*(all_expectations - [sc_task_1_ri_1_expectation]))
end
end
@@ -1016,7 +848,7 @@
let(:change_history_filters) { { facilities: ["101"] } }
it "only return rows where either an intake, decisions, or updates user matches the station id" do
- expect(subject.entries.count).to eq(5)
+ expect(subject.entries.count).to eq(3)
expect(subject.entries).to include(
hlr_task_1_ri_1_expectation,
hlr_task_1_ri_2_expectation,
@@ -1041,9 +873,7 @@
it "only return rows where either an intake, decisions, or updates user matches the css_ids" do
expect(subject.entries.count).to eq(4)
- expect(subject.entries).to include(
- *(all_expectations - [sc_task_1_ri_1_expectation] - [remand_task_1_ri_1_expectation])
- )
+ expect(subject.entries).to include(*(all_expectations - [sc_task_1_ri_1_expectation]))
end
end
@@ -1075,20 +905,9 @@
{ issue_types: ["Beneficiary Travel", "CHAMPVA"], claim_type: "SupplementalClaim" }
end
- it "should only return rows that match both filters" do
- expect(subject.entries.count).to eq(2)
- expect(subject.entries).to include(sc_task_1_ri_1_expectation)
- end
- end
-
- context "multiple issue types and claim type and task status pending" do
- let(:change_history_filters) do
- { issue_types: ["Beneficiary Travel", "CHAMPVA"], claim_type: "SupplementalClaim", task_status: ["pending"] }
- end
-
it "should only return rows that match both filters" do
expect(subject.entries.count).to eq(1)
- expect(subject.entries).to include(imr_sc_expectation)
+ expect(subject.entries).to include(sc_task_1_ri_1_expectation)
end
end
end
diff --git a/spec/models/decision_issue_spec.rb b/spec/models/decision_issue_spec.rb
index 4013a9ded31..3ed5a1fb89e 100644
--- a/spec/models/decision_issue_spec.rb
+++ b/spec/models/decision_issue_spec.rb
@@ -419,30 +419,6 @@
end
end
end
- context "decision review type" do
- context "when type is Appeal" do
- let(:decision_review) { create(:appeal) }
-
- it "creates a Remand class" do
- expect(subject.type).to eq(Remand.name)
- end
- end
-
- context "when type is HLR" do
- let(:decision_review) { create(:higher_level_review) }
- before do
- decision_review.create_claimant!(
- participant_id: "98765",
- payee_code: "00",
- type: "VeteranClaimant"
- )
- end
-
- it "creates a SupplementalClaim class" do
- expect(subject.type).to eq(SupplementalClaim.name)
- end
- end
- end
end
end
end
diff --git a/spec/models/higher_level_review_spec.rb b/spec/models/higher_level_review_spec.rb
index 031fb9ae2c0..9182f62a383 100644
--- a/spec/models/higher_level_review_spec.rb
+++ b/spec/models/higher_level_review_spec.rb
@@ -264,7 +264,6 @@
expect(supplemental_claim).to_not be_nil
expect(supplemental_claim.establishment_submitted_at).to_not be_nil
expect(supplemental_claim.request_issues.count).to eq(2)
- expect(supplemental_claim.type).to eq(SupplementalClaim.name)
first_dta_request_issue = RequestIssue.find_by(
decision_review: supplemental_claim,
@@ -333,7 +332,6 @@
caseflow_decision_date.to_date + vbms_offset -
SupplementalClaim.processing_retry_interval_hours.hours + 1.minute
)
- expect(dta_sc.type).to eq(SupplementalClaim.name)
expect do
subject
end.to_not have_enqueued_job(DecisionReviewProcessJob)
diff --git a/spec/models/supplemental_claim_spec.rb b/spec/models/supplemental_claim_spec.rb
index 702e7d57197..96360af191f 100644
--- a/spec/models/supplemental_claim_spec.rb
+++ b/spec/models/supplemental_claim_spec.rb
@@ -25,17 +25,6 @@
)
end
- let(:remand) do
- Remand.new(
- veteran_file_number: veteran_file_number,
- receipt_date: receipt_date,
- benefit_type: benefit_type,
- legacy_opt_in_approved: legacy_opt_in_approved,
- veteran_is_not_claimant: veteran_is_not_claimant,
- decision_review_remanded: decision_review_remanded
- )
- end
-
let!(:intake) do
create(:intake, user: current_user, detail: supplemental_claim, veteran_file_number: veteran_file_number)
end
@@ -55,11 +44,6 @@
let(:legacy_opt_in_approved) { false }
let(:receipt_date) { 1.day.ago }
- it "sets the type column correctly" do
- expect(supplemental_claim.type).to eq(SupplementalClaim.name)
- expect(remand.type).to eq(Remand.name)
- end
-
it "is valid" do
is_expected.to be true
end
@@ -136,17 +120,6 @@
end
context "create_remand_issues!" do
- let(:classifier) { Remand }
- let(:supplemental_claim) do
- classifier.new(
- veteran_file_number: veteran_file_number,
- receipt_date: receipt_date,
- benefit_type: benefit_type,
- legacy_opt_in_approved: legacy_opt_in_approved,
- veteran_is_not_claimant: veteran_is_not_claimant,
- decision_review_remanded: decision_review_remanded
- )
- end
subject { supplemental_claim.create_remand_issues! }
let(:decision_review_remanded) { create(:appeal) }
diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb
index 4521dd0a544..42fef233216 100644
--- a/spec/rails_helper.rb
+++ b/spec/rails_helper.rb
@@ -102,7 +102,7 @@
end
# Wrap this around your test to run it many times and ensure that it passes consistently.
-# Note: do not merge to main like this, or the tests will be slow! Ha.
+# Note: do not merge to master like this, or the tests will be slow! Ha.
def ensure_stable
repeat_count = ENV.fetch("ENSURE_STABLE", "10").to_i
repeat_count.times do
diff --git a/spec/services/business_line_reporter_spec.rb b/spec/services/business_line_reporter_spec.rb
index 1a5604e3501..ffbf5bf373e 100644
--- a/spec/services/business_line_reporter_spec.rb
+++ b/spec/services/business_line_reporter_spec.rb
@@ -14,35 +14,17 @@
let(:third_appeal) { create(:appeal, :with_post_intake_tasks) }
let(:third_ama_task) { create(:ama_task, appeal: third_appeal, assigned_to: business_line) }
- let(:remand) { create(:remand, benefit_type: business_line.url, claimant_type: :veteran_claimant) }
- let(:remand_task) do
- DecisionReviewTask.create!(appeal: remand, assigned_at: Time.zone.now, assigned_to: business_line)
- end
-
- let(:hlr) { create(:higher_level_review, benefit_type: business_line.url, claimant_type: :veteran_claimant) }
- let(:hlr_task) { DecisionReviewTask.create!(appeal: hlr, assigned_at: Time.zone.now, assigned_to: business_line) }
-
- let(:supplemental_claim) do
- create(:supplemental_claim, benefit_type: business_line.url, claimant_type: :veteran_claimant)
- end
- let(:sc_task) do
- DecisionReviewTask.create!(appeal: supplemental_claim, assigned_at: Time.zone.now, assigned_to: business_line)
- end
-
before do
Timecop.freeze(Time.utc(2020, 1, 1, 19, 0, 0))
first_ama_task.completed!
second_ama_task.completed!
- remand_task.completed!
- hlr_task.completed!
- sc_task.completed!
end
describe "#tasks" do
subject { BusinessLineReporter.new(business_line).tasks }
it "returns the completed tasks" do
- expect(subject).to include(first_ama_task, second_ama_task, remand_task, hlr_task, sc_task)
+ expect(subject).to include(first_ama_task, second_ama_task)
end
it "does not return an open task" do
@@ -59,9 +41,6 @@ def expected_csv
business_line,appeal_id,appeal_type,claimant_name,request_issues_count,decision_issues_count,veteran_file_number,intake_user_id,task_type,task_id,tasks_url,task_assigned_to,created_at,closed_at
#{business_line.name},#{first_appeal.id},Appeal,#{first_appeal.claimant.name},0,0,#{first_appeal.veteran.file_number},,Task,#{first_ama_task.id},https://appeals.cf.ds.va.gov#{business_line.tasks_url}/tasks/#{first_ama_task.id},#{first_ama_task.assigned_to.name},2020-01-01,2020-01-01
#{business_line.name},#{second_appeal.id},Appeal,#{second_appeal.claimant.name},0,0,#{second_appeal.veteran.file_number},,Task,#{second_ama_task.id},https://appeals.cf.ds.va.gov#{business_line.tasks_url}/tasks/#{second_ama_task.id},#{second_ama_task.assigned_to.name},2020-01-01,2020-01-01
- #{business_line.name},#{remand.id},Remand,#{remand.claimant.name},0,0,#{remand.veteran.file_number},,DecisionReviewTask,#{remand_task.id},https://appeals.cf.ds.va.gov#{business_line.tasks_url}/tasks/#{remand_task.id},#{remand_task.assigned_to.name},2020-01-01,2020-01-01
- #{business_line.name},#{hlr.id},Higher-Level Review,#{hlr.claimant.name},0,0,#{hlr.veteran.file_number},,DecisionReviewTask,#{hlr_task.id},https://appeals.cf.ds.va.gov#{business_line.tasks_url}/tasks/#{hlr_task.id},#{hlr_task.assigned_to.name},2020-01-01,2020-01-01
- #{business_line.name},#{supplemental_claim.id},Supplemental Claim,#{supplemental_claim.claimant.name},0,0,#{supplemental_claim.veteran.file_number},,DecisionReviewTask,#{sc_task.id},https://appeals.cf.ds.va.gov#{business_line.tasks_url}/tasks/#{sc_task.id},#{sc_task.assigned_to.name},2020-01-01,2020-01-01
EOF
end
# rubocop:enable Metrics/AbcSize
diff --git a/spec/services/claim_change_history/change_history_event_serializer_spec.rb b/spec/services/claim_change_history/change_history_event_serializer_spec.rb
index 5829c4c02de..540cc563f2d 100644
--- a/spec/services/claim_change_history/change_history_event_serializer_spec.rb
+++ b/spec/services/claim_change_history/change_history_event_serializer_spec.rb
@@ -36,29 +36,6 @@
ClaimHistoryService.new(vha_org, task_id: vha_task.id).build_events
end
- let(:modificationRequestDetailsObject) do
- {
- benefitType: "vha",
- requestType: nil,
- issueModificationRequestWithdrawalDate: nil,
- modificationRequestReason: nil,
- newDecisionDate: nil,
- newIssueDescription: nil,
- newIssueType: nil,
- previousDecisionDate: nil,
- previousIssueDescription: nil,
- previousIssueType: nil,
- previousModificationRequestReason: nil,
- previousWithdrawalDate: nil,
- removeOriginalIssue: nil,
- issueModificationRequestStatus: nil,
- requestor: nil,
- decider: nil,
- decidedAtDate: nil,
- decisionReason: nil
- }
- end
-
let(:serialized_hash_array) do
[
{
@@ -66,24 +43,23 @@
type: :change_history_event,
attributes: {
claimType: "Higher-Level Review",
- readableEventType: "Claim created",
claimantName: events[0].claimant_name,
- eventUser: "L. Roth",
+ details:
+ {
+ benefitType: "vha",
+ decisionDate: nil,
+ decisionDescription: nil,
+ disposition: nil,
+ dispositionDate: nil,
+ issueDescription: nil,
+ issueType: nil,
+ withdrawalRequestDate: nil
+ },
eventDate: events[0].event_date,
eventType: :claim_creation,
- taskID: vha_task.id,
- details:
- {
- benefitType: "vha",
- decisionDate: nil,
- decisionDescription: nil,
- disposition: nil,
- dispositionDate: nil,
- issueDescription: nil,
- issueType: nil,
- withdrawalRequestDate: nil
- },
- modificationRequestDetails: modificationRequestDetailsObject
+ eventUser: "L. Roth",
+ readableEventType: "Claim created",
+ taskID: vha_task.id
}
},
{
@@ -91,7 +67,6 @@
type: :change_history_event,
attributes: {
claimType: "Higher-Level Review",
- readableEventType: "Added issue",
claimantName: events[1].claimant_name,
details:
{
@@ -104,34 +79,10 @@
issueType: "Other",
withdrawalRequestDate: nil
},
- modificationRequestDetails: modificationRequestDetailsObject,
eventDate: events[1].event_date,
eventType: :added_issue,
eventUser: "L. Roth",
- taskID: vha_task.id
- }
- },
- {
- id: expected_uuid,
- type: :change_history_event,
- attributes: {
- eventType: :in_progress,
- eventUser: "System",
- claimType: "Higher-Level Review",
- readableEventType: "Claim status - In progress",
- claimantName: events[2].claimant_name,
- details: {
- benefitType: "vha",
- issueType: nil,
- issueDescription: nil,
- decisionDate: nil,
- disposition: nil,
- decisionDescription: nil,
- dispositionDate: nil,
- withdrawalRequestDate: nil
- },
- modificationRequestDetails: modificationRequestDetailsObject,
- eventDate: events[2].event_date,
+ readableEventType: "Added issue",
taskID: vha_task.id
}
}
diff --git a/spec/services/claim_change_history/change_history_reporter_spec.rb b/spec/services/claim_change_history/change_history_reporter_spec.rb
index 4fba9383dc7..c5dcc4bbbbd 100644
--- a/spec/services/claim_change_history/change_history_reporter_spec.rb
+++ b/spec/services/claim_change_history/change_history_reporter_spec.rb
@@ -145,95 +145,6 @@
new_event.instance_variable_set(:@task_status, "cancelled")
new_event
end
- let(:pending_issue_event) do
- new_event = removed_issue_event.clone
- new_event.instance_variable_set(:@event_type, :pending)
- new_event.instance_variable_set(:@task_status, "assigned")
- new_event
- end
- let(:issue_modification_request_event) do
- new_event = pending_issue_event.clone
- new_event.instance_variable_set(:@event_type, :modification)
- new_event.instance_variable_set(:@task_status, "assigned")
- new_event
- end
-
- let(:remand_claim_creation_event) do
- new_event = added_issue_event.clone
- new_event.instance_variable_set(:@event_type, :claim_creation)
- new_event.instance_variable_set(:@event_user_name, "System")
- new_event.instance_variable_set(:@user_facility, nil)
- new_event.instance_variable_set(:@claim_type, "Remand")
- new_event
- end
- let(:remand_in_progress_status_event) do
- new_event = claim_creation_event.clone
- new_event.instance_variable_set(:@event_type, :in_progress)
- new_event.instance_variable_set(:@claim_type, "Remand")
- new_event
- end
- let(:remand_cancelled_status_event) do
- new_event = in_progress_status_event.clone
- new_event.instance_variable_set(:@event_type, :cancelled)
- new_event.instance_variable_set(:@task_status, "cancelled")
- new_event.instance_variable_set(:@claim_type, "Remand")
- new_event
- end
- let(:remand_completed_status_event) do
- new_event = in_progress_status_event.clone
- new_event.instance_variable_set(:@event_type, :completed)
- new_event.instance_variable_set(:@task_status, "completed")
- new_event.instance_variable_set(:@claim_type, "Remand")
- new_event
- end
- let(:remand_incomplete_status_event) do
- new_event = in_progress_status_event.clone
- new_event.instance_variable_set(:@event_type, :incomplete)
- new_event.instance_variable_set(:@task_status, "on_hold")
- new_event.instance_variable_set(:@claim_type, "Remand")
- new_event
- end
- let(:remand_added_issue_without_decision_date_event) do
- new_event = added_issue_event.clone
- new_event.instance_variable_set(:@event_type, :added_issue_without_decision_date)
- new_event.instance_variable_set(:@task_status, "on_hold")
- new_event.instance_variable_set(:@claim_type, "Remand")
- new_event.instance_variable_set(:@decision_date, nil)
- new_event
- end
- let(:remand_completed_disposition_event) do
- new_event = added_issue_event.clone
- new_event.instance_variable_set(:@event_type, :completed_disposition)
- new_event.instance_variable_set(:@task_status, "completed")
- new_event.instance_variable_set(:@disposition, "Granted")
- new_event.instance_variable_set(:@decision_description, "Decision for CHAMPVA issue")
- new_event.instance_variable_set(:@disposition_date, 4.days.ago.iso8601)
- new_event.instance_variable_set(:@user_facility, "200")
- new_event.instance_variable_set(:@claim_type, "Remand")
- new_event
- end
- let(:remand_added_decision_date_event) do
- new_event = completed_disposition_event.clone
- new_event.instance_variable_set(:@event_type, :added_decision_date)
- new_event.instance_variable_set(:@task_status, "assigned")
- new_event.instance_variable_set(:@task_id, 900)
- new_event.instance_variable_set(:@claim_type, "Remand")
- new_event
- end
- let(:remand_removed_issue_event) do
- new_event = added_decision_date_event.clone
- new_event.instance_variable_set(:@event_type, :removed_issue)
- new_event.instance_variable_set(:@task_status, "cancelled")
- new_event.instance_variable_set(:@claim_type, "Remand")
- new_event
- end
- let(:remand_withdrew_issue_event) do
- new_event = removed_issue_event.clone
- new_event.instance_variable_set(:@event_type, :withdrew_issue)
- new_event.instance_variable_set(:@task_status, "cancelled")
- new_event.instance_variable_set(:@claim_type, "Remand")
- new_event
- end
let(:events) do
[
@@ -247,19 +158,7 @@
completed_disposition_event,
added_decision_date_event,
removed_issue_event,
- withdrew_issue_event,
- pending_issue_event,
- issue_modification_request_event,
- remand_claim_creation_event,
- remand_in_progress_status_event,
- remand_cancelled_status_event,
- remand_completed_status_event,
- remand_incomplete_status_event,
- remand_added_issue_without_decision_date_event,
- remand_completed_disposition_event,
- remand_added_decision_date_event,
- remand_removed_issue_event,
- remand_withdrew_issue_event
+ withdrew_issue_event
]
end
@@ -278,11 +177,6 @@
"CHAMPVA",
"CHAMPVA issue description",
added_issue_event.readable_decision_date,
- nil,
- nil,
- nil,
- nil,
- nil,
nil
]
end
@@ -301,11 +195,6 @@
"Claim created",
nil,
"Claim created.",
- nil,
- nil,
- nil,
- nil,
- nil,
nil
]
end
@@ -324,11 +213,6 @@
"Claim status - In progress",
nil,
"Claim can be processed.",
- nil,
- nil,
- nil,
- nil,
- nil,
nil
]
end
@@ -346,12 +230,7 @@
cancelled_status_event.readable_event_date,
"Claim closed",
nil,
- "Claim cancelled.",
- nil,
- nil,
- nil,
- nil,
- nil,
+ "Claim closed.",
nil
]
end
@@ -369,11 +248,6 @@
"Claim closed",
nil,
"Claim closed.",
- nil,
- nil,
- nil,
- nil,
- nil,
nil
]
end
@@ -391,11 +265,6 @@
"Claim status - Incomplete",
nil,
"Claim cannot be processed until decision date is entered.",
- nil,
- nil,
- nil,
- nil,
- nil,
nil
]
end
@@ -414,11 +283,6 @@
"CHAMPVA",
"CHAMPVA issue description",
added_issue_without_decision_date_event.readable_decision_date,
- nil,
- nil,
- nil,
- nil,
- nil,
nil
]
end
@@ -437,11 +301,6 @@
"CHAMPVA",
"CHAMPVA issue description",
completed_disposition_event.readable_decision_date,
- nil,
- nil,
- nil,
- nil,
- nil,
"Granted",
"Decision for CHAMPVA issue",
completed_disposition_event.readable_disposition_date
@@ -462,11 +321,6 @@
"CHAMPVA",
"CHAMPVA issue description",
added_decision_date_event.readable_decision_date,
- nil,
- nil,
- nil,
- nil,
- nil,
nil
]
end
@@ -485,11 +339,6 @@
"CHAMPVA",
"CHAMPVA issue description",
removed_issue_event.readable_decision_date,
- nil,
- nil,
- nil,
- nil,
- nil,
nil
]
end
@@ -508,293 +357,12 @@
"CHAMPVA",
"CHAMPVA issue description",
withdrew_issue_event.readable_decision_date,
- nil,
- nil,
- nil,
- nil,
- nil,
- nil
- ]
- end
- let(:pending_issue_event_row) do
- [
- "242080004",
- "Mason Rodriguez",
- "/decision_reviews/vha/tasks/900",
- "in progress",
- "20",
- "Higher-Level Review",
- "Austin AAC (200)",
- "E. Thompson",
- added_issue_event.readable_event_date,
- "Claim status - Pending",
- nil,
- "Claim cannot be processed until VHA admin reviews pending requests.",
- nil,
- nil,
- nil,
- nil,
- nil,
- nil
- ]
- end
- let(:modification_issue_event_row) do
- [
- "242080004",
- "Mason Rodriguez",
- "/decision_reviews/vha/tasks/900",
- "in progress",
- "20",
- "Higher-Level Review",
- "Austin AAC (200)",
- "E. Thompson",
- added_issue_event.readable_event_date,
- "Requested issue modification",
- "CHAMPVA",
- "CHAMPVA issue description",
- added_issue_event.readable_decision_date,
- nil,
- nil,
- nil,
- nil,
- nil,
- nil
- ]
- end
-
- let(:remand_claim_creation_event_row) do
- [
- "242080004",
- "Mason Rodriguez",
- "/decision_reviews/vha/tasks/999",
- "in progress",
- "20",
- "Remand",
- "",
- "System",
- remand_claim_creation_event.readable_event_date,
- "Claim created",
- nil,
- "Claim created.",
- nil,
- nil,
- nil,
- nil,
- nil,
- nil
- ]
- end
-
- let(:remand_in_progress_status_event_row) do
- [
- "242080004",
- "Mason Rodriguez",
- "/decision_reviews/vha/tasks/999",
- "in progress",
- "20",
- "Remand",
- "",
- "System",
- remand_in_progress_status_event.readable_event_date,
- "Claim status - In progress",
- nil,
- "Claim can be processed.",
- nil,
- nil,
- nil,
- nil,
- nil,
- nil
- ]
- end
-
- let(:remand_cancelled_status_event_row) do
- [
- "242080004",
- "Mason Rodriguez",
- "/decision_reviews/vha/tasks/999",
- "cancelled",
- "20",
- "Remand",
- "",
- "System",
- remand_cancelled_status_event.readable_event_date,
- "Claim closed",
- nil,
- "Claim cancelled.",
- nil,
- nil,
- nil,
- nil,
- nil,
- nil
- ]
- end
- let(:remand_completed_status_event_row) do
- [
- "242080004",
- "Mason Rodriguez",
- "/decision_reviews/vha/tasks/999",
- "completed",
- "20",
- "Remand",
- "",
- "System",
- remand_completed_status_event.readable_event_date,
- "Claim closed",
- nil,
- "Claim closed.",
- nil,
- nil,
- nil,
- nil,
- nil,
- nil
- ]
- end
- let(:remand_incomplete_status_event_row) do
- [
- "242080004",
- "Mason Rodriguez",
- "/decision_reviews/vha/tasks/999",
- "incomplete",
- "20",
- "Remand",
- "",
- "System",
- remand_incomplete_status_event.readable_event_date,
- "Claim status - Incomplete",
- nil,
- "Claim cannot be processed until decision date is entered.",
- nil,
- nil,
- nil,
- nil,
- nil,
- nil
- ]
- end
- let(:remand_added_issue_without_decision_date_event_row) do
- [
- "242080004",
- "Mason Rodriguez",
- "/decision_reviews/vha/tasks/999",
- "incomplete",
- "20",
- "Remand",
- "VACO (101)",
- "E. Thompson",
- remand_added_issue_without_decision_date_event.readable_event_date,
- "Added issue - No decision date",
- "CHAMPVA",
- "CHAMPVA issue description",
- remand_added_issue_without_decision_date_event.readable_decision_date,
- nil,
- nil,
- nil,
- nil,
- nil,
- nil
- ]
- end
- let(:remand_completed_disposition_event_row) do
- [
- "242080004",
- "Mason Rodriguez",
- "/decision_reviews/vha/tasks/999",
- "completed",
- "20",
- "Remand",
- "Austin AAC (200)",
- "E. Thompson",
- remand_completed_disposition_event.readable_event_date,
- "Completed disposition",
- "CHAMPVA",
- "CHAMPVA issue description",
- remand_completed_disposition_event.readable_decision_date,
- nil,
- nil,
- nil,
- nil,
- nil,
- "Granted",
- "Decision for CHAMPVA issue",
- remand_completed_disposition_event.readable_disposition_date
- ]
- end
- let(:remand_added_decision_date_event_row) do
- [
- "242080004",
- "Mason Rodriguez",
- "/decision_reviews/vha/tasks/900",
- "in progress",
- "20",
- "Remand",
- "Austin AAC (200)",
- "E. Thompson",
- remand_added_decision_date_event.readable_event_date,
- "Added decision date",
- "CHAMPVA",
- "CHAMPVA issue description",
- remand_added_decision_date_event.readable_decision_date,
- nil,
- nil,
- nil,
- nil,
- nil,
- nil
- ]
- end
- let(:remand_removed_issue_event_row) do
- [
- "242080004",
- "Mason Rodriguez",
- "/decision_reviews/vha/tasks/900",
- "cancelled",
- "20",
- "Remand",
- "Austin AAC (200)",
- "E. Thompson",
- remand_removed_issue_event.readable_event_date,
- "Removed issue",
- "CHAMPVA",
- "CHAMPVA issue description",
- remand_removed_issue_event.readable_decision_date,
- nil,
- nil,
- nil,
- nil,
- nil,
- nil
- ]
- end
- let(:remand_withdrew_issue_event_row) do
- [
- "242080004",
- "Mason Rodriguez",
- "/decision_reviews/vha/tasks/900",
- "cancelled",
- "20",
- "Remand",
- "Austin AAC (200)",
- "E. Thompson",
- remand_withdrew_issue_event.readable_event_date,
- "Withdrew issue",
- "CHAMPVA",
- "CHAMPVA issue description",
- remand_withdrew_issue_event.readable_decision_date,
- nil,
- nil,
- nil,
- nil,
- nil,
nil
]
end
it "returns a csv string with the column headers, filters, and event rows" do
rows = CSV.parse(subject)
-
expect(rows.count).to eq(2 + events.length)
expect(rows[0]).to eq([])
expect(rows[1]).to eq(column_headers)
@@ -809,18 +377,6 @@
expect(rows[10]).to eq(added_decision_date_event_row)
expect(rows[11]).to eq(removed_issue_event_row)
expect(rows[12]).to eq(withdrew_issue_event_row)
- expect(rows[13]).to eq(pending_issue_event_row)
- expect(rows[14]).to eq(modification_issue_event_row)
- expect(rows[15]).to eq(remand_claim_creation_event_row)
- expect(rows[16]).to eq(remand_in_progress_status_event_row)
- expect(rows[17]).to eq(remand_cancelled_status_event_row)
- expect(rows[18]).to eq(remand_completed_status_event_row)
- expect(rows[19]).to eq(remand_incomplete_status_event_row)
- expect(rows[20]).to eq(remand_added_issue_without_decision_date_event_row)
- expect(rows[21]).to eq(remand_completed_disposition_event_row)
- expect(rows[22]).to eq(remand_added_decision_date_event_row)
- expect(rows[23]).to eq(remand_removed_issue_event_row)
- expect(rows[24]).to eq(remand_withdrew_issue_event_row)
end
end
end
diff --git a/spec/services/claim_change_history/claim_history_event_spec.rb b/spec/services/claim_change_history/claim_history_event_spec.rb
index 0dc5263585f..1ee915d9c08 100644
--- a/spec/services/claim_change_history/claim_history_event_spec.rb
+++ b/spec/services/claim_change_history/claim_history_event_spec.rb
@@ -48,37 +48,7 @@
"event_date" => change_data_event_date,
"task_versions" => version_changes,
"days_waiting" => 25,
- "task_closed_at" => "2023-10-19 22:47:16.233187",
- "issue_modification_request_id" => 61,
- "requested_issue_type" => "Caregiver | Tier Level",
- "requested_issue_description" => "test",
- "remove_original_issue" => nil,
- "modification_request_reason" => "Testing",
- "requested_decision_date" => "2024-07-07",
- "request_type" => request_type,
- "issue_modification_request_status" => "cancelled",
- "decision_reason" => nil,
- "decider_id" => nil,
- "requestor_id" => "2000006012",
- "decided_at" => nil,
- "issue_modification_request_created_at" => issue_modification_request_created_at,
- "issue_modification_request_updated_at" => "2024-07-22 15:58:42.908194",
- "issue_modification_request_edited_at" => nil,
- "issue_modification_request_withdrawal_date" => nil,
- "decision_review_id" => 65,
- "decision_review_type" => "HigherLevelReview",
- "requestor" => "Monte Mann",
- "requestor_station_id" => "741",
- "requestor_css_id" => "ACBAUERVVHAH",
- "decider" => nil,
- "decider_station_id" => nil,
- "decider_css_id" => nil,
- "imr_versions" => imr_versions,
- "previous_imr_created_at" => nil,
- "updater_user_name" => "Monte Mann",
- "is_assigned_present" => is_assigned_present,
- "previous_state_array" => previous_state_array,
- "type_classifier" => change_data_claim_type
+ "task_closed_at" => "2023-10-19 22:47:16.233187"
}
end
@@ -92,20 +62,8 @@
let(:change_data_decision_date) { "2023-05-31" }
let(:change_data_decision_date_added_at) { Time.zone.parse("2023-10-19 22:48:25.281657") }
let(:version_changes) { nil }
- let(:imr_versions) { nil }
- let(:request_type) { :addition }
let(:request_issue_update_time) { Time.zone.parse("2023-10-19 22:47:16.233187") }
let(:request_issue_created_at) { Time.zone.parse("2023-10-19 22:45:43.108934") }
- let(:issue_modification_request_created_at) { Time.zone.parse("2023-10-20 22:47:16.233187") }
- let(:previous_imr_created_at) { Time.zone.parse("2023-10-19 22:47:16.233187") }
- let(:out_of_bounds_time) { Time.utc(9999, 12, 31, 23, 59, 59) }
-
- let(:decision_reason) { nil }
- let(:decider_id) { nil }
- let(:decided_at) { nil }
- let(:is_assigned_present) { false }
- let(:previous_state_array) {}
-
let(:event_attribute_data) do
{
assigned_at: Time.zone.parse("2023-10-19 22:47:16.222148"),
@@ -158,19 +116,6 @@
}
end
- let(:issue_modification_request_attribute_data) do
- {
- request_type: request_type,
- new_issue_type: "Caregiver | Tier Level",
- new_issue_description: "test",
- new_decision_date: "2024-07-07",
- modification_request_reason: "Testing",
- decision_reason: nil,
- decided_at_date: nil,
- issue_modification_request_withdrawal_date: nil
- }
- end
-
let(:intake_event_data) do
{
event_date: change_data["intake_completed_at"],
@@ -189,68 +134,6 @@
}
end
- let(:pending_attribute_data) do
- {
- event_type: :pending,
- claimant_name: "Bob Smithboehm",
- event_user_name: "System"
- }
- end
- let(:in_progress_attribute_data) do
- {
- event_type: :in_progress,
- claimant_name: "Bob Smithboehm",
- event_user_name: "System"
- }
- end
- let(:modification_request_decision_date) { Time.zone.parse("2024-07-28").to_date }
- let(:modification_attribute_data) do
- {
- event_type: :modification,
- request_type: :modification,
- benefit_type: "vha",
- issue_type: "Clothing Allowance",
- issue_description: "Clothing allowance no decision date",
- decision_date: "2023-05-31",
- new_issue_type: "Caregiver | Eligibility",
- new_issue_description: "Rejection of withrwaslasas",
- new_decision_date: modification_request_decision_date,
- modification_request_reason: "Please withdwasdadsadadadad",
- previous_issue_type: "Caregiver | Eligibility",
- previous_issue_description: "Rejection of withrwaslasas",
- previous_decision_date: modification_request_decision_date,
- previous_modification_request_reason: "Please withdwasdadsadadadad"
- }
- end
- let(:issue_modification_response_attribute) do
- {
- event_type: :request_approved,
- request_type: request_type,
- new_issue_type: "Caregiver | Tier Level",
- new_issue_description: "test",
- new_decision_date: "2024-07-07",
- modification_request_reason: "Testing"
- }
- end
-
- let(:issue_modification_edited_attribute) do
- {
- event_type: :request_edited,
- request_type: :withdrawal,
- issue_type: "Clothing Allowance",
- issue_description: "Clothing allowance no decision date",
- new_issue_type: "Caregiver | Eligibility",
- new_issue_description: "modifiedvalue",
- new_decision_date: modification_request_decision_date,
- modification_request_reason: "Addition is the only request issue-modifiedvalue Z",
- event_user_name: "Monte Mann",
- previous_issue_type: "Caregiver | Eligibility",
- previous_issue_description: "Rejection of withrwaslasas",
- previous_decision_date: modification_request_decision_date,
- previous_modification_request_reason: "Please withdwasdadsadadadad"
- }
- end
-
describe "class methods" do
describe ".from_change_data" do
subject { described_class.from_change_data(event_type, change_data) }
@@ -260,6 +143,7 @@
it "should create an instance and not raise an error" do
claim_history_event = subject
+
expect_attributes(claim_history_event, status_event_attribute_data)
end
end
@@ -280,25 +164,6 @@
expect { subject }.to raise_error(InvalidEventType)
end
end
-
- context "when the event type is request addition" do
- let(:event_type) { :addition }
-
- it "should create an instance with issue request addition" do
- claim_history_event = subject
-
- expect_attributes(claim_history_event, issue_modification_request_attribute_data)
- end
- end
-
- context "when the event type is request modification" do
- let(:event_type) { :modification }
- let(:request_type) { :modification }
- it "should create an instance with issue request addition" do
- claim_history_event = subject
- expect_attributes(claim_history_event, issue_modification_request_attribute_data)
- end
- end
end
describe ".create_completed_disposition_event" do
@@ -347,7 +212,7 @@
context "if the task status was assigned -> completed" do
let(:version_changes) do
- "---\n" \
+ "{\"---\n" \
"closed_at:\n" \
"- \n" \
"- 2023-11-08 19:22:47.244142348 Z\n" \
@@ -356,7 +221,8 @@
"- completed\n" \
"updated_at:\n" \
"- 2023-11-08 19:22:47.227634704 Z\n" \
- "- 2023-11-09 19:22:47.244304624 Z\n"
+ "- 2023-11-09 19:22:47.244304624 Z\n" \
+ "\"}"
end
it "should create an in progress event and a completed status event" do
@@ -373,7 +239,7 @@
context "if the task status was assigned -> cancelled" do
let(:version_changes) do
- "---\n" \
+ "{\"---\n" \
"closed_at:\n" \
"- \n" \
"- 2023-11-09 23:16:28.446266110 Z\n" \
@@ -382,7 +248,8 @@
"- cancelled\n" \
"updated_at:\n" \
"- 2023-11-09 23:16:15.724150103 Z\n" \
- "- 2023-11-11 23:16:28.446399290 Z\n"
+ "- 2023-11-11 23:16:28.446399290 Z\n" \
+ "\"}"
end
it "should generate an in progress and a cancelled status event" do
@@ -399,7 +266,7 @@
context "if the task status was assigned -> on_hold -> assigned -> completed" do
let(:version_changes) do
- "---\n" \
+ "{\"---\n" \
"status:\n" \
"- assigned\n" \
"- on_hold\n" \
@@ -409,7 +276,7 @@
"updated_at:\n" \
"- 2023-10-19 22:39:14.207143000 Z\n" \
"- 2023-10-19 22:45:43.148742110 Z\n" \
- "|||---\n" \
+ "\",---\n" \
"status:\n" \
"- on_hold\n" \
"- assigned\n" \
@@ -419,7 +286,7 @@
"updated_at:\n" \
"- 2023-10-19 22:45:43.148742000 Z\n" \
"- 2023-10-19 22:47:16.222311778 Z\n" \
- "|||---\n" \
+ "\",---\n" \
"status:\n" \
"- assigned\n" \
"- completed\n" \
@@ -428,7 +295,8 @@
"- 2023-10-19 22:48:25.322988083 Z\n" \
"updated_at:\n" \
"- 2023-10-19 22:47:16.222311000 Z\n" \
- "- 2023-10-19 22:48:25.324023984 Z\n"
+ "- 2023-10-19 22:48:25.324023984 Z\n" \
+ "\"}"
end
it "should generate four status events" do
@@ -455,7 +323,7 @@
context "if the task has no decision date and the task status was immediately set to on hold during intake" do
let(:version_changes) do
- "---\n" \
+ "{\"---\n" \
"status:\n" \
"- assigned\n" \
"- on_hold\n" \
@@ -465,7 +333,7 @@
"updated_at:\n" \
"- 2023-10-19 22:39:14.207143000 Z\n" \
"- 2023-10-19 22:39:14.207143000 Z\n" \
- "|||---\n" \
+ "\",---\n" \
"status:\n" \
"- on_hold\n" \
"- assigned\n" \
@@ -475,7 +343,7 @@
"updated_at:\n" \
"- 2023-10-19 22:45:43.148742000 Z\n" \
"- 2023-10-19 22:47:16.222311778 Z\n" \
- "|||---\n" \
+ "\",---\n" \
"status:\n" \
"- assigned\n" \
"- completed\n" \
@@ -484,7 +352,8 @@
"- 2023-10-19 22:48:25.322988083 Z\n" \
"updated_at:\n" \
"- 2023-10-19 22:47:16.222311000 Z\n" \
- "- 2023-10-19 22:48:25.324023984 Z\n"
+ "- 2023-10-19 22:48:25.324023984 Z\n" \
+ "\"}"
end
it "should create an on_hold event, an in progress event, and a completed event" do
@@ -519,7 +388,7 @@
context "if the task versions are from a hookless papertrail cancelled task" do
let(:version_changes) do
- "--- {}\n|||--- {}\n"
+ "{\"--- {}\n\",\"--- {}\n\"}"
end
it "should create an assigned and a cancelled task status event" do
@@ -762,187 +631,6 @@
end
end
- describe ".create_pending_status_event" do
- let(:event_date) { change_data["issue_modification_request_created_at"] }
- let(:is_assigned_present) { true }
-
- subject { described_class.create_pending_status_event(change_data, event_date) }
-
- it "should return one pending event" do
- expect_attributes(subject, pending_attribute_data)
- end
-
- context "it should return pending event if issue modification requests are made in two different days" do
- before do
- change_data["previous_imr_created_at"] = previous_imr_created_at
- end
-
- it "should return one pending event" do
- expect_attributes(subject, pending_attribute_data)
- end
- end
-
- context "it should not pending event if issue modification requests are made in same transaction" do
- let(:previous_imr_created_at) { issue_modification_request_created_at }
-
- before do
- change_data["previous_imr_created_at"] = previous_imr_created_at
- change_data["issue_modification_request_created_at"] = issue_modification_request_created_at
- end
-
- it "should return one pending event" do
- expect(subject).to be_nil
- end
- end
- end
-
- describe ".create_issue_modification_request_event" do
- context "when request type is modification" do
- let(:request_type) { :modification }
- let(:previous_state_array) do
- "---\n" \
- "id: 150\n" \
- "status: assigned\n" \
- "requestor_id: 2000006012\n" \
- "nonrating_issue_category: Caregiver | Eligibility\n" \
- "decision_date: 2024-07-28\n" \
- "nonrating_issue_description: 'Rejection of withrwaslasas'\n" \
- "request_reason: Please withdwasdadsadadadad\n" \
- "withdrawal_date: 2024-08-04 04:00:00.000000000 Z\n" \
- "edited_at: \n" \
- "request_issue_id: 251\n" \
- "request_type: modification\n" \
- "benefit_type: vha\n" \
- "created_at: 2024-08-26 17:22:53.454663000 Z\n" \
- "decided_at: \n" \
- "decider_id: \n" \
- "decision_reason: \n" \
- "decision_review_id: 31\n" \
- "decision_review_type: SupplementalClaim\n" \
- "remove_original_issue: false\n" \
- "updated_at: 2024-08-26 17:22:53.454663000 Z\n" \
- "|||---\n" \
- "id: 150\n" \
- "status: assigned\n" \
- "requestor_id: 2000006012\n" \
- "nonrating_issue_category: Caregiver | Eligibility\n" \
- "decision_date: 2024-07-28\n" \
- "nonrating_issue_description: 'Rejection of withrwaslasas'\n" \
- "request_reason: Please Withdraw this one since its no longer valid.\n" \
- "withdrawal_date: 2024-08-04 04:00:00.000000000 Z\n" \
- "edited_at: 2024-08-26 17:23:28.055850000 Z\n" \
- "request_issue_id: 251\n" \
- "request_type: modification\n" \
- "benefit_type: vha\n" \
- "created_at: 2024-08-26 17:22:53.454663000 Z\n" \
- "decided_at: \n" \
- "decider_id: \n" \
- "decision_reason: \n" \
- "decision_review_id: 31\n" \
- "decision_review_type: SupplementalClaim\n" \
- "remove_original_issue: false\n" \
- "updated_at: 2024-08-26 17:23:28.072803000 Z\n"
- end
-
- subject { described_class.create_issue_modification_request_event(change_data) }
-
- it "should return single event with request_type passed as the request_type" do
- verify_attributes_and_count(subject, 1, modification_attribute_data)
- end
- end
- end
-
- describe ".create_edited_request_issue_events" do
- let(:request_type) { :withdrawal }
- let(:imr_versions) do
- "---\n" \
- "nonrating_issue_description:\n" \
- "- First value\n" \
- "- modifiedvalue\n" \
- "request_reason:\n" \
- "- Addition is the only request issue\n" \
- "- Addition is the only request issue-modifiedvalue Z\n" \
- "edited_at:\n" \
- "- \n" \
- "- 2024-07-19 22:39:14.207143000 Z\n" \
- "updated_at:\n" \
- "- 2024-07-19 22:39:14.207143000 Z\n" \
- "- 2024-07-19 22:39:14.207143000 Z\n" \
- "|||---\n" \
- "status:\n" \
- "- assigned\n" \
- "- approved\n" \
- "nonrating_issue_description:\n" \
- "- modifiedvalue \n" \
- "- approved by me\n" \
- "updated_at:\n" \
- "- 2024-07-19 22:45:43.148742000 Z\n" \
- "- 2024-07-19 22:47:16.222311778 Z\n"
- end
- let(:previous_state_array) do
- "---\n" \
- "id: 150\n" \
- "status: assigned\n" \
- "requestor_id: 2000006012\n" \
- "nonrating_issue_category: Caregiver | Eligibility\n" \
- "decision_date: 2024-07-28\n" \
- "nonrating_issue_description: 'Rejection of withrwaslasas'\n" \
- "request_reason: Please withdwasdadsadadadad\n" \
- "withdrawal_date: 2024-08-04 04:00:00.000000000 Z\n" \
- "edited_at: \n" \
- "request_issue_id: 251\n" \
- "request_type: withdrawal\n" \
- "benefit_type: vha\n" \
- "created_at: 2024-08-26 17:22:53.454663000 Z\n" \
- "decided_at: \n" \
- "decider_id: \n" \
- "decision_reason: \n" \
- "decision_review_id: 31\n" \
- "decision_review_type: SupplementalClaim\n" \
- "remove_original_issue: false\n" \
- "updated_at: 2024-08-26 17:22:53.454663000 Z\n" \
- "|||---\n" \
- "id: 150\n" \
- "status: assigned\n" \
- "requestor_id: 2000006012\n" \
- "nonrating_issue_category: Caregiver | Eligibility\n" \
- "decision_date: 2024-07-28\n" \
- "nonrating_issue_description: 'Rejection of withrwaslasas'\n" \
- "request_reason: Please Withdraw this one since its no longer valid.\n" \
- "withdrawal_date: 2024-08-04 04:00:00.000000000 Z\n" \
- "edited_at: 2024-08-26 17:23:28.055850000 Z\n" \
- "request_issue_id: 251\n" \
- "request_type: withdrawal\n" \
- "benefit_type: vha\n" \
- "created_at: 2024-08-26 17:22:53.454663000 Z\n" \
- "decided_at: \n" \
- "decider_id: \n" \
- "decision_reason: \n" \
- "decision_review_id: 31\n" \
- "decision_review_type: SupplementalClaim\n" \
- "remove_original_issue: false\n" \
- "updated_at: 2024-08-26 17:23:28.072803000 Z\n"
- end
-
- before do
- change_data["decided_at"] = Time.zone.parse("2023-10-21 22:47:16.233187")
- change_data["next_decided_or_cancelled_at"] = out_of_bounds_time
- change_data["next_created_at"] = out_of_bounds_time
- # The event is generated via the versions so it needs to match the status instead of cancelled.
- # It's not important for generation, but it's a more correct data state for a claim with a single approved IMR
- change_data["issue_modification_request_status"] = "approved"
- end
- subject { described_class.create_edited_request_issue_events(change_data) }
-
- it "returns request_edited event type with multiple events" do
- expect(subject.count).to be(4)
- expect_attributes(subject[0], pending_attribute_data)
- expect_attributes(subject[1], issue_modification_response_attribute)
- expect_attributes(subject[3], issue_modification_edited_attribute)
- expect_attributes(subject[2], in_progress_attribute_data)
- end
- end
-
describe "helper class methods" do
describe ".retrieve_issue_data" do
before do
@@ -1094,9 +782,7 @@
event_instance.readable_task_status, event_instance.days_waiting, event_instance.readable_claim_type,
event_instance.readable_facility_name, event_instance.readable_user_name,
event_instance.readable_event_date, event_instance.readable_event_type,
- event_instance.send(:issue_or_status_information),
- event_instance.send(:issue_modification_request_information),
- event_instance.send(:disposition_information)
+ event_instance.send(:issue_or_status_information), event_instance.send(:disposition_information)
]
end
@@ -1165,14 +851,6 @@
expect(subject).to eq("Supplemental Claim")
end
end
-
- context "when the claim type is Remand" do
- let(:change_data_claim_type) { "Remand" }
-
- it "readable claim type of Remand" do
- expect(subject).to eq("Remand")
- end
- end
end
describe ".readable_user_name" do
@@ -1234,16 +912,7 @@
added_issue: "Added issue",
withdrew_issue: "Withdrew issue",
removed_issue: "Removed issue",
- added_decision_date: "Added decision date",
- cancelled: "Claim closed",
- addition: "Requested issue addition",
- removal: "Requested issue removal",
- modification: "Requested issue modification",
- withdrawal: "Requested issue withdrawal",
- request_approved: "Approval of request - issue addition",
- request_denied: "Rejection of request - issue addition",
- request_cancelled: "Cancellation of request",
- request_edited: "Edit of request - issue addition"
+ added_decision_date: "Added decision date"
}
event_types.each do |event_type, readable_name|
@@ -1462,9 +1131,4 @@ def expect_attributes(object_instance, attribute_value_pairs)
expect(object_instance.send(attribute)).to eq(expected_value)
end
end
-
- def verify_attributes_and_count(subject, num_of_records, attributes)
- expect(subject.count).to eq(num_of_records)
- expect_attributes(subject[0], attributes)
- end
end
diff --git a/spec/services/claim_change_history/claim_history_service_spec.rb b/spec/services/claim_change_history/claim_history_service_spec.rb
index c26c6f4d2e9..fe244f251b5 100644
--- a/spec/services/claim_change_history/claim_history_service_spec.rb
+++ b/spec/services/claim_change_history/claim_history_service_spec.rb
@@ -13,14 +13,6 @@
benefit_type: "vha",
claimant_type: :dependent_claimant))
end
- let!(:hlr_task_with_imr) do
- create(:issue_modification_request,
- :with_higher_level_review,
- :edit_of_request,
- :update_decider,
- nonrating_issue_category: "Medical and Dental Care Reimbursement")
- end
-
let!(:extra_hlr_request_issue) do
create(:request_issue,
nonrating_issue_category: "Camp Lejune Family Member",
@@ -88,8 +80,6 @@
]
end
- let(:total_event_count) { 22 }
-
let(:expected_sc_event_types) do
[
:added_issue,
@@ -98,19 +88,6 @@
]
end
- let(:expected_imr_event_types) do
- [
- :claim_creation,
- :added_issue,
- :in_progress,
- :pending,
- :addition,
- :request_edited,
- :request_approved,
- :in_progress
- ]
- end
-
before do
# Remove the versions to setup specific versions
hlr_task.versions.each(&:delete)
@@ -169,14 +146,14 @@
expect(events).to eq(service_instance.events)
# Expect to get back all the combined event types
- all_event_types = expected_hlr_event_types + expected_sc_event_types + expected_imr_event_types
- expect(events.count).to eq(total_event_count)
+ all_event_types = expected_hlr_event_types + expected_sc_event_types
+ expect(events.count).to eq(14)
expect(events.map(&:event_type)).to contain_exactly(*all_event_types)
# Verify the issue data is correct for the completed_dispostion events
disposition_events = events.select { |event| event.event_type == :completed_disposition }
disposition_issue_types = ["Caregiver | Other", "Camp Lejune Family Member"]
- disposition_issue_descriptions = ["VHA - Caregiver", "Camp Lejune description"]
+ disposition_issue_descriptions = ["VHA - Caregiver ", "Camp Lejune description"]
disposition_user_names = ["Gaius Baelsar", "Gaius Baelsar"]
disposition_values = %w[Granted denied]
disposition_dates = [5.days.ago.to_date.to_s] * 2
@@ -188,12 +165,9 @@
expect(disposition_events.map(&:disposition_date)).to contain_exactly(*disposition_dates)
# Verify the issue data is correct for all the add issue events
- added_issue_types = [*disposition_issue_types, "CHAMPVA", "Beneficiary Travel", "Caregiver | Other"]
- added_issue_descriptions = [*disposition_issue_descriptions,
- "Withdrew CHAMPVA",
- "VHA issue description ",
- "VHA - Caregiver"]
- added_issue_user_names = ["Lauren Roth", "Lauren Roth", "Lauren Roth", "Eleanor Reynolds", "Lauren Roth"]
+ added_issue_types = [*disposition_issue_types, "CHAMPVA", "Beneficiary Travel"]
+ added_issue_descriptions = [*disposition_issue_descriptions, "Withdrew CHAMPVA", "VHA issue description "]
+ added_issue_user_names = ["Lauren Roth", "Lauren Roth", "Lauren Roth", "Eleanor Reynolds"]
add_issue_events = events.select do |event|
event.event_type == :added_issue || event.event_type == :added_issue_without_decision_date
end
@@ -230,353 +204,6 @@
end
end
- context "issue modification edge cases" do
- let!(:sc_task_with_imrs) do
- create(:supplemental_claim_vha_task,
- appeal: create(:supplemental_claim,
- :with_vha_issue,
- :with_intake,
- benefit_type: "vha",
- claimant_type: :veteran_claimant))
- end
-
- let(:request_issue) { sc_task_with_imrs.appeal.request_issues.first }
- let(:supplemental_claim) { sc_task_with_imrs.appeal }
-
- let(:starting_imr_events) do
- [:claim_creation, :added_issue, :in_progress, :removal, :pending, :addition]
- end
-
- let!(:issue_modification_addition) do
- create(:issue_modification_request,
- request_type: "addition",
- decision_review: supplemental_claim,
- requestor: vha_user,
- nonrating_issue_category: "CHAMPVA",
- nonrating_issue_description: "Starting issue description",
- decision_date: 5.days.ago)
- end
-
- let(:issue_modification_modify) do
- create(:issue_modification_request,
- request_type: "modification",
- decision_review: supplemental_claim,
- requestor: vha_user,
- request_issue: supplemental_claim.request_issues.first)
- end
-
- # Only generate the events for this task to keep it focused on the issue modification request events
- let!(:filters) { { task_id: [sc_task_with_imrs.id] } }
-
- let(:vha_admin) { create(:user, full_name: "VHA ADMIN", css_id: "VHAADMIN") }
- let(:vha_user) { create(:user, full_name: "VHA USER", css_id: "VHAUSER") }
-
- before do
- OrganizationsUser.make_user_admin(vha_admin, VhaBusinessLine.singleton)
- VhaBusinessLine.singleton.add_user(vha_user)
- Timecop.freeze(Time.zone.now)
- end
-
- after do
- Timecop.return
- end
-
- def create_last_addition_and_verify_events(original_events, current_events)
- new_events = current_events.dup
- Timecop.travel(2.minutes.from_now)
- addition = create(:issue_modification_request, request_type: "addition", decision_review: supplemental_claim)
-
- events = service_instance.build_events
- new_events.push(:addition, :pending)
- expect(events.map(&:event_type)).to contain_exactly(*original_events + new_events)
-
- # Approve the newest addition to make sure the in progress and approval events are correct
- Timecop.travel(2.minutes.from_now)
- addition.update!(decider: vha_admin, status: :approved, decision_reason: "Better reason2")
-
- events = service_instance.build_events
- new_events.push(:in_progress, :request_approved)
- expect(events.map(&:event_type)).to contain_exactly(*original_events + new_events)
- end
-
- it "should correctly generate temporary in progress and pending events for a single imr event" do
- events = subject
- one_imr_events = *starting_imr_events - [:removal]
- expect(events.map(&:event_type)).to contain_exactly(*one_imr_events)
-
- # Make an edit to the addition and make sure the events are correct
- Timecop.travel(2.minutes.from_now)
- issue_modification_addition.update!(edited_at: Time.zone.now, nonrating_issue_category: "CHAMPVA")
-
- # Rebuild events
- service_instance.build_events
- new_events = [:request_edited]
- expect(events.map(&:event_type)).to contain_exactly(*one_imr_events + new_events)
-
- # Approve the addition and make sure the events are correct
- # NOTE: This only does the issue modification events and does not create a request issue update
- Timecop.travel(2.minutes.from_now)
- issue_modification_addition.update!(decider: vha_admin, status: :approved, decision_reason: "Better reason")
-
- # Rebuild events
- service_instance.build_events
- new_events.push(:in_progress, :request_approved)
- expect(events.map(&:event_type)).to contain_exactly(*one_imr_events + new_events)
-
- # Create another addition IMR to verify that the event sequence works through one more iteration
- create_last_addition_and_verify_events(one_imr_events, new_events)
- end
-
- it "should correctly generate events for an imr that is cancelled while another is added" do
- events = subject
- one_imr_events = *starting_imr_events - [:removal]
- expect(events.map(&:event_type)).to contain_exactly(*one_imr_events)
-
- # Cancel the addition IMR at the same time as creating a new issue modification request to
- # modify the existing request issue on the supplemental claim
- Timecop.travel(2.minutes.from_now)
- ActiveRecord::Base.transaction do
- issue_modification_addition.update!(status: "cancelled")
- issue_modification_modify
- end
-
- # Rebuild events
- service_instance.build_events
- new_events = [:modification, :request_cancelled]
- expect(events.map(&:event_type)).to contain_exactly(*one_imr_events + new_events)
-
- # Approve the modification to verify that it create a new in progress event and a denied event
- Timecop.travel(2.minutes.from_now)
- issue_modification_modify.update!(decider: vha_admin, status: :denied, decision_reason: "Better reason")
-
- # Rebuild events
- service_instance.build_events
- new_events.push(:in_progress, :request_denied)
- expect(events.map(&:event_type)).to contain_exactly(*one_imr_events + new_events)
-
- # Create another addition IMR to verify that the event sequence works through one more iteration
- create_last_addition_and_verify_events(one_imr_events, new_events)
- end
-
- it "should correctly track the previous version data for multiple IMR edits" do
- events = subject
- one_imr_events = *starting_imr_events - [:removal]
- expect(events.map(&:event_type)).to contain_exactly(*one_imr_events)
-
- # Edit several fields to create a new version of the IMR
- Timecop.travel(2.minutes.from_now)
- issue_modification_addition.update!(nonrating_issue_category: "Other",
- nonrating_issue_description: "Edited description 1",
- edited_at: Time.zone.now)
-
- # Rebuild events
- service_instance.build_events
- new_events = [:request_edited]
- expect(events.map(&:event_type)).to contain_exactly(*one_imr_events + new_events)
-
- # Edit several fields to create a new version of the IMR
- Timecop.travel(2.minutes.from_now)
- issue_modification_addition.update!(nonrating_issue_description: "Edited description 2",
- edited_at: Time.zone.now)
-
- # Rebuild events
- service_instance.build_events
- new_events.push(:request_edited)
- expect(events.map(&:event_type)).to contain_exactly(*one_imr_events + new_events)
-
- # Verify that each of the edited events has the information from the previous version
- edited_events = events.select { |event| event.event_type == :request_edited }
-
- first_edit = edited_events.first
- second_edit = edited_events.last
-
- expect(first_edit).to have_attributes(
- new_issue_description: "Edited description 1",
- new_issue_type: "Other",
- previous_issue_description: "Starting issue description",
- previous_issue_type: "CHAMPVA"
- )
-
- expect(second_edit).to have_attributes(
- new_issue_description: "Edited description 2",
- new_issue_type: "Other",
- previous_issue_description: "Edited description 1",
- previous_issue_type: "Other"
- )
- end
-
- context "starting with two imrs" do
- let!(:issue_modification_removal) do
- create(:issue_modification_request,
- request_type: "removal",
- request_issue: request_issue,
- decision_review: supplemental_claim)
- end
-
- it "should correctly generate temporary in progress events for two imrs created at the same time" do
- events = subject
- expect(events.map(&:event_type)).to contain_exactly(*starting_imr_events)
-
- # Deny the removal and make sure the events are correct
- Timecop.travel(2.minutes.from_now)
- issue_modification_removal.update!(decider: vha_admin, status: :denied, decision_reason: "Just cause")
-
- # Rebuild events
- service_instance.build_events
- new_events = [:request_denied]
- expect(events.map(&:event_type)).to contain_exactly(*starting_imr_events + new_events)
-
- # Approve the addition and make sure the events are correct
- # NOTE: This only does the issue modification events and does not create a request issue update
- Timecop.travel(2.minutes.from_now)
- issue_modification_addition.update!(decider: vha_admin, status: :approved, decision_reason: "Better reason")
-
- # Rebuild events
- service_instance.build_events
- new_events.push(:in_progress, :request_approved)
- expect(events.map(&:event_type)).to contain_exactly(*starting_imr_events + new_events)
-
- # Create another addition IMR to verify that the event sequence works through one more iteration
- create_last_addition_and_verify_events(starting_imr_events, new_events)
- end
-
- it "should correctly generate temporary in progress events for two imrs decided at the same time" do
- events = subject
- expect(events.map(&:event_type)).to contain_exactly(*starting_imr_events)
-
- # Deny the removal and approve the addition and make sure the events are correct
- Timecop.travel(2.minutes.from_now)
- ActiveRecord::Base.transaction do
- issue_modification_removal.update!(decider: vha_admin, status: :denied, decision_reason: "Just cause")
- issue_modification_addition.update!(decider: vha_admin, status: :approved, decision_reason: "Better reason")
- end
-
- # Rebuild events
- service_instance.build_events
- new_events = [:request_denied, :request_approved, :in_progress]
- expect(events.map(&:event_type)).to contain_exactly(*starting_imr_events + new_events)
-
- # Create another addition IMR to verify that the event sequence works through one more iteration
- Timecop.travel(2.minutes.from_now)
- addition2 = create(:issue_modification_request, request_type: "addition", decision_review: supplemental_claim)
-
- service_instance.build_events
- new_events.push(:addition, :pending)
- expect(events.map(&:event_type)).to contain_exactly(*starting_imr_events + new_events)
-
- # Approve the newest addition to make sure the in progress and approval events are correct
- Timecop.travel(2.minutes.from_now)
- addition2.update!(decider: vha_admin, status: :approved, decision_reason: "Better reason2")
-
- service_instance.build_events
- new_events.push(:in_progress, :request_approved)
- expect(events.map(&:event_type)).to contain_exactly(*starting_imr_events + new_events)
-
- # Create another addition IMR to verify that the event sequence works through one more iteration
- create_last_addition_and_verify_events(starting_imr_events, new_events)
- end
-
- it "should correctly generate temporary in progress events for two imrs with one cancelled in reverse order" do
- events = subject
- expect(events.map(&:event_type)).to contain_exactly(*starting_imr_events)
-
- # Approve the addition and make sure the events are correct
- # NOTE: This only does the issue modification events and does not create a request issue update
- Timecop.travel(2.minutes.from_now)
- issue_modification_addition.update!(decider: vha_admin, status: :approved, decision_reason: "Better reason")
-
- # Rebuild events
- service_instance.build_events
- new_events = [:request_approved]
- expect(events.map(&:event_type)).to contain_exactly(*starting_imr_events + new_events)
-
- # Cancel the removal and make sure the events are correct
- Timecop.travel(2.minutes.from_now)
- issue_modification_removal.update!(decider: vha_admin, status: :cancelled, decision_reason: "Just cause")
-
- # Rebuild events
- service_instance.build_events
- new_events.push(:request_cancelled, :in_progress)
- expect(events.map(&:event_type)).to contain_exactly(*starting_imr_events + new_events)
-
- # Create another addition IMR to verify that the event sequence works through one more iteration
- create_last_addition_and_verify_events(starting_imr_events, new_events)
- end
-
- it "when an imr is cancelled at the same time and another is created" do
- events = subject
- expect(events.map(&:event_type)).to contain_exactly(*starting_imr_events)
-
- # Approve the addition and make sure the events are correct
- # NOTE: This only does the issue modification events and does not create a request issue update
- Timecop.travel(2.minutes.from_now)
- issue_modification_addition.update!(decider: vha_admin, status: :approved, decision_reason: "Better reason")
-
- # Rebuild events
- service_instance.build_events
- new_events = [:request_approved]
- expect(events.map(&:event_type)).to contain_exactly(*starting_imr_events + new_events)
-
- # Cancel the removal and add a new approval at the same time
- Timecop.travel(2.minutes.from_now)
- addition2 = nil
- ActiveRecord::Base.transaction do
- issue_modification_removal.update!(decider: vha_admin, status: :cancelled, decision_reason: "Just cause")
- addition2 = create(:issue_modification_request,
- request_type: "addition",
- decision_review: supplemental_claim)
- end
-
- # Rebuild events
- service_instance.build_events
- new_events.push(:request_cancelled, :addition)
- expect(events.map(&:event_type)).to contain_exactly(*starting_imr_events + new_events)
-
- # Approve the newest addition to make sure the in progress and approval events are correct
- Timecop.travel(2.minutes.from_now)
- addition2.update!(decider: vha_admin, status: :approved, decision_reason: "Better reason2")
-
- service_instance.build_events
- new_events.push(:in_progress, :request_approved)
- expect(events.map(&:event_type)).to contain_exactly(*starting_imr_events + new_events)
-
- # Create another addition IMR to verify that the event sequence works through one more iteration
- create_last_addition_and_verify_events(starting_imr_events, new_events)
- end
- end
-
- context "with multiple text edit in for a withdrawal event" do
- let!(:issue_modification_withdrawal) do
- create(:issue_modification_request,
- :withdrawal,
- request_issue: request_issue,
- decision_review: supplemental_claim,
- request_reason: "first comment in the array",
- nonrating_issue_description: "first nonrating description")
- end
-
- let!(:issue_modification_edit_of_request_first) do
- issue_modification_withdrawal.nonrating_issue_description = "this is first update"
- issue_modification_withdrawal.updated_at = Time.zone.today
- issue_modification_withdrawal.save!
- end
-
- let!(:issue_modification_edit_of_request_second) do
- issue_modification_withdrawal.nonrating_issue_description = "this is Second update"
- issue_modification_withdrawal.withdrawal_date = Time.zone.today - 12.days
- issue_modification_withdrawal.updated_at = Time.zone.today
- issue_modification_withdrawal.save!
- end
-
- it "should have two request of edit event and a withdrawal event" do
- events = service_instance.build_events
- starting_event_without_removal = *starting_imr_events - [:removal]
- new_events = [:withdrawal, :request_edited, :request_edited]
- expect(events.map(&:event_type)).to contain_exactly(*starting_event_without_removal + new_events)
- end
- end
- end
-
context "with filters" do
context "with task_id filter" do
let(:filters) { { task_id: sc_task.id } }
@@ -610,10 +237,7 @@ def create_last_addition_and_verify_events(original_events, current_events)
it "should only return events for tasks that match the claim type filter" do
subject
- expect(service_instance.events.map(&:event_type)).to contain_exactly(
- *expected_hlr_event_types,
- *expected_imr_event_types
- )
+ expect(service_instance.events.map(&:event_type)).to contain_exactly(*expected_hlr_event_types)
end
context "with no filter matches" do
@@ -631,10 +255,7 @@ def create_last_addition_and_verify_events(original_events, current_events)
it "should only return events for the tasks that match the task status filter" do
subject
- expect(service_instance.events.map(&:event_type)).to contain_exactly(
- *expected_sc_event_types,
- *expected_imr_event_types
- )
+ expect(service_instance.events.map(&:event_type)).to contain_exactly(*expected_sc_event_types)
end
context "with no filter matches" do
@@ -675,7 +296,7 @@ def create_last_addition_and_verify_events(original_events, current_events)
it "should return events without a disposition" do
subject
- expect(service_instance.events.count).to eq(total_event_count)
+ expect(service_instance.events.count).to eq(14)
end
end
end
@@ -687,9 +308,7 @@ def create_last_addition_and_verify_events(original_events, current_events)
subject
expected_event_types = [
:added_issue,
- :completed_disposition,
- :added_issue,
- :request_edited
+ :completed_disposition
]
expect(service_instance.events.map(&:event_type)).to contain_exactly(*expected_event_types)
end
@@ -712,9 +331,7 @@ def create_last_addition_and_verify_events(original_events, current_events)
:added_issue,
:completed_disposition,
:added_issue,
- :withdrew_issue,
- :added_issue,
- :request_edited
+ :withdrew_issue
]
expect(service_instance.events.map(&:event_type)).to contain_exactly(*expected_event_types)
end
@@ -730,7 +347,6 @@ def create_last_addition_and_verify_events(original_events, current_events)
:added_issue,
:added_issue,
:added_issue,
- :added_issue,
:completed_disposition,
:completed_disposition
]
@@ -764,8 +380,7 @@ def create_last_addition_and_verify_events(original_events, current_events)
subject
expect(service_instance.events.map(&:event_type)).to contain_exactly(
*expected_hlr_event_types,
- *expected_sc_event_types,
- *expected_imr_event_types
+ *expected_sc_event_types
)
end
end
@@ -793,8 +408,7 @@ def create_last_addition_and_verify_events(original_events, current_events)
]
expect(service_instance.events.map(&:event_type)).to contain_exactly(
*filtered_hlr_event_types,
- *expected_sc_event_types,
- *expected_imr_event_types
+ *expected_sc_event_types
)
end
end
@@ -818,8 +432,7 @@ def create_last_addition_and_verify_events(original_events, current_events)
subject
expect(service_instance.events.map(&:event_type)).to contain_exactly(
*(expected_hlr_event_types - [:claim_creation]),
- *expected_sc_event_types,
- *expected_imr_event_types
+ *expected_sc_event_types
)
end
@@ -929,8 +542,7 @@ def create_last_addition_and_verify_events(original_events, current_events)
it "should return all events" do
subject
expect(service_instance.events.map(&:event_type)).to contain_exactly(*expected_hlr_event_types,
- *expected_sc_event_types,
- *expected_imr_event_types)
+ *expected_sc_event_types)
end
end
end
@@ -941,8 +553,7 @@ def create_last_addition_and_verify_events(original_events, current_events)
it "should only return events for tasks that match the days waiting filter" do
subject
- expect(service_instance.events.map(&:event_type)).to contain_exactly(*expected_hlr_event_types,
- *expected_imr_event_types)
+ expect(service_instance.events.map(&:event_type)).to contain_exactly(*expected_hlr_event_types)
end
end
@@ -1055,64 +666,11 @@ def create_last_addition_and_verify_events(original_events, current_events)
subject
expected_event_types = [
:completed,
- :in_progress,
- :request_approved
+ :in_progress
]
expect(service_instance.events.map(&:event_type)).to contain_exactly(*expected_event_types)
end
end
-
- context "with issue modification request task id" do
- let(:filters) { { task_id: hlr_task_with_imr.decision_review.tasks.ids[0] } }
- it "should only return the filtered events for the specific task ids" do
- subject
- expect(service_instance.events.map(&:event_type)).to contain_exactly(*expected_imr_event_types)
- end
- end
-
- context "with multiple filters for task id and event" do
- let(:filters) do
- { task_id: hlr_task_with_imr.decision_review.tasks.ids[0], events: [:added_issue, :claim_creation] }
- end
-
- it "should only return the filtered events for the specific task ids" do
- subject
- expect(service_instance.events.map(&:event_type)).to contain_exactly(:added_issue, :claim_creation)
- end
- end
-
- context "with multiple filters for task id and event" do
- let(:filters) do
- { task_id: hlr_task_with_imr.decision_review.tasks.ids[0], events: [:request_edited] }
- end
-
- it "should only return the filtered events for the specific task ids" do
- subject
- expect(service_instance.events.map(&:event_type)).to contain_exactly(:request_edited)
- end
- end
-
- context "with multiple filters for task id and event" do
- let(:filters) do
- { task_id: hlr_task_with_imr.decision_review.tasks.ids[0], events: [:request_approved] }
- end
-
- it "should only return the filtered events for the specific task ids" do
- subject
- expect(service_instance.events.map(&:event_type)).to contain_exactly(:request_approved)
- end
- end
-
- context "with multiple filters for task id and event" do
- let(:filters) do
- { task_id: hlr_task_with_imr.decision_review.tasks.ids[0], events: [:pending] }
- end
-
- it "should only return the filtered events for the specific task ids" do
- subject
- expect(service_instance.events.map(&:event_type)).to contain_exactly(:pending)
- end
- end
end
end
end
diff --git a/spec/support/download_helper.rb b/spec/support/download_helper.rb
index 0fe587db62f..e31024f8ffd 100644
--- a/spec/support/download_helper.rb
+++ b/spec/support/download_helper.rb
@@ -11,8 +11,6 @@ module DownloadHelpers
def downloads
Dir.entries(WORKDIR)
- .reject { |f| f == "." || f == ".." }
- .map { |file| File.join(WORKDIR, file) }
end
def download
@@ -39,6 +37,6 @@ def downloading?
end
def clear_downloads
- FileUtils.rm_rf(Dir.glob(File.join(WORKDIR, "*")))
+ FileUtils.rm_f(downloads)
end
end
diff --git a/yarn.lock b/yarn.lock
new file mode 100644
index 00000000000..f0b9254cd9e
--- /dev/null
+++ b/yarn.lock
@@ -0,0 +1,15 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+node-bin-setup@^1.0.0:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/node-bin-setup/-/node-bin-setup-1.1.3.tgz#d45d5220e3b2ecc3a94263a56116f727f6c1bb14"
+ integrity sha512-opgw9iSCAzT2+6wJOETCpeRYAQxSopqQ2z+N6BXwIMsQQ7Zj5M8MaafQY8JMlolRR6R1UXg2WmhKp0p9lSOivg==
+
+node@16.16.0:
+ version "16.16.0"
+ resolved "https://registry.yarnpkg.com/node/-/node-16.16.0.tgz#43ce8731d97ae79dff2f227e764938025200796d"
+ integrity sha512-uEZWEG6HuGbrRi6wEZIna4yWj197JByvJkMmi8Yxx9Z6y8GazVy0p2qYOwLYJqQRf4N37+eL+FBIdhT1mHGpFA==
+ dependencies:
+ node-bin-setup "^1.0.0"