From cce240de2d8da9b70f5509554bab14e804f91293 Mon Sep 17 00:00:00 2001 From: Rebecca Tolmach <10993987+rmtolmach@users.noreply.github.com> Date: Mon, 15 Apr 2024 09:20:33 -0400 Subject: [PATCH 1/5] check codeowners update to catch more than one new file (#16322) --- .github/scripts/check_codeowners.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/scripts/check_codeowners.sh b/.github/scripts/check_codeowners.sh index ed51e7adc47..49023f81b33 100755 --- a/.github/scripts/check_codeowners.sh +++ b/.github/scripts/check_codeowners.sh @@ -12,6 +12,7 @@ HEAD_SHA=$(git rev-parse HEAD) BASE_SHA=$(git rev-parse origin/master) # Get the list of changed files between the base and head commits +IFS=$'\n' # Change IFS to split only on newlines CHANGED_FILES=$(git diff --name-only --diff-filter=AMR ${BASE_SHA}...${HEAD_SHA}) echo "Changed files: $CHANGED_FILES" @@ -37,7 +38,7 @@ check_in_codeowners() { return 1 } -for FILE in "${CHANGED_FILES}"; do +for FILE in ${CHANGED_FILES}; do # Ignore files starting with a dot if [[ $FILE == .* ]]; then echo "Ignoring file $FILE" @@ -53,3 +54,4 @@ for FILE in "${CHANGED_FILES}"; do done echo "All changed files or their parent directories have a CODEOWNERS entry." +IFS=$' \t\n' # Reset IFS after the loop From 6990d3f95be0ec4860fc06a4638789dd75fc4de1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 09:35:29 -0400 Subject: [PATCH 2/5] Bump foreman from 0.87.2 to 0.88.1 (#16329) Bumps [foreman](https://github.com/ddollar/foreman) from 0.87.2 to 0.88.1. - [Changelog](https://github.com/ddollar/foreman/blob/main/Changelog.md) - [Commits](https://github.com/ddollar/foreman/compare/v0.87.2...v0.88.1) --- updated-dependencies: - dependency-name: foreman dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index db35496d884..707153eb1ee 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -474,7 +474,7 @@ GEM rack (>= 1.4, < 4) rack-protection (>= 1.5.3, <= 4.0.0) sanitize (< 7) - foreman (0.87.2) + foreman (0.88.1) formatador (1.1.0) fugit (1.9.0) et-orbi (~> 1, >= 1.2.7) From 4ae959e93bc51c16861bdff362312890d50935df Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 10:15:49 -0400 Subject: [PATCH 3/5] Bump aws-sdk-kms from 1.78.0 to 1.79.0 (#16330) --- updated-dependencies: - dependency-name: aws-sdk-kms dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 707153eb1ee..a7febd39c91 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -243,13 +243,13 @@ GEM attr_extras (7.1.0) awesome_print (1.9.2) aws-eventstream (1.3.0) - aws-partitions (1.903.0) - aws-sdk-core (3.191.5) + aws-partitions (1.913.0) + aws-sdk-core (3.191.6) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.8) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.78.0) + aws-sdk-kms (1.79.0) aws-sdk-core (~> 3, >= 3.191.0) aws-sigv4 (~> 1.1) aws-sdk-s3 (1.146.1) From 35767c0c3e9b1d3156b0fd64362c6b8f91ff988c Mon Sep 17 00:00:00 2001 From: Eric Tillberg Date: Mon, 15 Apr 2024 10:53:50 -0400 Subject: [PATCH 4/5] More fixes for 20-10207 (#16312) * More fixes for 20-10207 * cleanup * Fix signatures on 20-10207 * rubocop --------- Co-authored-by: Rebecca Tolmach <10993987+rmtolmach@users.noreply.github.com> --- .../app/form_mappings/vba_20_10207.json.erb | 24 +++++++++---------- .../models/simple_forms_api/vba_20_10207.rb | 8 +++---- .../form_json/vba_20_10207-veteran.json | 1 + .../spec/models/vba_20_10207_spec.rb | 7 +++--- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/modules/simple_forms_api/app/form_mappings/vba_20_10207.json.erb b/modules/simple_forms_api/app/form_mappings/vba_20_10207.json.erb index a3a3b994c65..dcbb0119b2e 100644 --- a/modules/simple_forms_api/app/form_mappings/vba_20_10207.json.erb +++ b/modules/simple_forms_api/app/form_mappings/vba_20_10207.json.erb @@ -12,7 +12,7 @@ "form1[0].#subform[3].TelephoneNumber_FirstThreeNumbers[0]": "<%= form.data['veteran_phone']&.gsub('-', '')&.[](0..2) %>", "form1[0].#subform[3].TelephoneNumber_SecondThreeNumbers[0]": "<%= form.data['veteran_phone']&.gsub('-', '')&.[](3..5) %>", "form1[0].#subform[3].International_Phone_Number_If_Applicable[0]": "<%= nil %>", - "form1[0].#subform[3].Email_Address[0]": "<%= nil %>", + "form1[0].#subform[3].Email_Address[0]": "<%= form.data['veteran_email_address'] %>", "form1[0].#subform[3].CurrentMailingAddress_ZIPOrPostalCode_LastFourNumbers[0]": "<%= nil %>", "form1[0].#subform[3].CurrentMailingAddress_ZIPOrPostalCode_FirstFiveNumbers[0]": "<%= form.data.dig('veteran_mailing_address', 'postal_code') %>", "form1[0].#subform[3].CurrentMailingAddress_Country[0]": "<%= form.data.dig('veteran_mailing_address', 'country') %>", @@ -37,8 +37,8 @@ "form1[0].#subform[3].TelephoneNumber_FirstThreeNumbers[1]": "<%= form.data['non_veteran_phone']&.gsub('-', '')&.[](0..2) %>", "form1[0].#subform[3].TelephoneNumber_SecondThreeNumbers[1]": "<%= form.data['non_veteran_phone']&.gsub('-', '')&.[](3..5) %>", "form1[0].#subform[3].International_Phone_Number_If_Applicable[1]": "<%= nil %>", - "form1[0].#subform[3].VA_File_Number_If_Applicable[0]": "<%= nil %>", - "form1[0].#subform[3].Email_Address[2]": "<%= nil %>", + "form1[0].#subform[3].VA_File_Number_If_Applicable[0]": "<%= form.data.dig('non_veteran_id', 'va_file_number') %>", + "form1[0].#subform[3].Email_Address[2]": "<%= form.data['non_veteran_email_address'] %>", "form1[0].#subform[3].CurrentMailingAddress_ZIPOrPostalCode_LastFourNumbers[1]": "<%= nil %>", "form1[0].#subform[3].CurrentMailingAddress_ZIPOrPostalCode_FirstFiveNumbers[1]": "<%= form.data.dig('non_veteran_mailing_address', 'postal_code') %>", "form1[0].#subform[3].CurrentMailingAddress_Country[1]": "<%= form.data.dig('non_veteran_mailing_address', 'country') %>", @@ -48,7 +48,7 @@ "form1[0].#subform[3].CurrentMailingAddress_NumberAndStreet[1]": "<%= form.data.dig('non_veteran_mailing_address', 'street') %>", "form1[0].#subform[3].CheckBox1[1]": "<%= nil %>", "form1[0].#subform[3].Email_Address[3]": "<%= nil %>", - "form1[0].#subform[3].VA_File_Number_If_Applicable[1]": "<%= nil %>", + "form1[0].#subform[3].VA_File_Number_If_Applicable[1]": "<%= form.data.dig('veteran_id', 'va_file_number') %>", "form1[0].#subform[4].I_Live_Or_Sleep_In_A_Place_That_Is_Not_Meant_For_Regular_Sleeping[0]": "<%= form.data.dig('living_situation', 'overnight') ? 1 : 0 %>", "form1[0].#subform[4].I_Live_In_A_Shelter[0]": "<%= form.data.dig('living_situation', 'shelter') ? 1 : 0 %>", @@ -60,13 +60,11 @@ "form1[0].#subform[3].CurrentlyHomeless[0]": "<%= form.data.dig('living_situation', 'none') ? 1 : 0 %>", - "form1[0].#subform[3].Other1[0]": "<%= nil %>", + "form1[0].#subform[3].Other1[0]": "<%= form.data['other_housing_risks'] %>", "form1[0].#subform[4].Veterans_SocialSecurityNumber_LastFourNumbers[1]": "<%= form.data.dig('veteran_id', 'ssn')&.[](5..8) %>", "form1[0].#subform[4].Veterans_SocialSecurityNumber_SecondTwoNumbers[1]": "<%= form.data.dig('veteran_id', 'ssn')&.[](3..4) %>", "form1[0].#subform[4].Veterans_SocialSecurityNumber_FirstThreeNumbers[1]": "<%= form.data.dig('veteran_id', 'ssn')&.[](0..2) %>", - "form1[0].#subform[4].Other2[0]": "<%= form.data['other_housing_risks'] %>", - "form1[0].#subform[4].Telephone_Number_Area_Code[0]": "<%= form.data['point_of_contact_phone']&.gsub('-', '')&.[](0..2) %>", "form1[0].#subform[4].Telephone_Middle_Three_Numbers[0]": "<%= form.data['point_of_contact_phone']&.gsub('-', '')&.[](3..5) %>", "form1[0].#subform[4].Telephone_Last_Four_Numbers[0]": "<%= form.data['point_of_contact_phone']&.gsub('-', '')&.[](6..9) %>", @@ -86,12 +84,12 @@ "form1[0].#subform[4].Month[3]": "<%= form.data['pow_confinement_end_date']&.[](5..6) %>", "form1[0].#subform[4].Day[3]": "<%= form.data['pow_confinement_end_date']&.[](8..9) %>", "form1[0].#subform[4].Year[3]": "<%= form.data['pow_confinement_end_date']&.[](0..3) %>", - "form1[0].#subform[4].Month[5]": "<%= form.data['pow_confinement2start_date']&.[](5..6) %>", - "form1[0].#subform[4].Day[5]": "<%= form.data['pow_confinement2start_date']&.[](8..9) %>", - "form1[0].#subform[4].Year[5]": "<%= form.data['pow_confinement2start_date']&.[](0..3) %>", - "form1[0].#subform[4].Month[7]": "<%= form.data['pow_confinement2end_date']&.[](5..6) %>", - "form1[0].#subform[4].Day[7]": "<%= form.data['pow_confinement2end_date']&.[](8..9) %>", - "form1[0].#subform[4].Year[7]": "<%= form.data['pow_confinement2end_date']&.[](0..3) %>", + "form1[0].#subform[4].Month[5]": "<%= form.data['pow_confinement2_start_date']&.[](5..6) %>", + "form1[0].#subform[4].Day[5]": "<%= form.data['pow_confinement2_start_date']&.[](8..9) %>", + "form1[0].#subform[4].Year[5]": "<%= form.data['pow_confinement2_start_date']&.[](0..3) %>", + "form1[0].#subform[4].Month[7]": "<%= form.data['pow_confinement2_end_date']&.[](5..6) %>", + "form1[0].#subform[4].Day[7]": "<%= form.data['pow_confinement2_end_date']&.[](8..9) %>", + "form1[0].#subform[4].Year[7]": "<%= form.data['pow_confinement2_end_date']&.[](0..3) %>", "form1[0].#subform[4].Name_And_Location_Of_Treatment_Facility1[0]": "<%= form.facility_name(1) %>", "form1[0].#subform[4].DateOfTreatment_Month1[0]": "<%= form.facility_month(1) %>", diff --git a/modules/simple_forms_api/app/models/simple_forms_api/vba_20_10207.rb b/modules/simple_forms_api/app/models/simple_forms_api/vba_20_10207.rb index ff00fb4d991..a324bc267b6 100644 --- a/modules/simple_forms_api/app/models/simple_forms_api/vba_20_10207.rb +++ b/modules/simple_forms_api/app/models/simple_forms_api/vba_20_10207.rb @@ -12,7 +12,7 @@ def initialize(data) def facility_name(index) facility = @data['medical_treatments']&.[](index - 1) - "#{facility&.[]('facility_name')}\\n#{facility_address(index)}" + "#{facility&.[]('facility_name')}\\n#{facility_address(index)}" if facility end def facility_address(index) @@ -39,12 +39,12 @@ def facility_year(index) end def requester_signature - @data['statement_of_truth_signature'] if @data['preparer_type'] == 'veteran' + @data['statement_of_truth_signature'] if %w[veteran non-veteran].include? @data['preparer_type'] end def third_party_signature - @data['statement_of_truth_signature'] if @data['preparer_type'] != 'veteran' && - @data['third_party_type'] != 'power-of-attorney' + @data['statement_of_truth_signature'] if %w[third-party-veteran + third-party-non-veteran].include? @data['preparer_type'] end def power_of_attorney_signature diff --git a/modules/simple_forms_api/spec/fixtures/form_json/vba_20_10207-veteran.json b/modules/simple_forms_api/spec/fixtures/form_json/vba_20_10207-veteran.json index 0f8c643a31c..05ec5f3be90 100644 --- a/modules/simple_forms_api/spec/fixtures/form_json/vba_20_10207-veteran.json +++ b/modules/simple_forms_api/spec/fixtures/form_json/vba_20_10207-veteran.json @@ -23,6 +23,7 @@ "postal_code": "12345" }, "veteran_phone": "1234567890", + "veteran_email_address": "email@vet.com", "other_reasons": { "financial_hardship": true, "als": true, diff --git a/modules/simple_forms_api/spec/models/vba_20_10207_spec.rb b/modules/simple_forms_api/spec/models/vba_20_10207_spec.rb index 66f60b88e33..02e96f258a1 100644 --- a/modules/simple_forms_api/spec/models/vba_20_10207_spec.rb +++ b/modules/simple_forms_api/spec/models/vba_20_10207_spec.rb @@ -51,7 +51,7 @@ statement_of_truth_signature = 'John Veteran' [ { preparer_type: 'veteran', third_party_type: nil, expected: statement_of_truth_signature }, - { preparer_type: 'non-veteran', third_party_type: nil, expected: nil }, + { preparer_type: 'non-veteran', third_party_type: nil, expected: statement_of_truth_signature }, { preparer_type: 'third-party-non-veteran', third_party_type: 'representative', expected: nil }, { preparer_type: 'third-party-veteran', third_party_type: 'representative', expected: nil }, { preparer_type: 'third-party-non-veteran', third_party_type: 'power-of-attorney', expected: nil } @@ -78,12 +78,13 @@ statement_of_truth_signature = 'John Veteran' [ { preparer_type: 'veteran', third_party_type: nil, expected: nil }, - { preparer_type: 'non-veteran', third_party_type: nil, expected: statement_of_truth_signature }, + { preparer_type: 'non-veteran', third_party_type: nil, expected: nil }, { preparer_type: 'third-party-non-veteran', third_party_type: 'representative', expected: statement_of_truth_signature }, { preparer_type: 'third-party-veteran', third_party_type: 'representative', expected: statement_of_truth_signature }, - { preparer_type: 'third-party-non-veteran', third_party_type: 'power-of-attorney', expected: nil } + { preparer_type: 'third-party-non-veteran', third_party_type: 'power-of-attorney', + expected: statement_of_truth_signature } ].each do |data| preparer_type = data[:preparer_type] third_party_type = data[:third_party_type] From 209b1d773e2a1d4076491d8bd671a6d604dd072e Mon Sep 17 00:00:00 2001 From: Joshua Backfield <114932557+jbackfieldVA@users.noreply.github.com> Date: Mon, 15 Apr 2024 11:51:05 -0400 Subject: [PATCH 5/5] 97 average number of days db work only (#16331) * 97 Added database table and endpoint for average number of days for claim completion. * 97 Added SPEC file for unittest coverage and also linted everything. * 97 Removed anything non-db related for initial PR. * 97 Removed anything non-db related for initial PR. --------- Co-authored-by: Rebecca Tolmach <10993987+rmtolmach@users.noreply.github.com> --- ...153944_create_average_days_for_claim_completions.rb | 10 ++++++++++ db/schema.rb | 6 ++++++ 2 files changed, 16 insertions(+) create mode 100644 db/migrate/20240411153944_create_average_days_for_claim_completions.rb diff --git a/db/migrate/20240411153944_create_average_days_for_claim_completions.rb b/db/migrate/20240411153944_create_average_days_for_claim_completions.rb new file mode 100644 index 00000000000..ffb9a46abdb --- /dev/null +++ b/db/migrate/20240411153944_create_average_days_for_claim_completions.rb @@ -0,0 +1,10 @@ +# This migration comes from vye (originally 20240229184515) +class CreateAverageDaysForClaimCompletions < ActiveRecord::Migration[7.1] + def change + create_table :average_days_for_claim_completions do |t| + t.float average_days + + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 87ade4ad1ef..686d2f0e861 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -205,6 +205,12 @@ t.index ["user_uuid"], name: "index_async_transactions_on_user_uuid" end + create_table "average_days_for_claim_completions", id: :serial, force: :cascade do |t| + t.float "average_days", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + create_table "base_facilities", id: false, force: :cascade do |t| t.string "unique_id", null: false t.string "name", null: false