Skip to content

Commit

Permalink
Merge branch 'feature/APPEALS-59232' into ryanpmessner/APPEALS-59951
Browse files Browse the repository at this point in the history
  • Loading branch information
raymond-hughes authored Oct 25, 2024
2 parents 30c1366 + 264bfb9 commit 71b31dc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/models/events/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class Event < CaseflowRecord
store_accessor :info, :errored_claim_id

scope :with_errored_claim_id, -> { where.not("info -> 'errored_claim_id' IS NULL") }
scope :with_errored_participant_id, -> { where.not("info -> 'errored_participant_id' IS NULL") }

def completed?
completed_at?
Expand All @@ -17,6 +18,12 @@ def self.find_errors_by_claim_id(claim_id)
.pluck(:error)
end

def self.find_errors_by_participant_id(participant_id)
with_errored_claim_id
.where("info ->> 'errored_participant_id' = ?", participant_id)
.pluck(:error)
end

# Check if there's already a CF Event that references that Appeals-Consumer EventID and
# was successfully completed
def self.exists_and_is_completed?(consumer_event_id)
Expand Down
3 changes: 3 additions & 0 deletions app/models/events/person_updated_event.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# frozen_string_literal: true

# This class represents the PersonUpdatedEvent info that is POSTed to Caseflow
# Represents a single "event" and is tied to "event records" that contain info regarding
# the different objects that Caseflow performs backfill creations for after VBMS Intake.
class PersonUpdatedEvent < Event
end

0 comments on commit 71b31dc

Please sign in to comment.