Skip to content

Commit 451d1b1

Browse files
sri49vkghubsaipraveen18ATBull81TristanB17
authored
CU-868j4p4pz :: 31.8.1 pre release (#6160)
* Revert "enhance SSN matching logic to prevent applicant saves when SSN is taken (#5986)" This reverts commit 0289274. * Revert "update non requesting applicants evidence states on hub call (#5996)" This reverts commit 468d9ae. * Revert "Add base-uri directive. (#6042)" This reverts commit da0d227. * Revert "update email validation regex across models and controllers (#6055)" This reverts commit 0e44a74. * Revert "update event source reference (#6007)" This reverts commit 73694e9. * use eligibility year to create previous THHG and remove date check (#6117) * use eligibility year to create previous THHG and remove date check for non active enrollments * fix spec * rubocop fix --------- Co-authored-by: Sai Praveen Gudimetla <saipraveen.gudimetla@gmail.com> * reintroduce disabled FAA continue button (#6132) * add verification history prior to sending dmf request (#6137) * add verification history prior to sending dmf request * update class comparison check * redirect ridp verified consumers on pre ridp pages (#6124) * redirect ridp verified consumers * spec fix * cucumber coverage * fix ARIA error (#6145) * fix ARIA error * contrast errors --------- Co-authored-by: Sai Praveen Gudimetla <saipraveen.gudimetla@gmail.com> * update spec to accurately expect outstanding aasm state (#6156) * update test to accurately expected evidence aasm state * fix indentation on spec * remove unnecessary line from spec * add refocus after modal close and prevent focus traps (#6116) * add refocus after modal close and prevent focus traps * add missing declaration * remove unnecessary code comments * Add script to delete stale tax household enrollments (#6157) * Add script to delete stale tax household enrollments * fix comment * show expired or determined evidence app history (#6162) Co-authored-by: Jacob Kagon <69021620+jacobkagon@users.noreply.github.com> * move to v3 evidence checks instead of consumer_role state (#6118) * move to v3 evidences from consumer_role * hbx_enrollment_spec addition * consumer role doesn't affect enrollment * add pending eligibility cuke * lint * update to reuse individual market logic * spec fixes * protect against missing family_id --------- Co-authored-by: Michael Karamanov <michael.karamanov@ideacrew.com> * handle enrollment generation failures gracefully (#6165) * Handle enrollment generation failures gracefully in AddEligibilityDetermination operation * lint fix * evidence downgrades from outstanding or rejected (#6109) Co-authored-by: Michael Karamanov <mdkaramanov@gmail.com> * check to prevent stale verified evidence uploads (#6163) * check to prevent stale verified evidence uploads * rubocop * fix spec * handle carrier rescission terms and cancels (#6136) * intial changes * add handling to enrollments canceled or terminated via carrier rescission * remove comment and update query * remove more comments * include new translations * remove comment * add key to system config * change key in system config value * update var name for clarity * change fraud reason from fraudulent activity to fraud * fix logic in families helper * revert linter changes to hbx enrollment * revert linter changes again * add cucumbers for enrollment history * remove cucumber step to ensure GHA passes * use correct translation in spec * remove irrelevant test and step * fix failing cucumber after broken by merge trunk Conflicts: config/client_config/dc/system/config/templates/features/enroll_app/enroll_app.yml config/client_config/me/system/config/templates/features/enroll_app/enroll_app.yml system/config/templates/features/enroll_app/enroll_app.yml revert 6007 changes * update ui display text for rescinded enrollments (#6147) * update ui display text for rescinded enrollments * fix specs failing in gha * remove unused translation --------- Co-authored-by: vishal kalletla <vishuk1201@gmail.com> Co-authored-by: Sai Praveen Gudimetla <saipraveen.gudimetla@gmail.com> Co-authored-by: Alec Turnbull <alecturnbull81@gmail.com> Co-authored-by: Tristan <33517218+TristanB17@users.noreply.github.com> Co-authored-by: Michael Karamanov <mdkaramanov@gmail.com> Co-authored-by: Jacob Kagon <69021620+jacobkagon@users.noreply.github.com> Co-authored-by: Michael Karamanov <michael.karamanov@ideacrew.com>
1 parent 6e767b1 commit 451d1b1

97 files changed

Lines changed: 2343 additions & 1012 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ GIT
4242

4343
GIT
4444
remote: https://github.com/ideacrew/event_source.git
45-
revision: d108374e4df95a9dc61662052b06b0955e7b317d
45+
revision: dbd6659862bc963166dbc53534bcf646260b5f6b
4646
branch: trunk
4747
specs:
4848
event_source (0.6.0)

app/assets/javascripts/inline_replacements.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,29 @@ function enableButton(button) {
1616
.removeClass('disabled');
1717
};
1818

19+
function restoreModalFocus(triggerElement, options) {
20+
options = Object.assign({
21+
fallbackElement: document.body,
22+
delay: 100
23+
}, options);
24+
25+
setTimeout(function() {
26+
if (triggerElement && triggerElement.offsetParent !== null) {
27+
triggerElement.focus();
28+
return;
29+
}
30+
31+
if (options.fallbackElement.matches &&
32+
options.fallbackElement.matches('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href]:not([disabled])')) {
33+
options.fallbackElement.focus();
34+
} else {
35+
options.fallbackElement.querySelector(
36+
'button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href]:not([disabled])'
37+
).focus();
38+
}
39+
}, options.delay);
40+
};
41+
1942
$(document).on('click', '.remove-child-row-btn', function () {
2043
$('tr.child-row:visible').remove();
2144
});

app/assets/javascripts/register.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ var Register = ( function( window, undefined ) {
321321
function toggleEmail(element){
322322
$(element).val($.trim($(element).val()));
323323
var username= $(element).val();
324-
var email_regexp = /^[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/i;
324+
var email_regexp = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/i;
325325

326326
if(email_regexp.test(username)) {
327327
$('.email_field').addClass("hidden_field");

app/assets/javascripts/ui-components/validators.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,5 @@ function validateEmailFormat(element) {
8282

8383
function isEmail(email) {
8484
//https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address
85-
return /^[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/i.test(email);
85+
return /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/i.test(email);
8686
}

app/controllers/exchanges/hbx_profiles_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,6 +1375,7 @@ def process_create_eligibility(params)
13751375
{
13761376
family_id: permitted_params[:family_id],
13771377
enrollment_effective_date: permitted_params[:enrollment_effective_date],
1378+
eligibility_year: params.require(:year),
13781379
th_group_info: {tax_households: permitted_params[:tax_households]},
13791380
updated_by: current_user&.email
13801381
}

app/controllers/insured/consumer_roles_controller.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class Insured::ConsumerRolesController < ApplicationController
2020
before_action :validate_person_match, only: [:update]
2121
before_action :redirect_to_contact_preferences_if_invalid, only: [:edit]
2222
before_action :manual_verification_of_oos_addresses, only: [:ridp_agreement]
23+
before_action :redirect_to_family_home_if_ridp_complete, only: [:edit, :update, :contact_preferences, :create_contact_preferences]
2324

2425
FIELDS_TO_ENCRYPT = [:ssn,:dob,:first_name,:middle_name,:last_name,:gender,:user_id].freeze
2526

@@ -230,6 +231,7 @@ def immigration_document_options
230231

231232
def contact_preferences
232233
authorize @consumer_role, :contact_preferences?
234+
233235
set_consumer_bookmark_url
234236
@consumer_role.build_nested_models_for_person
235237
end
@@ -248,6 +250,7 @@ def create_contact_preferences
248250

249251
def edit
250252
authorize @consumer_role, :edit?
253+
251254
set_consumer_bookmark_url
252255
@consumer_role.build_nested_models_for_person
253256
@vlp_doc_subject = get_vlp_doc_subject_by_consumer_role(@consumer_role)
@@ -697,6 +700,11 @@ def redirect_to_contact_preferences_if_invalid
697700
redirect_to contact_preferences_insured_consumer_role_path(@consumer_role) and return
698701
end
699702

703+
def redirect_to_family_home_if_ridp_complete
704+
ridp_verified = RemoteIdentityProofingStatus.is_complete_for_consumer_role?(@consumer_role)
705+
redirect_to home_insured_families_path if ridp_verified
706+
end
707+
700708
def enable_bs4_layout
701709
@bs4 = true if EnrollRegistry.feature_enabled?(:bs4_consumer_flow)
702710
end

app/controllers/insured/families_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def home
5959
update_changing_hbxs(@hbx_enrollments)
6060

6161
@hbx_enrollments += HbxEnrollment.family_non_pay_enrollments(@family) if EnrollRegistry.feature_enabled?(:show_non_pay_enrollments)
62+
@hbx_enrollments += HbxEnrollment.family_fraudulent_enrollments(@family) if EnrollRegistry.feature_enabled?(:cancel_or_term_enrollment_for_fraud)
6263

6364
@employee_role = @person.active_employee_roles.first if is_shop_or_fehb_market_enabled?
6465
@tab = params['tab']
@@ -86,6 +87,7 @@ def enrollment_history
8687

8788
@hbx_enrollments = @family.enrollments.non_external.order(effective_on: :desc, submitted_at: :desc, coverage_kind: :desc) || []
8889
@hbx_enrollments += HbxEnrollment.family_non_pay_enrollments(@family)
90+
@hbx_enrollments += HbxEnrollment.family_fraudulent_enrollments(@family) if EnrollRegistry.feature_enabled?(:cancel_or_term_enrollment_for_fraud)
8991

9092
@all_hbx_enrollments_for_admin = if EnrollRegistry.feature_enabled?(:include_external_enrollment_in_display_all_enrollments)
9193
@hbx_enrollments + HbxEnrollment.family_canceled_enrollments(@family) + HbxEnrollment.family_external_enrollments(@family)

app/domain/operations/async_migrations/handlers/families/eligibility/redetermine_unconditionally.rb

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ class RedetermineUnconditionally
4343
"Current Determination Status",
4444
"Current Due Date",
4545
"Current Determination Application HBX ID",
46-
"Message",
47-
"Status"
46+
"Message"
4847
].freeze
4948

5049
# Validates input, initializes logging, loads the Family, confirms a prior
@@ -63,8 +62,8 @@ class RedetermineUnconditionally
6362
def call(params)
6463
validated_params = yield validate(params)
6564
family = yield find_family(validated_params[:document_id])
66-
previous_eligibility_determination, message, status = yield redetermine_eligibility(family)
67-
row = yield csv_row(previous_eligibility_determination, message, status, family)
65+
previous_eligibility_determination, message = yield redetermine_eligibility(family)
66+
row = yield csv_row(previous_eligibility_determination, message, family)
6867
result = yield publish(row)
6968

7069
Success(result)
@@ -130,11 +129,11 @@ def redetermine_eligibility(family)
130129
end
131130

132131
logger.send(result.success? ? :info : :error, message)
133-
Success([previous_eligibility_determination, message, :success])
132+
Success([previous_eligibility_determination, message])
134133
rescue StandardError => e
135134
message = "Error determining eligibility for Family: #{family.id} - #{e.message}"
136135
logger.error(message)
137-
Success([previous_eligibility_determination, message, :error])
136+
Failure(message)
138137
end
139138

140139
# Composes a CSV row for reporting, including previous and current determination details.
@@ -147,7 +146,7 @@ def redetermine_eligibility(family)
147146
# @param family [Family] Target family
148147
#
149148
# @return [Dry::Monads::Result] Success(Hash) row data ready for publishing
150-
def csv_row(previous_eligibility_determination, message, status, family)
149+
def csv_row(previous_eligibility_determination, message, family)
151150
primary = family.primary_person
152151
current_eligibility_determination = family.eligibility_determination
153152

@@ -157,28 +156,17 @@ def csv_row(previous_eligibility_determination, message, status, family)
157156
previous_eligibility_determination&.created_at,
158157
previous_eligibility_determination&.outstanding_verification_status,
159158
previous_eligibility_determination&.outstanding_verification_earliest_due_date,
160-
GlobalID::Locator.locate(previous_eligibility_determination&.application_gid)&.hbx_id
161-
]
162-
row += if status == :success
163-
rebuilt_values(current_eligibility_determination)
164-
else
165-
[nil, nil, nil, nil, nil]
166-
end
167-
168-
row += [message, status]
159+
GlobalID::Locator.locate(previous_eligibility_determination&.application_gid)&.hbx_id,
160+
current_eligibility_determination&.created_at,
161+
current_eligibility_determination&.outstanding_verification_status,
162+
current_eligibility_determination&.outstanding_verification_earliest_due_date,
163+
GlobalID::Locator.locate(current_eligibility_determination&.application_gid)&.hbx_id,
164+
message
165+
]
169166

170167
Success(row)
171168
end
172169

173-
def rebuilt_values(current_eligibility_determination)
174-
[
175-
current_eligibility_determination&.created_at,
176-
current_eligibility_determination&.outstanding_verification_status,
177-
current_eligibility_determination&.outstanding_verification_earliest_due_date,
178-
GlobalID::Locator.locate(current_eligibility_determination&.application_gid)&.hbx_id
179-
]
180-
end
181-
182170
# Publishes the CSV row to the migration results event topic.
183171
#
184172
# Event name: `events.migration_results.enqueue_result`

app/domain/operations/eligibilities/evidences/show.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ def fetch_applications(family_id)
6363
end
6464

6565
def fetch_qhp_applications(family_id)
66-
query = ::IndividualMarket::Application.cancelled_or_determined_by_family(family_id)
66+
query = ::IndividualMarket::Application.expired_or_determined_by_family(family_id)
6767

6868
query.to_a
6969
end
7070

7171
def fetch_faa_applications(family_id)
72-
query = ::FinancialAssistance::Application.cancelled_or_determined_by_family(family_id)
72+
query = ::FinancialAssistance::Application.expired_or_determined_by_family(family_id)
7373

7474
query.to_a
7575
end

app/domain/operations/families/verifications/dmf_determination/request_dmf_determination.rb

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ def call(payload)
2525
@transmission = yield build_and_create_request_transmission(values)
2626
@transaction = yield build_and_create_request_transaction(values)
2727

28-
# only record verification history if qhp_application is disabled
29-
# verification histories for V3::Evidence should not be recorded unless an error occurs
3028
yield record_verification_history unless EnrollRegistry.feature_enabled?(:qhp_application)
3129
yield build_applicants_alive_evidences if EnrollRegistry.feature_enabled?(:qhp_application)
3230

@@ -117,9 +115,26 @@ def build_applicants_alive_evidences
117115
Operations::Eligibilities::BuildFamilyDetermination.new.call({ family: @family })
118116
end
119117

118+
create_application_evidence_histories(latest_application, 'DMF_Request_Submitted', 'DMF Determination submitted', 'system')
119+
120120
Success(true)
121121
end
122122

123+
def create_application_evidence_histories(application, action, update_reason, update_by)
124+
applicants = application.is_a?(::FinancialAssistance::Application) ? application.active_applicants : application.applicants
125+
applicants.each do |applicant|
126+
evidence = applicant&.individual_market_eligibility&.alive_evidence
127+
next unless evidence.present?
128+
add_verification_history(evidence, action, update_reason, update_by)
129+
end
130+
131+
application.save!
132+
end
133+
134+
def add_verification_history(evidence, action, update_reason, update_by)
135+
evidence.build_verification_history(action, update_reason, update_by) if evidence.present?
136+
end
137+
123138
def latest_application
124139
@family.latest_application
125140
end

0 commit comments

Comments
 (0)