Skip to content

Commit

Permalink
Feature/appeals 49670 uat merge (#23217)
Browse files Browse the repository at this point in the history
* uat merge

* Konstantin/prevent check for before ama! (#23180)

* issue_from_event? check added into close_if_ineligible!

* alternative approach added

* check if appeal added

* comments removed

* status ok changed to created, close_if_ineligible! updated, useless methods removed

* close_if_ineligible! updated

* cleaned

* adding "contested" to UI text

---------

Co-authored-by: Jonathan Tsang <jonathan.tsang@va.gov>

* fix verify_contentions

* add saftey operator for missing request_issues_update

* fix optin check to pull from parser not review

---------

Co-authored-by: Konstantin Shevtsov <166068160+KonstantinShevtsov@users.noreply.github.com>
Co-authored-by: Jonathan Tsang <jonathan.tsang@va.gov>
  • Loading branch information
3 people authored Oct 15, 2024
1 parent ed970c5 commit 0db802a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/models/request_issue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ def fetch_request_issues_updates

def fetch_removed_by_user
if removed?
relevant_update = request_issues_updates.find do |update|
relevant_update = request_issues_updates&.find do |update|
update.removed_issues.any? { |issue| issue.id == id }
end

Expand Down
10 changes: 5 additions & 5 deletions app/models/request_issues_update_event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def process_legacy_issues_for_ineligible_to_eligible!(request_issue, parser_issu
end

def reset_or_create_legacy_issue!(legacy_issue, request_issue)
if legacy_issue && optin?(@review) && request_issue.ineligible_reason.blank?
if legacy_issue && optin? && request_issue.ineligible_reason.blank?
legacy_issue.legacy_issue_optin.update!(
optin_processed_at: nil,
rollback_processed_at: nil,
Expand All @@ -206,7 +206,7 @@ def reset_or_create_legacy_issue!(legacy_issue, request_issue)
legacy_issue = create_legacy_issue_backfill(request_issue)

# LegacyIssueOptin
if optin?(@review) && request_issue.ineligible_reason.blank?
if optin? && request_issue.ineligible_reason.blank?
create_legacy_optin_backfill(request_issue, legacy_issue)
end
end
Expand Down Expand Up @@ -323,7 +323,7 @@ def create_request_issue_backfill
legacy_issue = create_legacy_issue_backfill(ri)

# LegacyIssueOptin
if optin?(@review) && ri.ineligible_reason.blank?
if optin? && ri.ineligible_reason.blank?
create_legacy_optin_backfill(ri, legacy_issue)
end
end
Expand All @@ -337,8 +337,8 @@ def vacols_ids_exist?(request_issue)
request_issue.vacols_id.present? && request_issue.vacols_sequence_id.present?
end

def optin?(decision_review)
decision_review.legacy_opt_in_approved?
def optin?
ActiveModel::Type::Boolean.new.cast(@parser.claim_review_legacy_opt_in_approved)
end

def create_legacy_issue_backfill(request_issue)
Expand Down

0 comments on commit 0db802a

Please sign in to comment.