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

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

Merged
merged 2 commits into from
May 17, 2024

Conversation

craigrva
Copy link
Contributor

@craigrva craigrva commented May 15, 2024

Resolves APPEALS-46016

Description

  • Modify the explain page fragment _task_tree.html.erb to include the appeal's Affinity Start Date, if one exists
  • Modify the explain_controller to support displaying the Affinity Start Date
  • Add feature test to verify that the Affinity Start Date displays when one exists, but does not if one doesn't exist

Acceptance Criteria

  • Code compiles correctly

Testing Plan

In a local environment:

  1. Open a rails console
  2. Create an appeal with affinity by running FactoryBot.create(:appeal_affinity)
  3. Using the case_id value from the above appeal_affinity record, go to /explain/appeals/{case_id}
  4. Click the "Task Tree" checkbox
  5. Verify that an affinity start date displays

Frontend

User Facing Changes

  • Screenshots of UI changes added to PR & Original Issue

BEFORE
image

AFTER
image

Storybook Story

For Frontend (Presentation) Components

  • Add a Storybook file alongside the component file (e.g. create MyComponent.stories.js alongside MyComponent.jsx)
  • Give it a title that reflects the component's location within the overall Caseflow hierarchy
  • Write a separate story (within the same file) for each discrete variation of the component

Backend

Database Changes

Only for Schema Changes

  • Add typical timestamps (created_at, updated_at) for new tables
  • Update column comments; include a "PII" prefix to indicate definite or potential PII data content
  • Have your migration classes inherit from Caseflow::Migration, especially when adding indexes (use add_safe_index) (see Writing DB migrations)
  • Verify that migrate:rollback works as desired (change supported functions)
  • Perform query profiling (eyeball Rails log, check bullet and fasterer output)
  • For queries using raw sql was an explain plan run by System Team
  • Add appropriate indexes (especially for foreign keys, polymorphic columns, unique constraints, and Rails scopes)
  • Run make check-fks; add any missing foreign keys or add to config/initializers/immigrant.rb (see Record associations and Foreign Keys)
  • Add belongs_to for associations to enable the schema diagrams to be automatically updated
  • Document any non-obvious semantics or logic useful for interpreting database data at Caseflow Data Model and Dictionary

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
    • Check that calls are wrapped in MetricService record block
  • Check that all configuration is coming from ENV variables
    • Listed all new ENV variables in description
    • Worked with or notified System Team that new ENV variables need to be set
  • Update Fakes
  • For feature branches: Was this tested in Caseflow UAT

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
  • Jest
  • Other

Code Climate

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

  • No new code climate issues added

Monitoring, Logging, Auditing, Error, and Exception Handling Checklist

Monitoring

  • Are performance metrics (e.g., response time, throughput) being tracked?
  • Are key application components monitored (e.g., database, cache, queues)?
  • Is there a system in place for setting up alerts based on performance thresholds?

Logging

  • Are logs being produced at appropriate log levels (debug, info, warn, error, fatal)?
  • Are logs structured (e.g., using log tags) for easier querying and analysis?
  • Are sensitive data (e.g., passwords, tokens) redacted or omitted from logs?
  • Is log retention and rotation configured correctly?
  • Are logs being forwarded to a centralized logging system if needed?

Auditing

  • Are user actions being logged for audit purposes?
  • Are changes to critical data being tracked ?
  • Are logs being securely stored and protected from tampering or exposing protected data?

Error Handling

  • Are errors being caught and handled gracefully?
  • Are appropriate error messages being displayed to users?
  • Are critical errors being reported to an error tracking system (e.g., Sentry, ELK)?
  • Are unhandled exceptions being caught at the application level ?

Exception Handling

  • Are custom exceptions defined and used where appropriate?
  • Is exception handling consistent throughout the codebase?
  • Are exceptions logged with relevant context and stack trace information?
  • Are exceptions being grouped and categorized for easier analysis and resolution?

@craigrva craigrva changed the title APPEALS-46016: APPEALS-46016: Add Affinity Start Date to the Explain Page May 15, 2024
@craigrva craigrva changed the base branch from master to feature/APPEALS-44916 May 15, 2024 21:50
Copy link

codeclimate bot commented May 15, 2024

Code Climate has analyzed commit 6198948 and detected 3 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 3

View more on Code Climate.

@craigrva craigrva merged commit 6ce88de into feature/APPEALS-44916 May 17, 2024
17 of 19 checks passed
@craigrva craigrva deleted the craig/APPEALS-46016 branch May 17, 2024 20:16
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>
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

2 participants