Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Konstantin/appeals 45149 #21644

Merged
merged 19 commits into from
May 21, 2024
Merged

Conversation

KonstantinShevtsov
Copy link

@KonstantinShevtsov KonstantinShevtsov commented May 15, 2024

Resolves Jira Issue Title

Description

This PR adds additional attributes listed here in the request_issue_serializer.rb. This PR also updates RSPEC test for request_issue_serializer.rb, documentation in the app/controllers/api/docs/v3/ama_issues.yaml and in the Caseflow wiki.
31 linters offenses were fixed.

Acceptance Criteria

  • Code compiles correctly

Testing Plan

  1. Go to Jira Issue/Test Plan Link or list them below

Backend

Database Changes

Integrations: Adding endpoints for external APIs

  • Check that Caseflow's external API code for the endpoint matches the code in the relevant integration repo
    • Request: Service name, method name, input field names
    • Response: Check expected data structure

Best practices

Code Documentation Updates

  • Add or update code comments at the top of the class, module, and/or component.

Tests

Test Coverage

Did you include any test coverage for your code? Check below:

  • RSpec
  • Jira

Code Climate

Your code does not add any new code climate offenses? If so, why?

  • No new code climate issues added

@KonstantinShevtsov KonstantinShevtsov marked this pull request as draft May 15, 2024 13:28
Copy link
Contributor

@buddylove954 buddylove954 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great start and just requires some tweaking. We will need to also update this file: app/controllers/api/docs/v3/ama_issues.yaml with our updated serializer changes

@KonstantinShevtsov KonstantinShevtsov marked this pull request as ready for review May 17, 2024 14:20
@nkutub nkutub merged commit 9148093 into feature/APPEALS-28087-36678 May 21, 2024
16 of 17 checks passed
nkutub added a commit that referenced this pull request May 21, 2024
* APPEALS-36688- Build out Decision Review Created API route & Controller (#20569)

* added skeleton for api route

* removed duplicate code

* removed development envs for api and moved to creating an ApiKey

* removing any changes to development.rb

* removed extra auth code

* removed before action

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* APPEALS-38232 -Build out Decision Review Created Event Failure API route & Controller (#20601)

* APPEALS-38232 - renamed controller to AC req, added decision_review_created_error endpoint, added decision_review_created_error method, and added RSpec for new method

* APPEALS-38232 - add comments to RSpec

* Jonathan/appeals 36684 (#20516)

* initial Events migration and model creation

* created model for DecisionReviewCreatedEvent

* updated comment with example

* added spec for DRCE model

* APPEALS-36684 created event_records migration and added polymorphic associations to specific models, and added rspec for the event_record model

* APPEALS-36684 - Updated RSpec tests and updated variables and got unhappy path to pass

* cleaned lint

* saving DRCE spec changes

* fixed spec test

* changed has_many to has_one

* updated event model spec

* added validation for ER poly associations

* changed association to has_one

* added new method and updated tests

* added foreign key after running checks

* some PR comment changes

* refactored methods in EventConcern

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>
Co-authored-by: Enrilo Ugalde <ugalde_enrilo@bah.com>

* added migration, scopes and specs for events (#20707)

* fixed migration to update existing events table

* rollbacked to fix schema

* schema fixes

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* Jr/APPEALS-38926  (#20714)

* APPEALS-38926 - Created DecisionReviewCreatedError Service Class, added logic for handling service error, updated DecisonReviewCreatedController, and DecisionReviewCreatedController spec, with the updated service logic

* APPEALS-38926- created RSpec Test for DecisionReviewCreatedError Service Class and edited the Rails.logger for the service class

* APPEALS-38926 Added new info column to update transaction and added it to the RSpec test

* APPEALS-38926 - added comments to the Service Class

* APPEALS-38926 - Code Changes from TL Code Review, added rescues and fails

* APPEALS-38926 - fixed lint

* Jonathan/appeals 36689 (#20671)

* created new service class

* add rspec test cases

* service class methods

* controller action and spec

* controller update

* CC fixes

* removed accidental line

* changed to find_or_create_by

* reworked error for redis lock

* additional rspec for controller

* fixed test

* rspec fix

* delete lock key afterwards

* moved Event creation back into lock block

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* APPEALS-39663 Create CreateUserOnEvent service class and add logic to create user if needed (#20838)

* added user creation class & test

* removed extra lines

* add comment to class

* added context for args from avro

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Jr/APPEALS-39664 (#20898)

* APPEALS-39664 - Created updated_vacols_on_optin module class, and removed  extra private

* APPEALS-39664 - created UpdatedVacolsOnOptin module, RSpec file, as well as sudo code for SOC and SSOC optin check in main service class DecisionReviewCreated

* APPEALS-39664 - Created RSpec Test - PASS,  Updated method name.

* APPEALS-39664 - Added Error Handling to Sub Service Class

* APPEALS-39664 - Removed un-needed comments

* APPEALS-39664 - added include for the module UpdateVacolsOnOptin inside decision_review_created service

* APPEALS-39664 - Added Custom Error , and updated all .perform! to .process!

* APPEALS-39664 - Updated RSpec Test to reflect changes - all pass

* Updated comment for decision_review_created Service Class

* Will/appeals 36691 (#20909)

* Created attribute for failed claims on event and displaying failed claim

* passing all failed events back to serializer

* added controller tests for failed_claims and added class method for finding claims on events

* renamed failed_claims to claim_errors

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* JR/APPEALS-40954 Create CreateIntake service class and add logic to create Intake (#20967)

* APPEALS-40954 - Added Sudo Code for CreateIntake Logic

* APPEALS-40954 - added logic to CreateIntake module

* APPEALS-40954 - added Create Intake spec  with error handling - All pass

* APPEALS-40954 - Added CreateIntake Module to DecisionReviewCreated Main Service

* APPEALS-40954 - updated folder name and namespace

* APPEALS-40954 - Updated RSpec to match folder

* APPEALS-40954- Upated decision review created servie include to match folder

* Fixed failing test due to folder structure change

* Jonathan/appeals 40950 (#20965)

* Added new veteran creation module

* saving test changes

* rspec

* fixed datetime assign

* renamed var

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* APPEALS-40950 - update var veteran to vbms_veteran (#21050)

* APPEALS-40950 - update var veteran to vbms_veteran

* updated private method in controller to match happy path params dcr to drc

* Create CreateClaimantOnEvent service class and add logic to create claimant if needed (#21044)

* created service class and basic unit tests

* added conditionals for veteran claimants and will create veteran claimant now

* modified create claimant to use eventing data

* change to a class

* creating claimant correctly

* test fixes

* removed old comments

* fixed type for veteran_is_not_claimant

* changed specs to match pulling out hash params and removed event.reference id

* moved back to dot notation

* updated comments

* fixed create claimant issue

* updated process to use bang method and returning claimant

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* APPEALS-41968 Modify Issues Endpoints & Update Metric Service Logic (#21108)

* moved metricsService call to top of method

* modified rspec case

* moved metric logging spec case higher up

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Resolved merge conflicts while merging master into feature/APPEALS-28… (#21167)

* Jonathan/APPEALS-41957 (#21171)

* added interface + parser class

* edited veteran parse methods

* renamed var to "payload"

* started refactor

* more refactor + rspec

* added EPE attr

* dateTime conversions

* added class comments

* rubocop lint changes

* fixed test case

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Jr/appeals 41931 (#21192)

* APPEALS-41931 - Created create_ep_establishment file and class

* APPEALS-41931 - added process! method that creates epe from payload

* APPEALS-41931 - added logic for EventRecord being created and error handling

* APPEALS-41931 - added comments to process method

* APPEALS-41931 - set up rspec test

* APPEALS-41931 - removed lint

* APPEALS-41931-created Rspec and Test Pass

* APPEALS-41931 - cleaned lint and added error test 100% code coverage

* APPEALS-41931- fixed lint

* APPEALS-41931- fixed lint and fixed %100 code cov

* APPEALS-41931 - cleaned up lint and warn for Service Class

* APPEALS-41931 - Added CreateEpEstablishment.process! to the decision_review_created Parent Service Class

* APPEALS-41931 - refactor code to implement new parser

* fixed linting issues

* APPEALS-41931 - Updated Comments for CreateEpEstablishment

* APPEALS-41931 - moved logical date int to parser and refactored code in Class and RSepc

* edits

* Will/appeals 41929 (#21205)

* added an error and commented out call for createclaim

* added new parser logic

* merge request changes

* fixed rubocop issues and added checks for claim review attributes

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* APPEALS-42631- Create Rspec for Parser with sample payload method, and add additional parser methods  (#21294)

* APPEALS-42631 - create example.json

* APPEALS-42631 - implemented example_response and load_example method and works as expected

* APPEALS-42631 - created RSpec for DecisionReviewCreatedParser

* APPEALS-42631 - Refactored parser and Added RSpec for current praser

* APPEALS-42631 - added methods to parser for intake, claimant, and claim_review and added matching rspec for new methods

* APPEALS-42631 - updated code per TL Comments

* APPEALS-421631- added additional comments and fixing lint

* APPEALS-41934 (#21251)

* initial commit

* implementation & error

* renamed method

* rspec

* saving refactor progress

* finished refactoring class

* added comment

* minor parser/rspec updates

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* added RI parser methods to rspec (#21322)

* added RI parser methods to rspec

* updated config for Consumer

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Update DecisionReviewCreated to make all calls and link all intake records (#21334)

* updated decision review created to uncomment actions and updated specs

* remove binding.pry

* removed comments

* fixed a bunch of broken tests

* fixed last broken tests

* fixed params for methods and specs

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* APPEALS-43446- Change name of BackfillRecord polymorphic model to EventedRecord (#21382)

* APPEALS-43446 - renamed columns for backfill record to evented record migrate and rollback work as intended

* APPEALS-43446 replaced all backfill_record with evented_record within the models associations and updated Rspec tests

* APPEALS-43446 fixed error message

* Jr/ama controller refactor (#21365)

* fixed test and refactored controller

* saving changes

* init commit passing all the way to request_issues

* all pass and functions as expected

* lint

* lint

* updated initializer to use deep_symbolize_keys

* updated headers to be more dry

* added missing Intake attributes

* fixed failing tests

* updated createIntake test

* fixed veteran rspec

* fixed RI test

* APPEALS-43446- Change name of BackfillRecord polymorphic model to EventedRecord (#21382)

* APPEALS-43446 - renamed columns for backfill record to evented record migrate and rollback work as intended

* APPEALS-43446 replaced all backfill_record with evented_record within the models associations and updated Rspec tests

* APPEALS-43446 fixed error message

* updated intake

* modified intake

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* redo init commit

* updated imp. logic

* attorney widget fix

* Create end to end , happy path rspec's for Decision Created event Feature (#21395)

* updated more tests and fixed user creation

* added in person creation

* corrected headers and fixed broken tests

* added type

* fixed failing spec

* creating event when person is created

* updated spec to account for both events being created

* ignored long lines for spec file

* linting fixes

* fixed more linting errors/ ignored long lines

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* Jonathan/appeals 43589 (#21397)

* saving

* saving user class error progress

* error handling for user creation

* updated error handling/raises

* validator methods

* validations

* update logical date converter

* changed veteran service class to use file_number

* added fields to hlr

* updated epe data

* removed byebug

* fixed typos

* Edit 5: adding detail_id to Intake

* EDIT 6: add claimant_participant_id to epe

* Edit 8: Intake is correctly linked to veteran

* Edit 7: RI additions

* fixed spacing

* fixed typo

* saving rspec changes

* rspec updates

* added datetime conversion for person dob

* fixed rspec

* remove unused methods

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* feature/APPEALS-35707-29633-29632 (uat) (#21435)

* 🔀 Squash merge AlecK/APPEALS-35707 - Replace `database_cleaner` with `database_cleaner-active_record`

* 🔀 Squash merge jcroteau/APPEALS-29632-fix-deprecation-action-view-base-instances

* 🔀 Squash merge jcroteau/APPEALS-29633-fix-deprecation-warning-active_record-result-to_hash

* awillis/APPEALS-45152 (#21506)

* APPEALS-45152 Updated the logic in create_claimant_on_event.rb to always generate a claimant record.  Updated RSPEC.

* APPEALS-45152 Cleaned up RSPEC.

* APPEALS-45152 Fixed Failing RSPEC within decision_review_created_spec.rb

* APPEALS-45152 Updated RSPEC within decision_review_created_spec.rb with addtional checks.

* APPEALS-44319 (#21449) (#21541)

* added logic for legacy issues in DRC

* more legacy logic

* updated rspec context lang

* error cov

---------

Co-authored-by: Jonathan Tsang <98970951+jtsangVA@users.noreply.github.com>
Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Konstantin/APPEALS-45175 (#21517)

* logical_date_converter re-written to work with yyyymmdd numbers from json payload

* comments removed

* comments removed2

* method rewitten

* json example fixed

* date in scenario_b_spec.rb replaced by valid ones, additional check for empty string parameter added to the logical_date_converter

* removed filter for non rating request issue dropdown (#21480)

* removed filter for non rating request issue dropdown

* removed excluded types as we don't need to check this anymore

* fixed broken test

* added category back

* no longer need test to check for missing categories since we're returning them all.

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* Column added to RequestIssues table (#21578)

* added migration and simple spec to test

* fixed schema deleted issues

* updated spec to verify data being set

* error was no longer trigger from update. removed check and passed in correct variable

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>
Co-authored-by: TuckerRose <tuckerrose@TuckerRoses-MacBook-Pro.local>

* added bgs_source to parser, controller and serializer along with specs (#21621)

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* Konstantin/appeals 45180 (#21591)

* bug is fixed, condition added to DecisionReviewCreatedController

* rspec test added

* json message updated

* comment added

* Update decision_review_created_controller.rb

comment updated

---------

Co-authored-by: Nader Kutub <nader.kutub@va.gov>

* Konstantin/appeals 45149 (#21644)

* RequestIssueSerializer attributes added

* development_item_reference_id, same_office, legacy_opt_in_approved attributes were added

* merge conflicts resolved

* merge conflict resolved

* fixed

* all datapoints were added

* empty line removed

* comment removed

* refactored

* app/controllers/api/docs/v3/ama_issues.yaml updated with new attributes

* example of request issue updated app/controllers/api/docs/v3/ama_issues.yaml

* null to nil edited in example ama_issues.yaml

* example ama_issues.yaml updated

* example ama_issues.yaml updated2

* linters fixed

* linters fixed2

* linters are fixed

---------

Co-authored-by: Will Love <wlove29@gmail.com>
Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>
Co-authored-by: Enrilo Ugalde <71367882+Jruuuu@users.noreply.github.com>
Co-authored-by: Jonathan Tsang <98970951+jtsangVA@users.noreply.github.com>
Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>
Co-authored-by: Enrilo Ugalde <ugalde_enrilo@bah.com>
Co-authored-by: isaiahsaucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: Craig Reese <Reese_Craig@bah.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: (Jeffrey) Aaron Willis <98484567+Aaron-Willis@users.noreply.github.com>
Co-authored-by: Konstantin Shevtsov <166068160+KonstantinShevtsov@users.noreply.github.com>
Co-authored-by: TuckerRose <tuckerrose@TuckerRoses-MacBook-Pro.local>
nkutub added a commit that referenced this pull request May 31, 2024
* APPEALS-36688- Build out Decision Review Created API route & Controller (#20569)

* added skeleton for api route

* removed duplicate code

* removed development envs for api and moved to creating an ApiKey

* removing any changes to development.rb

* removed extra auth code

* removed before action

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* APPEALS-38232 -Build out Decision Review Created Event Failure API route & Controller (#20601)

* APPEALS-38232 - renamed controller to AC req, added decision_review_created_error endpoint, added decision_review_created_error method, and added RSpec for new method

* APPEALS-38232 - add comments to RSpec

* Jonathan/appeals 36684 (#20516)

* initial Events migration and model creation

* created model for DecisionReviewCreatedEvent

* updated comment with example

* added spec for DRCE model

* APPEALS-36684 created event_records migration and added polymorphic associations to specific models, and added rspec for the event_record model

* APPEALS-36684 - Updated RSpec tests and updated variables and got unhappy path to pass

* cleaned lint

* saving DRCE spec changes

* fixed spec test

* changed has_many to has_one

* updated event model spec

* added validation for ER poly associations

* changed association to has_one

* added new method and updated tests

* added foreign key after running checks

* some PR comment changes

* refactored methods in EventConcern

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>
Co-authored-by: Enrilo Ugalde <ugalde_enrilo@bah.com>

* added migration, scopes and specs for events (#20707)

* fixed migration to update existing events table

* rollbacked to fix schema

* schema fixes

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* Jr/APPEALS-38926  (#20714)

* APPEALS-38926 - Created DecisionReviewCreatedError Service Class, added logic for handling service error, updated DecisonReviewCreatedController, and DecisionReviewCreatedController spec, with the updated service logic

* APPEALS-38926- created RSpec Test for DecisionReviewCreatedError Service Class and edited the Rails.logger for the service class

* APPEALS-38926 Added new info column to update transaction and added it to the RSpec test

* APPEALS-38926 - added comments to the Service Class

* APPEALS-38926 - Code Changes from TL Code Review, added rescues and fails

* APPEALS-38926 - fixed lint

* Jonathan/appeals 36689 (#20671)

* created new service class

* add rspec test cases

* service class methods

* controller action and spec

* controller update

* CC fixes

* removed accidental line

* changed to find_or_create_by

* reworked error for redis lock

* additional rspec for controller

* fixed test

* rspec fix

* delete lock key afterwards

* moved Event creation back into lock block

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* APPEALS-39663 Create CreateUserOnEvent service class and add logic to create user if needed (#20838)

* added user creation class & test

* removed extra lines

* add comment to class

* added context for args from avro

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Jr/APPEALS-39664 (#20898)

* APPEALS-39664 - Created updated_vacols_on_optin module class, and removed  extra private

* APPEALS-39664 - created UpdatedVacolsOnOptin module, RSpec file, as well as sudo code for SOC and SSOC optin check in main service class DecisionReviewCreated

* APPEALS-39664 - Created RSpec Test - PASS,  Updated method name.

* APPEALS-39664 - Added Error Handling to Sub Service Class

* APPEALS-39664 - Removed un-needed comments

* APPEALS-39664 - added include for the module UpdateVacolsOnOptin inside decision_review_created service

* APPEALS-39664 - Added Custom Error , and updated all .perform! to .process!

* APPEALS-39664 - Updated RSpec Test to reflect changes - all pass

* Updated comment for decision_review_created Service Class

* Will/appeals 36691 (#20909)

* Created attribute for failed claims on event and displaying failed claim

* passing all failed events back to serializer

* added controller tests for failed_claims and added class method for finding claims on events

* renamed failed_claims to claim_errors

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* JR/APPEALS-40954 Create CreateIntake service class and add logic to create Intake (#20967)

* APPEALS-40954 - Added Sudo Code for CreateIntake Logic

* APPEALS-40954 - added logic to CreateIntake module

* APPEALS-40954 - added Create Intake spec  with error handling - All pass

* APPEALS-40954 - Added CreateIntake Module to DecisionReviewCreated Main Service

* APPEALS-40954 - updated folder name and namespace

* APPEALS-40954 - Updated RSpec to match folder

* APPEALS-40954- Upated decision review created servie include to match folder

* Fixed failing test due to folder structure change

* Jonathan/appeals 40950 (#20965)

* Added new veteran creation module

* saving test changes

* rspec

* fixed datetime assign

* renamed var

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* APPEALS-40950 - update var veteran to vbms_veteran (#21050)

* APPEALS-40950 - update var veteran to vbms_veteran

* updated private method in controller to match happy path params dcr to drc

* Create CreateClaimantOnEvent service class and add logic to create claimant if needed (#21044)

* created service class and basic unit tests

* added conditionals for veteran claimants and will create veteran claimant now

* modified create claimant to use eventing data

* change to a class

* creating claimant correctly

* test fixes

* removed old comments

* fixed type for veteran_is_not_claimant

* changed specs to match pulling out hash params and removed event.reference id

* moved back to dot notation

* updated comments

* fixed create claimant issue

* updated process to use bang method and returning claimant

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* APPEALS-41968 Modify Issues Endpoints & Update Metric Service Logic (#21108)

* moved metricsService call to top of method

* modified rspec case

* moved metric logging spec case higher up

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Resolved merge conflicts while merging master into feature/APPEALS-28… (#21167)

* Jonathan/APPEALS-41957 (#21171)

* added interface + parser class

* edited veteran parse methods

* renamed var to "payload"

* started refactor

* more refactor + rspec

* added EPE attr

* dateTime conversions

* added class comments

* rubocop lint changes

* fixed test case

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Jr/appeals 41931 (#21192)

* APPEALS-41931 - Created create_ep_establishment file and class

* APPEALS-41931 - added process! method that creates epe from payload

* APPEALS-41931 - added logic for EventRecord being created and error handling

* APPEALS-41931 - added comments to process method

* APPEALS-41931 - set up rspec test

* APPEALS-41931 - removed lint

* APPEALS-41931-created Rspec and Test Pass

* APPEALS-41931 - cleaned lint and added error test 100% code coverage

* APPEALS-41931- fixed lint

* APPEALS-41931- fixed lint and fixed %100 code cov

* APPEALS-41931 - cleaned up lint and warn for Service Class

* APPEALS-41931 - Added CreateEpEstablishment.process! to the decision_review_created Parent Service Class

* APPEALS-41931 - refactor code to implement new parser

* fixed linting issues

* APPEALS-41931 - Updated Comments for CreateEpEstablishment

* APPEALS-41931 - moved logical date int to parser and refactored code in Class and RSepc

* edits

* Will/appeals 41929 (#21205)

* added an error and commented out call for createclaim

* added new parser logic

* merge request changes

* fixed rubocop issues and added checks for claim review attributes

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* APPEALS-42631- Create Rspec for Parser with sample payload method, and add additional parser methods  (#21294)

* APPEALS-42631 - create example.json

* APPEALS-42631 - implemented example_response and load_example method and works as expected

* APPEALS-42631 - created RSpec for DecisionReviewCreatedParser

* APPEALS-42631 - Refactored parser and Added RSpec for current praser

* APPEALS-42631 - added methods to parser for intake, claimant, and claim_review and added matching rspec for new methods

* APPEALS-42631 - updated code per TL Comments

* APPEALS-421631- added additional comments and fixing lint

* APPEALS-41934 (#21251)

* initial commit

* implementation & error

* renamed method

* rspec

* saving refactor progress

* finished refactoring class

* added comment

* minor parser/rspec updates

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* added RI parser methods to rspec (#21322)

* added RI parser methods to rspec

* updated config for Consumer

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Update DecisionReviewCreated to make all calls and link all intake records (#21334)

* updated decision review created to uncomment actions and updated specs

* remove binding.pry

* removed comments

* fixed a bunch of broken tests

* fixed last broken tests

* fixed params for methods and specs

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* APPEALS-43446- Change name of BackfillRecord polymorphic model to EventedRecord (#21382)

* APPEALS-43446 - renamed columns for backfill record to evented record migrate and rollback work as intended

* APPEALS-43446 replaced all backfill_record with evented_record within the models associations and updated Rspec tests

* APPEALS-43446 fixed error message

* Jr/ama controller refactor (#21365)

* fixed test and refactored controller

* saving changes

* init commit passing all the way to request_issues

* all pass and functions as expected

* lint

* lint

* updated initializer to use deep_symbolize_keys

* updated headers to be more dry

* added missing Intake attributes

* fixed failing tests

* updated createIntake test

* fixed veteran rspec

* fixed RI test

* APPEALS-43446- Change name of BackfillRecord polymorphic model to EventedRecord (#21382)

* APPEALS-43446 - renamed columns for backfill record to evented record migrate and rollback work as intended

* APPEALS-43446 replaced all backfill_record with evented_record within the models associations and updated Rspec tests

* APPEALS-43446 fixed error message

* updated intake

* modified intake

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* redo init commit

* updated imp. logic

* attorney widget fix

* Create end to end , happy path rspec's for Decision Created event Feature (#21395)

* updated more tests and fixed user creation

* added in person creation

* corrected headers and fixed broken tests

* added type

* fixed failing spec

* creating event when person is created

* updated spec to account for both events being created

* ignored long lines for spec file

* linting fixes

* fixed more linting errors/ ignored long lines

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* Jonathan/appeals 43589 (#21397)

* saving

* saving user class error progress

* error handling for user creation

* updated error handling/raises

* validator methods

* validations

* update logical date converter

* changed veteran service class to use file_number

* added fields to hlr

* updated epe data

* removed byebug

* fixed typos

* Edit 5: adding detail_id to Intake

* EDIT 6: add claimant_participant_id to epe

* Edit 8: Intake is correctly linked to veteran

* Edit 7: RI additions

* fixed spacing

* fixed typo

* saving rspec changes

* rspec updates

* added datetime conversion for person dob

* fixed rspec

* remove unused methods

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* feature/APPEALS-35707-29633-29632 (uat) (#21435)

* 🔀 Squash merge AlecK/APPEALS-35707 - Replace `database_cleaner` with `database_cleaner-active_record`

* 🔀 Squash merge jcroteau/APPEALS-29632-fix-deprecation-action-view-base-instances

* 🔀 Squash merge jcroteau/APPEALS-29633-fix-deprecation-warning-active_record-result-to_hash

* awillis/APPEALS-45152 (#21506)

* APPEALS-45152 Updated the logic in create_claimant_on_event.rb to always generate a claimant record.  Updated RSPEC.

* APPEALS-45152 Cleaned up RSPEC.

* APPEALS-45152 Fixed Failing RSPEC within decision_review_created_spec.rb

* APPEALS-45152 Updated RSPEC within decision_review_created_spec.rb with addtional checks.

* APPEALS-44319 (#21449) (#21541)

* added logic for legacy issues in DRC

* more legacy logic

* updated rspec context lang

* error cov

---------

Co-authored-by: Jonathan Tsang <98970951+jtsangVA@users.noreply.github.com>
Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Konstantin/APPEALS-45175 (#21517)

* logical_date_converter re-written to work with yyyymmdd numbers from json payload

* comments removed

* comments removed2

* method rewitten

* json example fixed

* date in scenario_b_spec.rb replaced by valid ones, additional check for empty string parameter added to the logical_date_converter

* removed filter for non rating request issue dropdown (#21480)

* removed filter for non rating request issue dropdown

* removed excluded types as we don't need to check this anymore

* fixed broken test

* added category back

* no longer need test to check for missing categories since we're returning them all.

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* Column added to RequestIssues table (#21578)

* added migration and simple spec to test

* fixed schema deleted issues

* updated spec to verify data being set

* error was no longer trigger from update. removed check and passed in correct variable

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>
Co-authored-by: TuckerRose <tuckerrose@TuckerRoses-MacBook-Pro.local>

* added bgs_source to parser, controller and serializer along with specs (#21621)

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* Konstantin/appeals 45180 (#21591)

* bug is fixed, condition added to DecisionReviewCreatedController

* rspec test added

* json message updated

* comment added

* Update decision_review_created_controller.rb

comment updated

---------

Co-authored-by: Nader Kutub <nader.kutub@va.gov>

* Konstantin/appeals 45149 (#21644)

* RequestIssueSerializer attributes added

* development_item_reference_id, same_office, legacy_opt_in_approved attributes were added

* merge conflicts resolved

* merge conflict resolved

* fixed

* all datapoints were added

* empty line removed

* comment removed

* refactored

* app/controllers/api/docs/v3/ama_issues.yaml updated with new attributes

* example of request issue updated app/controllers/api/docs/v3/ama_issues.yaml

* null to nil edited in example ama_issues.yaml

* example ama_issues.yaml updated

* example ama_issues.yaml updated2

* linters fixed

* linters fixed2

* linters are fixed

* added conditional to throw different errors based on consumer event id

* fixed linting error

* Feature/appeals 46208.rc (#21746)

* Added Assignment Queue link to Switch Users test page

* Updated controller to validate role and redirect

* Updated error information

* Updated rspec tests

* Ricky/appeals-43523 (#21345)

* Added Assignment Queue link to Switch Users test page

* Updated controller to validate role and redirect

* Updated error information

* Updated rspec tests

* Added Download Ineligible Judge List

* APPEALS-43116 add sentry error capture to push priority job and updated specs (#21369)

* Updated query to include css_id and updated id fetch

* Updates button styling, fixed csv to have all values but judge name

* Updated id to sattyid values, and added name data to column

* fixed linting error

* Updated logic to account for inactive users in both caseflow and vacols

* Updated button component and cleaned up code

* Updated handling of ids in situation where sattyid is unavailable in record

* Updated to have individual columns for caseflow id and satty id

* APPEALS-43117 Add QA Users for testing (#21580)

* APPEALS-43117 Add QA Users for testing

* Fix rspecs

---------

Co-authored-by: Christopher Detlef <>

* APPEALS-42266 Remove CaseDistributionLevers seed config in Rails helper and update required spec files

* APPEALS-42266 fixing a couple of linting issues

* APPEALS-43523 reverted the legacy tasks controller (#21713)

* APPEALS-43523 reverted the legacy tasks controller

* APPEALS-43523 reverted the erorrs concern too

* Update legacy_tasks_controller_spec.rb

* reverted raven call

* APPEALS-46208 fixed code climate warning about a bad naming convention.

* APPEALS-46208 fixed indentation

---------

Co-authored-by: 631068 <rickybmanus@gmail.com>
Co-authored-by: Blake Manus <33578594+Blake-Manus@users.noreply.github.com>
Co-authored-by: kristeja <112115264+kristeja@users.noreply.github.com>
Co-authored-by: cdetlefva <133903625+cdetlefva@users.noreply.github.com>
Co-authored-by: kristeja <krishnateja.golla@va.gov>

* APPEALS-44148: Add ruby CE API Gem (#21520)

* hotfix/APPEALS-46182 (#21709)

* Added tests and added logic to account for sct distribution

* Added more tests and changed logic

* Adding comments

* Fixing logic for SCT

* Update test and logic

* Fixing tests

* Update docket switch mail task to match corrected logic

* Fixing logic

* Cleaning up refactor

* Worked with the amazing ALex and we figured it out!

* Fixing linting issue

* Fix linting issues

* Skipping flaky tests

* Skipping another flaky test

---------

Co-authored-by: Alexandra Ferencz <ferencz_alexandra@bah.com>
Co-authored-by: raymond-hughes <raymond.hughes2@va.gov>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>

* MattT/APPEALS-46383: Upgrade aws-sdk gem to v3.2 (#21748)

* Upgrade aws-sdk gem to v3.2

* Update caseflow-commons hash

* Apply new hash update

* Skip flaky test

---------

Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>

* Update gemfile and gemfile.lock to point to new bgs version (#21749)

* Update gemfile and gemfile.lock to point to new bgs version

* Skipping flake specs in review_spec.rb file

* Revert "APPEALS-44148: Add ruby CE API Gem (#21520)" (#21762)

This reverts commit 3a393d1.

* Update ruby-bgs gemfile and gemfile.lock to new version (#21761)

* Update MAC_INTEL.md

Update Oracle client link

* fix linting error

---------

Co-authored-by: Will Love <wlove29@gmail.com>
Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>
Co-authored-by: Enrilo Ugalde <71367882+Jruuuu@users.noreply.github.com>
Co-authored-by: Jonathan Tsang <98970951+jtsangVA@users.noreply.github.com>
Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>
Co-authored-by: Enrilo Ugalde <ugalde_enrilo@bah.com>
Co-authored-by: isaiahsaucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: Craig Reese <Reese_Craig@bah.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: (Jeffrey) Aaron Willis <98484567+Aaron-Willis@users.noreply.github.com>
Co-authored-by: Konstantin Shevtsov <166068160+KonstantinShevtsov@users.noreply.github.com>
Co-authored-by: TuckerRose <tuckerrose@TuckerRoses-MacBook-Pro.local>
Co-authored-by: Eli Brown <elilogbro@gmail.com>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>
Co-authored-by: 631068 <rickybmanus@gmail.com>
Co-authored-by: Blake Manus <33578594+Blake-Manus@users.noreply.github.com>
Co-authored-by: kristeja <112115264+kristeja@users.noreply.github.com>
Co-authored-by: cdetlefva <133903625+cdetlefva@users.noreply.github.com>
Co-authored-by: kristeja <krishnateja.golla@va.gov>
Co-authored-by: youfoundmanesh <129548081+youfoundmanesh@users.noreply.github.com>
Co-authored-by: Alex Ferencz VA <156860944+aferencz1987VA@users.noreply.github.com>
Co-authored-by: Alexandra Ferencz <ferencz_alexandra@bah.com>
Co-authored-by: raymond-hughes <raymond.hughes2@va.gov>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>
Co-authored-by: Matthew Thornton <99351305+ThorntonMatthew@users.noreply.github.com>
Co-authored-by: Matthew Thornton <ThorntonMatthew@users.noreply.github.com>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: Alec Spottswood <ajspottswood@gmail.com>
nkutub added a commit that referenced this pull request May 31, 2024
* APPEALS-36688- Build out Decision Review Created API route & Controller (#20569)

* added skeleton for api route

* removed duplicate code

* removed development envs for api and moved to creating an ApiKey

* removing any changes to development.rb

* removed extra auth code

* removed before action

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* APPEALS-38232 -Build out Decision Review Created Event Failure API route & Controller (#20601)

* APPEALS-38232 - renamed controller to AC req, added decision_review_created_error endpoint, added decision_review_created_error method, and added RSpec for new method

* APPEALS-38232 - add comments to RSpec

* Jonathan/appeals 36684 (#20516)

* initial Events migration and model creation

* created model for DecisionReviewCreatedEvent

* updated comment with example

* added spec for DRCE model

* APPEALS-36684 created event_records migration and added polymorphic associations to specific models, and added rspec for the event_record model

* APPEALS-36684 - Updated RSpec tests and updated variables and got unhappy path to pass

* cleaned lint

* saving DRCE spec changes

* fixed spec test

* changed has_many to has_one

* updated event model spec

* added validation for ER poly associations

* changed association to has_one

* added new method and updated tests

* added foreign key after running checks

* some PR comment changes

* refactored methods in EventConcern

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>
Co-authored-by: Enrilo Ugalde <ugalde_enrilo@bah.com>

* added migration, scopes and specs for events (#20707)

* fixed migration to update existing events table

* rollbacked to fix schema

* schema fixes

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* Jr/APPEALS-38926  (#20714)

* APPEALS-38926 - Created DecisionReviewCreatedError Service Class, added logic for handling service error, updated DecisonReviewCreatedController, and DecisionReviewCreatedController spec, with the updated service logic

* APPEALS-38926- created RSpec Test for DecisionReviewCreatedError Service Class and edited the Rails.logger for the service class

* APPEALS-38926 Added new info column to update transaction and added it to the RSpec test

* APPEALS-38926 - added comments to the Service Class

* APPEALS-38926 - Code Changes from TL Code Review, added rescues and fails

* APPEALS-38926 - fixed lint

* Jonathan/appeals 36689 (#20671)

* created new service class

* add rspec test cases

* service class methods

* controller action and spec

* controller update

* CC fixes

* removed accidental line

* changed to find_or_create_by

* reworked error for redis lock

* additional rspec for controller

* fixed test

* rspec fix

* delete lock key afterwards

* moved Event creation back into lock block

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* APPEALS-39663 Create CreateUserOnEvent service class and add logic to create user if needed (#20838)

* added user creation class & test

* removed extra lines

* add comment to class

* added context for args from avro

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Jr/APPEALS-39664 (#20898)

* APPEALS-39664 - Created updated_vacols_on_optin module class, and removed  extra private

* APPEALS-39664 - created UpdatedVacolsOnOptin module, RSpec file, as well as sudo code for SOC and SSOC optin check in main service class DecisionReviewCreated

* APPEALS-39664 - Created RSpec Test - PASS,  Updated method name.

* APPEALS-39664 - Added Error Handling to Sub Service Class

* APPEALS-39664 - Removed un-needed comments

* APPEALS-39664 - added include for the module UpdateVacolsOnOptin inside decision_review_created service

* APPEALS-39664 - Added Custom Error , and updated all .perform! to .process!

* APPEALS-39664 - Updated RSpec Test to reflect changes - all pass

* Updated comment for decision_review_created Service Class

* Will/appeals 36691 (#20909)

* Created attribute for failed claims on event and displaying failed claim

* passing all failed events back to serializer

* added controller tests for failed_claims and added class method for finding claims on events

* renamed failed_claims to claim_errors

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* JR/APPEALS-40954 Create CreateIntake service class and add logic to create Intake (#20967)

* APPEALS-40954 - Added Sudo Code for CreateIntake Logic

* APPEALS-40954 - added logic to CreateIntake module

* APPEALS-40954 - added Create Intake spec  with error handling - All pass

* APPEALS-40954 - Added CreateIntake Module to DecisionReviewCreated Main Service

* APPEALS-40954 - updated folder name and namespace

* APPEALS-40954 - Updated RSpec to match folder

* APPEALS-40954- Upated decision review created servie include to match folder

* Fixed failing test due to folder structure change

* Jonathan/appeals 40950 (#20965)

* Added new veteran creation module

* saving test changes

* rspec

* fixed datetime assign

* renamed var

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* APPEALS-40950 - update var veteran to vbms_veteran (#21050)

* APPEALS-40950 - update var veteran to vbms_veteran

* updated private method in controller to match happy path params dcr to drc

* Create CreateClaimantOnEvent service class and add logic to create claimant if needed (#21044)

* created service class and basic unit tests

* added conditionals for veteran claimants and will create veteran claimant now

* modified create claimant to use eventing data

* change to a class

* creating claimant correctly

* test fixes

* removed old comments

* fixed type for veteran_is_not_claimant

* changed specs to match pulling out hash params and removed event.reference id

* moved back to dot notation

* updated comments

* fixed create claimant issue

* updated process to use bang method and returning claimant

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* APPEALS-41968 Modify Issues Endpoints & Update Metric Service Logic (#21108)

* moved metricsService call to top of method

* modified rspec case

* moved metric logging spec case higher up

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Resolved merge conflicts while merging master into feature/APPEALS-28… (#21167)

* Jonathan/APPEALS-41957 (#21171)

* added interface + parser class

* edited veteran parse methods

* renamed var to "payload"

* started refactor

* more refactor + rspec

* added EPE attr

* dateTime conversions

* added class comments

* rubocop lint changes

* fixed test case

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Jr/appeals 41931 (#21192)

* APPEALS-41931 - Created create_ep_establishment file and class

* APPEALS-41931 - added process! method that creates epe from payload

* APPEALS-41931 - added logic for EventRecord being created and error handling

* APPEALS-41931 - added comments to process method

* APPEALS-41931 - set up rspec test

* APPEALS-41931 - removed lint

* APPEALS-41931-created Rspec and Test Pass

* APPEALS-41931 - cleaned lint and added error test 100% code coverage

* APPEALS-41931- fixed lint

* APPEALS-41931- fixed lint and fixed %100 code cov

* APPEALS-41931 - cleaned up lint and warn for Service Class

* APPEALS-41931 - Added CreateEpEstablishment.process! to the decision_review_created Parent Service Class

* APPEALS-41931 - refactor code to implement new parser

* fixed linting issues

* APPEALS-41931 - Updated Comments for CreateEpEstablishment

* APPEALS-41931 - moved logical date int to parser and refactored code in Class and RSepc

* edits

* Will/appeals 41929 (#21205)

* added an error and commented out call for createclaim

* added new parser logic

* merge request changes

* fixed rubocop issues and added checks for claim review attributes

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* APPEALS-42631- Create Rspec for Parser with sample payload method, and add additional parser methods  (#21294)

* APPEALS-42631 - create example.json

* APPEALS-42631 - implemented example_response and load_example method and works as expected

* APPEALS-42631 - created RSpec for DecisionReviewCreatedParser

* APPEALS-42631 - Refactored parser and Added RSpec for current praser

* APPEALS-42631 - added methods to parser for intake, claimant, and claim_review and added matching rspec for new methods

* APPEALS-42631 - updated code per TL Comments

* APPEALS-421631- added additional comments and fixing lint

* APPEALS-41934 (#21251)

* initial commit

* implementation & error

* renamed method

* rspec

* saving refactor progress

* finished refactoring class

* added comment

* minor parser/rspec updates

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* added RI parser methods to rspec (#21322)

* added RI parser methods to rspec

* updated config for Consumer

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Update DecisionReviewCreated to make all calls and link all intake records (#21334)

* updated decision review created to uncomment actions and updated specs

* remove binding.pry

* removed comments

* fixed a bunch of broken tests

* fixed last broken tests

* fixed params for methods and specs

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* APPEALS-43446- Change name of BackfillRecord polymorphic model to EventedRecord (#21382)

* APPEALS-43446 - renamed columns for backfill record to evented record migrate and rollback work as intended

* APPEALS-43446 replaced all backfill_record with evented_record within the models associations and updated Rspec tests

* APPEALS-43446 fixed error message

* Jr/ama controller refactor (#21365)

* fixed test and refactored controller

* saving changes

* init commit passing all the way to request_issues

* all pass and functions as expected

* lint

* lint

* updated initializer to use deep_symbolize_keys

* updated headers to be more dry

* added missing Intake attributes

* fixed failing tests

* updated createIntake test

* fixed veteran rspec

* fixed RI test

* APPEALS-43446- Change name of BackfillRecord polymorphic model to EventedRecord (#21382)

* APPEALS-43446 - renamed columns for backfill record to evented record migrate and rollback work as intended

* APPEALS-43446 replaced all backfill_record with evented_record within the models associations and updated Rspec tests

* APPEALS-43446 fixed error message

* updated intake

* modified intake

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* redo init commit

* updated imp. logic

* attorney widget fix

* Create end to end , happy path rspec's for Decision Created event Feature (#21395)

* updated more tests and fixed user creation

* added in person creation

* corrected headers and fixed broken tests

* added type

* fixed failing spec

* creating event when person is created

* updated spec to account for both events being created

* ignored long lines for spec file

* linting fixes

* fixed more linting errors/ ignored long lines

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* Jonathan/appeals 43589 (#21397)

* saving

* saving user class error progress

* error handling for user creation

* updated error handling/raises

* validator methods

* validations

* update logical date converter

* changed veteran service class to use file_number

* added fields to hlr

* updated epe data

* removed byebug

* fixed typos

* Edit 5: adding detail_id to Intake

* EDIT 6: add claimant_participant_id to epe

* Edit 8: Intake is correctly linked to veteran

* Edit 7: RI additions

* fixed spacing

* fixed typo

* saving rspec changes

* rspec updates

* added datetime conversion for person dob

* fixed rspec

* remove unused methods

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* feature/APPEALS-35707-29633-29632 (uat) (#21435)

* 🔀 Squash merge AlecK/APPEALS-35707 - Replace `database_cleaner` with `database_cleaner-active_record`

* 🔀 Squash merge jcroteau/APPEALS-29632-fix-deprecation-action-view-base-instances

* 🔀 Squash merge jcroteau/APPEALS-29633-fix-deprecation-warning-active_record-result-to_hash

* APPEALS-44956: Add AppealAffinity model and database table (#21526)

* add migration for appeal_affinities

* add AppealAffinity model and associations, update migration for new column

* update index to be unique

* add factory, add tests

* add factory traits to appeal and case for appeal affinities

* add combination trait to appeal factory

* add appeal_affinity to skipped associations in ETL reporting

* add a validation, test

* awillis/APPEALS-45152 (#21506)

* APPEALS-45152 Updated the logic in create_claimant_on_event.rb to always generate a claimant record.  Updated RSPEC.

* APPEALS-45152 Cleaned up RSPEC.

* APPEALS-45152 Fixed Failing RSPEC within decision_review_created_spec.rb

* APPEALS-45152 Updated RSPEC within decision_review_created_spec.rb with addtional checks.

* APPEALS-44319 (#21449) (#21541)

* added logic for legacy issues in DRC

* more legacy logic

* updated rspec context lang

* error cov

---------

Co-authored-by: Jonathan Tsang <98970951+jtsangVA@users.noreply.github.com>
Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Konstantin/APPEALS-45175 (#21517)

* logical_date_converter re-written to work with yyyymmdd numbers from json payload

* comments removed

* comments removed2

* method rewitten

* json example fixed

* date in scenario_b_spec.rb replaced by valid ones, additional check for empty string parameter added to the logical_date_converter

* removed filter for non rating request issue dropdown (#21480)

* removed filter for non rating request issue dropdown

* removed excluded types as we don't need to check this anymore

* fixed broken test

* added category back

* no longer need test to check for missing categories since we're returning them all.

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* Craig/appeals 44958 (#21564)

* add new job, update affinity model validation and after save hook

* add update from push job

* fix job extending distribution scopes

* add with appeal affinities to distribution scopes

* typo

* add error handling, add test file

* add distributed case factory, refactor naming in job

* fix factories, added tests

* fix migration for null affinity start date column

* fixes, added tests

* more test updates

* add return in job if no query results, tests for no query results

* add test for after_save hook adding dist task instructions

* set start dist job to queue affinity job after running

* fix update job and start dist job spec

* queue affinity update job from push job

* code clarity

* fix judge in seed file

* remove comment, fix hearing factory, disable some seeds for testing

* add more tests

* test refactor

* update appeals for dist query to add affinity start, add seed file, fix hearing factory, add stat to dist factory

* disable new seed on reset

* update seed file with vet names, add another seed category

* fix distirbuted case factory?

* actually fix GHA runs

* lint, test fixes

* change constants in new job

* Column added to RequestIssues table (#21578)

* added migration and simple spec to test

* fixed schema deleted issues

* updated spec to verify data being set

* error was no longer trigger from update. removed check and passed in correct variable

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>
Co-authored-by: TuckerRose <tuckerrose@TuckerRoses-MacBook-Pro.local>

* APPEALS-44959: Modify affinity date checks to use appeal_affinity (#21611)

* swap distribution queries from distribution_task to appeal_affinities

* update seed files to use appeal affinities instead of distribution task

* clean up seed file method names

* add missing Timecop.return in ama affinity case seed

* fix name of a method in a seed file

* remove references to distribution task in distribution scopes

* fix push priority job tests

* fix naming of args in one of the seed files

* fix user seed, fix date format in distribution task instructions

* fix tests for date format update

* added bgs_source to parser, controller and serializer along with specs (#21621)

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* Konstantin/appeals 45180 (#21591)

* bug is fixed, condition added to DecisionReviewCreatedController

* rspec test added

* json message updated

* comment added

* Update decision_review_created_controller.rb

comment updated

---------

Co-authored-by: Nader Kutub <nader.kutub@va.gov>

* Calvin/APPEALS-44957-rake-affinity (#21577)

* grabbed receipt dates from distributed cases

* refactored for functionality + added method to grab appeals that match

* using receipt date, get all related appeals

* added update/creation plus cleaned prior imple.

* gets most recent distributed case receipt_date

* skips if receipt_date is nil for performance

* if appeal affinity is nil, it will now be updated

* created spec file

* fixed non ready appeals

* updated query to match new AC

* removing comment

* testing for each docket

* updated spec file

* added new tests to rspec

* updated start date to receipt date instead of Time.now

* fixed date/time rspec errors

* added rails logger to know when rake task has finished

* added tag for rails log

* removed nonpriority dockets for direct_review and evidence_submission

* fixed lint issue

* fixed flaky spec test

* limits distributed cases query to within the last week

* APPEALS-46016: Add Affinity Start Date to the Explain Page (#21660)

* add affinity start date to explain page

* add feature test to verify dates display

* Konstantin/appeals 45149 (#21644)

* RequestIssueSerializer attributes added

* development_item_reference_id, same_office, legacy_opt_in_approved attributes were added

* merge conflicts resolved

* merge conflict resolved

* fixed

* all datapoints were added

* empty line removed

* comment removed

* refactored

* app/controllers/api/docs/v3/ama_issues.yaml updated with new attributes

* example of request issue updated app/controllers/api/docs/v3/ama_issues.yaml

* null to nil edited in example ama_issues.yaml

* example ama_issues.yaml updated

* example ama_issues.yaml updated2

* linters fixed

* linters fixed2

* linters are fixed

* Feature/appeals 28087 36678 (#21683)

* APPEALS-36688- Build out Decision Review Created API route & Controller (#20569)

* added skeleton for api route

* removed duplicate code

* removed development envs for api and moved to creating an ApiKey

* removing any changes to development.rb

* removed extra auth code

* removed before action

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* APPEALS-38232 -Build out Decision Review Created Event Failure API route & Controller (#20601)

* APPEALS-38232 - renamed controller to AC req, added decision_review_created_error endpoint, added decision_review_created_error method, and added RSpec for new method

* APPEALS-38232 - add comments to RSpec

* Jonathan/appeals 36684 (#20516)

* initial Events migration and model creation

* created model for DecisionReviewCreatedEvent

* updated comment with example

* added spec for DRCE model

* APPEALS-36684 created event_records migration and added polymorphic associations to specific models, and added rspec for the event_record model

* APPEALS-36684 - Updated RSpec tests and updated variables and got unhappy path to pass

* cleaned lint

* saving DRCE spec changes

* fixed spec test

* changed has_many to has_one

* updated event model spec

* added validation for ER poly associations

* changed association to has_one

* added new method and updated tests

* added foreign key after running checks

* some PR comment changes

* refactored methods in EventConcern

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>
Co-authored-by: Enrilo Ugalde <ugalde_enrilo@bah.com>

* added migration, scopes and specs for events (#20707)

* fixed migration to update existing events table

* rollbacked to fix schema

* schema fixes

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* Jr/APPEALS-38926  (#20714)

* APPEALS-38926 - Created DecisionReviewCreatedError Service Class, added logic for handling service error, updated DecisonReviewCreatedController, and DecisionReviewCreatedController spec, with the updated service logic

* APPEALS-38926- created RSpec Test for DecisionReviewCreatedError Service Class and edited the Rails.logger for the service class

* APPEALS-38926 Added new info column to update transaction and added it to the RSpec test

* APPEALS-38926 - added comments to the Service Class

* APPEALS-38926 - Code Changes from TL Code Review, added rescues and fails

* APPEALS-38926 - fixed lint

* Jonathan/appeals 36689 (#20671)

* created new service class

* add rspec test cases

* service class methods

* controller action and spec

* controller update

* CC fixes

* removed accidental line

* changed to find_or_create_by

* reworked error for redis lock

* additional rspec for controller

* fixed test

* rspec fix

* delete lock key afterwards

* moved Event creation back into lock block

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* APPEALS-39663 Create CreateUserOnEvent service class and add logic to create user if needed (#20838)

* added user creation class & test

* removed extra lines

* add comment to class

* added context for args from avro

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Jr/APPEALS-39664 (#20898)

* APPEALS-39664 - Created updated_vacols_on_optin module class, and removed  extra private

* APPEALS-39664 - created UpdatedVacolsOnOptin module, RSpec file, as well as sudo code for SOC and SSOC optin check in main service class DecisionReviewCreated

* APPEALS-39664 - Created RSpec Test - PASS,  Updated method name.

* APPEALS-39664 - Added Error Handling to Sub Service Class

* APPEALS-39664 - Removed un-needed comments

* APPEALS-39664 - added include for the module UpdateVacolsOnOptin inside decision_review_created service

* APPEALS-39664 - Added Custom Error , and updated all .perform! to .process!

* APPEALS-39664 - Updated RSpec Test to reflect changes - all pass

* Updated comment for decision_review_created Service Class

* Will/appeals 36691 (#20909)

* Created attribute for failed claims on event and displaying failed claim

* passing all failed events back to serializer

* added controller tests for failed_claims and added class method for finding claims on events

* renamed failed_claims to claim_errors

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* JR/APPEALS-40954 Create CreateIntake service class and add logic to create Intake (#20967)

* APPEALS-40954 - Added Sudo Code for CreateIntake Logic

* APPEALS-40954 - added logic to CreateIntake module

* APPEALS-40954 - added Create Intake spec  with error handling - All pass

* APPEALS-40954 - Added CreateIntake Module to DecisionReviewCreated Main Service

* APPEALS-40954 - updated folder name and namespace

* APPEALS-40954 - Updated RSpec to match folder

* APPEALS-40954- Upated decision review created servie include to match folder

* Fixed failing test due to folder structure change

* Jonathan/appeals 40950 (#20965)

* Added new veteran creation module

* saving test changes

* rspec

* fixed datetime assign

* renamed var

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* APPEALS-40950 - update var veteran to vbms_veteran (#21050)

* APPEALS-40950 - update var veteran to vbms_veteran

* updated private method in controller to match happy path params dcr to drc

* Create CreateClaimantOnEvent service class and add logic to create claimant if needed (#21044)

* created service class and basic unit tests

* added conditionals for veteran claimants and will create veteran claimant now

* modified create claimant to use eventing data

* change to a class

* creating claimant correctly

* test fixes

* removed old comments

* fixed type for veteran_is_not_claimant

* changed specs to match pulling out hash params and removed event.reference id

* moved back to dot notation

* updated comments

* fixed create claimant issue

* updated process to use bang method and returning claimant

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* APPEALS-41968 Modify Issues Endpoints & Update Metric Service Logic (#21108)

* moved metricsService call to top of method

* modified rspec case

* moved metric logging spec case higher up

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Resolved merge conflicts while merging master into feature/APPEALS-28… (#21167)

* Jonathan/APPEALS-41957 (#21171)

* added interface + parser class

* edited veteran parse methods

* renamed var to "payload"

* started refactor

* more refactor + rspec

* added EPE attr

* dateTime conversions

* added class comments

* rubocop lint changes

* fixed test case

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Jr/appeals 41931 (#21192)

* APPEALS-41931 - Created create_ep_establishment file and class

* APPEALS-41931 - added process! method that creates epe from payload

* APPEALS-41931 - added logic for EventRecord being created and error handling

* APPEALS-41931 - added comments to process method

* APPEALS-41931 - set up rspec test

* APPEALS-41931 - removed lint

* APPEALS-41931-created Rspec and Test Pass

* APPEALS-41931 - cleaned lint and added error test 100% code coverage

* APPEALS-41931- fixed lint

* APPEALS-41931- fixed lint and fixed %100 code cov

* APPEALS-41931 - cleaned up lint and warn for Service Class

* APPEALS-41931 - Added CreateEpEstablishment.process! to the decision_review_created Parent Service Class

* APPEALS-41931 - refactor code to implement new parser

* fixed linting issues

* APPEALS-41931 - Updated Comments for CreateEpEstablishment

* APPEALS-41931 - moved logical date int to parser and refactored code in Class and RSepc

* edits

* Will/appeals 41929 (#21205)

* added an error and commented out call for createclaim

* added new parser logic

* merge request changes

* fixed rubocop issues and added checks for claim review attributes

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* APPEALS-42631- Create Rspec for Parser with sample payload method, and add additional parser methods  (#21294)

* APPEALS-42631 - create example.json

* APPEALS-42631 - implemented example_response and load_example method and works as expected

* APPEALS-42631 - created RSpec for DecisionReviewCreatedParser

* APPEALS-42631 - Refactored parser and Added RSpec for current praser

* APPEALS-42631 - added methods to parser for intake, claimant, and claim_review and added matching rspec for new methods

* APPEALS-42631 - updated code per TL Comments

* APPEALS-421631- added additional comments and fixing lint

* APPEALS-41934 (#21251)

* initial commit

* implementation & error

* renamed method

* rspec

* saving refactor progress

* finished refactoring class

* added comment

* minor parser/rspec updates

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* added RI parser methods to rspec (#21322)

* added RI parser methods to rspec

* updated config for Consumer

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Update DecisionReviewCreated to make all calls and link all intake records (#21334)

* updated decision review created to uncomment actions and updated specs

* remove binding.pry

* removed comments

* fixed a bunch of broken tests

* fixed last broken tests

* fixed params for methods and specs

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* APPEALS-43446- Change name of BackfillRecord polymorphic model to EventedRecord (#21382)

* APPEALS-43446 - renamed columns for backfill record to evented record migrate and rollback work as intended

* APPEALS-43446 replaced all backfill_record with evented_record within the models associations and updated Rspec tests

* APPEALS-43446 fixed error message

* Jr/ama controller refactor (#21365)

* fixed test and refactored controller

* saving changes

* init commit passing all the way to request_issues

* all pass and functions as expected

* lint

* lint

* updated initializer to use deep_symbolize_keys

* updated headers to be more dry

* added missing Intake attributes

* fixed failing tests

* updated createIntake test

* fixed veteran rspec

* fixed RI test

* APPEALS-43446- Change name of BackfillRecord polymorphic model to EventedRecord (#21382)

* APPEALS-43446 - renamed columns for backfill record to evented record migrate and rollback work as intended

* APPEALS-43446 replaced all backfill_record with evented_record within the models associations and updated Rspec tests

* APPEALS-43446 fixed error message

* updated intake

* modified intake

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* redo init commit

* updated imp. logic

* attorney widget fix

* Create end to end , happy path rspec's for Decision Created event Feature (#21395)

* updated more tests and fixed user creation

* added in person creation

* corrected headers and fixed broken tests

* added type

* fixed failing spec

* creating event when person is created

* updated spec to account for both events being created

* ignored long lines for spec file

* linting fixes

* fixed more linting errors/ ignored long lines

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* Jonathan/appeals 43589 (#21397)

* saving

* saving user class error progress

* error handling for user creation

* updated error handling/raises

* validator methods

* validations

* update logical date converter

* changed veteran service class to use file_number

* added fields to hlr

* updated epe data

* removed byebug

* fixed typos

* Edit 5: adding detail_id to Intake

* EDIT 6: add claimant_participant_id to epe

* Edit 8: Intake is correctly linked to veteran

* Edit 7: RI additions

* fixed spacing

* fixed typo

* saving rspec changes

* rspec updates

* added datetime conversion for person dob

* fixed rspec

* remove unused methods

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* feature/APPEALS-35707-29633-29632 (uat) (#21435)

* 🔀 Squash merge AlecK/APPEALS-35707 - Replace `database_cleaner` with `database_cleaner-active_record`

* 🔀 Squash merge jcroteau/APPEALS-29632-fix-deprecation-action-view-base-instances

* 🔀 Squash merge jcroteau/APPEALS-29633-fix-deprecation-warning-active_record-result-to_hash

* awillis/APPEALS-45152 (#21506)

* APPEALS-45152 Updated the logic in create_claimant_on_event.rb to always generate a claimant record.  Updated RSPEC.

* APPEALS-45152 Cleaned up RSPEC.

* APPEALS-45152 Fixed Failing RSPEC within decision_review_created_spec.rb

* APPEALS-45152 Updated RSPEC within decision_review_created_spec.rb with addtional checks.

* APPEALS-44319 (#21449) (#21541)

* added logic for legacy issues in DRC

* more legacy logic

* updated rspec context lang

* error cov

---------

Co-authored-by: Jonathan Tsang <98970951+jtsangVA@users.noreply.github.com>
Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Konstantin/APPEALS-45175 (#21517)

* logical_date_converter re-written to work with yyyymmdd numbers from json payload

* comments removed

* comments removed2

* method rewitten

* json example fixed

* date in scenario_b_spec.rb replaced by valid ones, additional check for empty string parameter added to the logical_date_converter

* removed filter for non rating request issue dropdown (#21480)

* removed filter for non rating request issue dropdown

* removed excluded types as we don't need to check this anymore

* fixed broken test

* added category back

* no longer need test to check for missing categories since we're returning them all.

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* Column added to RequestIssues table (#21578)

* added migration and simple spec to test

* fixed schema deleted issues

* updated spec to verify data being set

* error was no longer trigger from update. removed check and passed in correct variable

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>
Co-authored-by: TuckerRose <tuckerrose@TuckerRoses-MacBook-Pro.local>

* added bgs_source to parser, controller and serializer along with specs (#21621)

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* Konstantin/appeals 45180 (#21591)

* bug is fixed, condition added to DecisionReviewCreatedController

* rspec test added

* json message updated

* comment added

* Update decision_review_created_controller.rb

comment updated

---------

Co-authored-by: Nader Kutub <nader.kutub@va.gov>

* Konstantin/appeals 45149 (#21644)

* RequestIssueSerializer attributes added

* development_item_reference_id, same_office, legacy_opt_in_approved attributes were added

* merge conflicts resolved

* merge conflict resolved

* fixed

* all datapoints were added

* empty line removed

* comment removed

* refactored

* app/controllers/api/docs/v3/ama_issues.yaml updated with new attributes

* example of request issue updated app/controllers/api/docs/v3/ama_issues.yaml

* null to nil edited in example ama_issues.yaml

* example ama_issues.yaml updated

* example ama_issues.yaml updated2

* linters fixed

* linters fixed2

* linters are fixed

---------

Co-authored-by: Will Love <wlove29@gmail.com>
Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>
Co-authored-by: Enrilo Ugalde <71367882+Jruuuu@users.noreply.github.com>
Co-authored-by: Jonathan Tsang <98970951+jtsangVA@users.noreply.github.com>
Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>
Co-authored-by: Enrilo Ugalde <ugalde_enrilo@bah.com>
Co-authored-by: isaiahsaucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: Craig Reese <Reese_Craig@bah.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: (Jeffrey) Aaron Willis <98484567+Aaron-Willis@users.noreply.github.com>
Co-authored-by: Konstantin Shevtsov <166068160+KonstantinShevtsov@users.noreply.github.com>
Co-authored-by: TuckerRose <tuckerrose@TuckerRoses-MacBook-Pro.local>

* added conditional to throw different errors based on consumer event id

* fixed linting error

* eli/APPEALS-28087-36678-prod-test-branch (#21701)

* added conditional to throw different errors based on consumer event id

* fixed linting error

* fix linting error

---------

Co-authored-by: Will Love <wlove29@gmail.com>
Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>
Co-authored-by: Enrilo Ugalde <71367882+Jruuuu@users.noreply.github.com>
Co-authored-by: Jonathan Tsang <98970951+jtsangVA@users.noreply.github.com>
Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>
Co-authored-by: Enrilo Ugalde <ugalde_enrilo@bah.com>
Co-authored-by: isaiahsaucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: Craig Reese <Reese_Craig@bah.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: (Jeffrey) Aaron Willis <98484567+Aaron-Willis@users.noreply.github.com>
Co-authored-by: Konstantin Shevtsov <166068160+KonstantinShevtsov@users.noreply.github.com>
Co-authored-by: TuckerRose <tuckerrose@TuckerRoses-MacBook-Pro.local>
Co-authored-by: calvincostaBAH <108481161+calvincostaBAH@users.noreply.github.com>
Co-authored-by: Eli Brown <elilogbro@gmail.com>
nkutub added a commit that referenced this pull request Jun 3, 2024
* APPEALS-36688- Build out Decision Review Created API route & Controller (#20569)

* added skeleton for api route

* removed duplicate code

* removed development envs for api and moved to creating an ApiKey

* removing any changes to development.rb

* removed extra auth code

* removed before action

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* APPEALS-38232 -Build out Decision Review Created Event Failure API route & Controller (#20601)

* APPEALS-38232 - renamed controller to AC req, added decision_review_created_error endpoint, added decision_review_created_error method, and added RSpec for new method

* APPEALS-38232 - add comments to RSpec

* Jonathan/appeals 36684 (#20516)

* initial Events migration and model creation

* created model for DecisionReviewCreatedEvent

* updated comment with example

* added spec for DRCE model

* APPEALS-36684 created event_records migration and added polymorphic associations to specific models, and added rspec for the event_record model

* APPEALS-36684 - Updated RSpec tests and updated variables and got unhappy path to pass

* cleaned lint

* saving DRCE spec changes

* fixed spec test

* changed has_many to has_one

* updated event model spec

* added validation for ER poly associations

* changed association to has_one

* added new method and updated tests

* added foreign key after running checks

* some PR comment changes

* refactored methods in EventConcern

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>
Co-authored-by: Enrilo Ugalde <ugalde_enrilo@bah.com>

* added migration, scopes and specs for events (#20707)

* fixed migration to update existing events table

* rollbacked to fix schema

* schema fixes

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* Jr/APPEALS-38926  (#20714)

* APPEALS-38926 - Created DecisionReviewCreatedError Service Class, added logic for handling service error, updated DecisonReviewCreatedController, and DecisionReviewCreatedController spec, with the updated service logic

* APPEALS-38926- created RSpec Test for DecisionReviewCreatedError Service Class and edited the Rails.logger for the service class

* APPEALS-38926 Added new info column to update transaction and added it to the RSpec test

* APPEALS-38926 - added comments to the Service Class

* APPEALS-38926 - Code Changes from TL Code Review, added rescues and fails

* APPEALS-38926 - fixed lint

* Jonathan/appeals 36689 (#20671)

* created new service class

* add rspec test cases

* service class methods

* controller action and spec

* controller update

* CC fixes

* removed accidental line

* changed to find_or_create_by

* reworked error for redis lock

* additional rspec for controller

* fixed test

* rspec fix

* delete lock key afterwards

* moved Event creation back into lock block

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* APPEALS-39663 Create CreateUserOnEvent service class and add logic to create user if needed (#20838)

* added user creation class & test

* removed extra lines

* add comment to class

* added context for args from avro

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Jr/APPEALS-39664 (#20898)

* APPEALS-39664 - Created updated_vacols_on_optin module class, and removed  extra private

* APPEALS-39664 - created UpdatedVacolsOnOptin module, RSpec file, as well as sudo code for SOC and SSOC optin check in main service class DecisionReviewCreated

* APPEALS-39664 - Created RSpec Test - PASS,  Updated method name.

* APPEALS-39664 - Added Error Handling to Sub Service Class

* APPEALS-39664 - Removed un-needed comments

* APPEALS-39664 - added include for the module UpdateVacolsOnOptin inside decision_review_created service

* APPEALS-39664 - Added Custom Error , and updated all .perform! to .process!

* APPEALS-39664 - Updated RSpec Test to reflect changes - all pass

* Updated comment for decision_review_created Service Class

* Will/appeals 36691 (#20909)

* Created attribute for failed claims on event and displaying failed claim

* passing all failed events back to serializer

* added controller tests for failed_claims and added class method for finding claims on events

* renamed failed_claims to claim_errors

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* JR/APPEALS-40954 Create CreateIntake service class and add logic to create Intake (#20967)

* APPEALS-40954 - Added Sudo Code for CreateIntake Logic

* APPEALS-40954 - added logic to CreateIntake module

* APPEALS-40954 - added Create Intake spec  with error handling - All pass

* APPEALS-40954 - Added CreateIntake Module to DecisionReviewCreated Main Service

* APPEALS-40954 - updated folder name and namespace

* APPEALS-40954 - Updated RSpec to match folder

* APPEALS-40954- Upated decision review created servie include to match folder

* Fixed failing test due to folder structure change

* Jonathan/appeals 40950 (#20965)

* Added new veteran creation module

* saving test changes

* rspec

* fixed datetime assign

* renamed var

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* APPEALS-40950 - update var veteran to vbms_veteran (#21050)

* APPEALS-40950 - update var veteran to vbms_veteran

* updated private method in controller to match happy path params dcr to drc

* Create CreateClaimantOnEvent service class and add logic to create claimant if needed (#21044)

* created service class and basic unit tests

* added conditionals for veteran claimants and will create veteran claimant now

* modified create claimant to use eventing data

* change to a class

* creating claimant correctly

* test fixes

* removed old comments

* fixed type for veteran_is_not_claimant

* changed specs to match pulling out hash params and removed event.reference id

* moved back to dot notation

* updated comments

* fixed create claimant issue

* updated process to use bang method and returning claimant

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* APPEALS-41968 Modify Issues Endpoints & Update Metric Service Logic (#21108)

* moved metricsService call to top of method

* modified rspec case

* moved metric logging spec case higher up

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Resolved merge conflicts while merging master into feature/APPEALS-28… (#21167)

* Jonathan/APPEALS-41957 (#21171)

* added interface + parser class

* edited veteran parse methods

* renamed var to "payload"

* started refactor

* more refactor + rspec

* added EPE attr

* dateTime conversions

* added class comments

* rubocop lint changes

* fixed test case

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Jr/appeals 41931 (#21192)

* APPEALS-41931 - Created create_ep_establishment file and class

* APPEALS-41931 - added process! method that creates epe from payload

* APPEALS-41931 - added logic for EventRecord being created and error handling

* APPEALS-41931 - added comments to process method

* APPEALS-41931 - set up rspec test

* APPEALS-41931 - removed lint

* APPEALS-41931-created Rspec and Test Pass

* APPEALS-41931 - cleaned lint and added error test 100% code coverage

* APPEALS-41931- fixed lint

* APPEALS-41931- fixed lint and fixed %100 code cov

* APPEALS-41931 - cleaned up lint and warn for Service Class

* APPEALS-41931 - Added CreateEpEstablishment.process! to the decision_review_created Parent Service Class

* APPEALS-41931 - refactor code to implement new parser

* fixed linting issues

* APPEALS-41931 - Updated Comments for CreateEpEstablishment

* APPEALS-41931 - moved logical date int to parser and refactored code in Class and RSepc

* edits

* Will/appeals 41929 (#21205)

* added an error and commented out call for createclaim

* added new parser logic

* merge request changes

* fixed rubocop issues and added checks for claim review attributes

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* APPEALS-42631- Create Rspec for Parser with sample payload method, and add additional parser methods  (#21294)

* APPEALS-42631 - create example.json

* APPEALS-42631 - implemented example_response and load_example method and works as expected

* APPEALS-42631 - created RSpec for DecisionReviewCreatedParser

* APPEALS-42631 - Refactored parser and Added RSpec for current praser

* APPEALS-42631 - added methods to parser for intake, claimant, and claim_review and added matching rspec for new methods

* APPEALS-42631 - updated code per TL Comments

* APPEALS-421631- added additional comments and fixing lint

* APPEALS-41934 (#21251)

* initial commit

* implementation & error

* renamed method

* rspec

* saving refactor progress

* finished refactoring class

* added comment

* minor parser/rspec updates

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* added RI parser methods to rspec (#21322)

* added RI parser methods to rspec

* updated config for Consumer

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Update DecisionReviewCreated to make all calls and link all intake records (#21334)

* updated decision review created to uncomment actions and updated specs

* remove binding.pry

* removed comments

* fixed a bunch of broken tests

* fixed last broken tests

* fixed params for methods and specs

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* APPEALS-43446- Change name of BackfillRecord polymorphic model to EventedRecord (#21382)

* APPEALS-43446 - renamed columns for backfill record to evented record migrate and rollback work as intended

* APPEALS-43446 replaced all backfill_record with evented_record within the models associations and updated Rspec tests

* APPEALS-43446 fixed error message

* Jr/ama controller refactor (#21365)

* fixed test and refactored controller

* saving changes

* init commit passing all the way to request_issues

* all pass and functions as expected

* lint

* lint

* updated initializer to use deep_symbolize_keys

* updated headers to be more dry

* added missing Intake attributes

* fixed failing tests

* updated createIntake test

* fixed veteran rspec

* fixed RI test

* APPEALS-43446- Change name of BackfillRecord polymorphic model to EventedRecord (#21382)

* APPEALS-43446 - renamed columns for backfill record to evented record migrate and rollback work as intended

* APPEALS-43446 replaced all backfill_record with evented_record within the models associations and updated Rspec tests

* APPEALS-43446 fixed error message

* updated intake

* modified intake

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* redo init commit

* updated imp. logic

* attorney widget fix

* Create end to end , happy path rspec's for Decision Created event Feature (#21395)

* updated more tests and fixed user creation

* added in person creation

* corrected headers and fixed broken tests

* added type

* fixed failing spec

* creating event when person is created

* updated spec to account for both events being created

* ignored long lines for spec file

* linting fixes

* fixed more linting errors/ ignored long lines

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* Jonathan/appeals 43589 (#21397)

* saving

* saving user class error progress

* error handling for user creation

* updated error handling/raises

* validator methods

* validations

* update logical date converter

* changed veteran service class to use file_number

* added fields to hlr

* updated epe data

* removed byebug

* fixed typos

* Edit 5: adding detail_id to Intake

* EDIT 6: add claimant_participant_id to epe

* Edit 8: Intake is correctly linked to veteran

* Edit 7: RI additions

* fixed spacing

* fixed typo

* saving rspec changes

* rspec updates

* added datetime conversion for person dob

* fixed rspec

* remove unused methods

---------

Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* feature/APPEALS-35707-29633-29632 (uat) (#21435)

* 🔀 Squash merge AlecK/APPEALS-35707 - Replace `database_cleaner` with `database_cleaner-active_record`

* 🔀 Squash merge jcroteau/APPEALS-29632-fix-deprecation-action-view-base-instances

* 🔀 Squash merge jcroteau/APPEALS-29633-fix-deprecation-warning-active_record-result-to_hash

* awillis/APPEALS-45152 (#21506)

* APPEALS-45152 Updated the logic in create_claimant_on_event.rb to always generate a claimant record.  Updated RSPEC.

* APPEALS-45152 Cleaned up RSPEC.

* APPEALS-45152 Fixed Failing RSPEC within decision_review_created_spec.rb

* APPEALS-45152 Updated RSPEC within decision_review_created_spec.rb with addtional checks.

* APPEALS-44319 (#21449) (#21541)

* added logic for legacy issues in DRC

* more legacy logic

* updated rspec context lang

* error cov

---------

Co-authored-by: Jonathan Tsang <98970951+jtsangVA@users.noreply.github.com>
Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>

* Konstantin/APPEALS-45175 (#21517)

* logical_date_converter re-written to work with yyyymmdd numbers from json payload

* comments removed

* comments removed2

* method rewitten

* json example fixed

* date in scenario_b_spec.rb replaced by valid ones, additional check for empty string parameter added to the logical_date_converter

* removed filter for non rating request issue dropdown (#21480)

* removed filter for non rating request issue dropdown

* removed excluded types as we don't need to check this anymore

* fixed broken test

* added category back

* no longer need test to check for missing categories since we're returning them all.

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* Column added to RequestIssues table (#21578)

* added migration and simple spec to test

* fixed schema deleted issues

* updated spec to verify data being set

* error was no longer trigger from update. removed check and passed in correct variable

---------

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>
Co-authored-by: TuckerRose <tuckerrose@TuckerRoses-MacBook-Pro.local>

* added bgs_source to parser, controller and serializer along with specs (#21621)

Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>

* Konstantin/appeals 45180 (#21591)

* bug is fixed, condition added to DecisionReviewCreatedController

* rspec test added

* json message updated

* comment added

* Update decision_review_created_controller.rb

comment updated

---------

Co-authored-by: Nader Kutub <nader.kutub@va.gov>

* Konstantin/appeals 45149 (#21644)

* RequestIssueSerializer attributes added

* development_item_reference_id, same_office, legacy_opt_in_approved attributes were added

* merge conflicts resolved

* merge conflict resolved

* fixed

* all datapoints were added

* empty line removed

* comment removed

* refactored

* app/controllers/api/docs/v3/ama_issues.yaml updated with new attributes

* example of request issue updated app/controllers/api/docs/v3/ama_issues.yaml

* null to nil edited in example ama_issues.yaml

* example ama_issues.yaml updated

* example ama_issues.yaml updated2

* linters fixed

* linters fixed2

* linters are fixed

---------

Co-authored-by: Will Love <wlove29@gmail.com>
Co-authored-by: TuckerRose <tuckerrose@tuckerroses-mbp.lan>
Co-authored-by: Enrilo Ugalde <71367882+Jruuuu@users.noreply.github.com>
Co-authored-by: Jonathan Tsang <98970951+jtsangVA@users.noreply.github.com>
Co-authored-by: Jonathan Tsang <tsang_jonathan@bah.com>
Co-authored-by: Enrilo Ugalde <ugalde_enrilo@bah.com>
Co-authored-by: isaiahsaucedo <irsaucedo5@gmail.com>
Co-authored-by: Calvin <Calvin.Costa@va.gov>
Co-authored-by: Craig Reese <Reese_Craig@bah.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: (Jeffrey) Aaron Willis <98484567+Aaron-Willis@users.noreply.github.com>
Co-authored-by: Konstantin Shevtsov <166068160+KonstantinShevtsov@users.noreply.github.com>
Co-authored-by: TuckerRose <tuckerrose@TuckerRoses-MacBook-Pro.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants