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

Caceves/appeals 27311 31542 #21430

Closed
wants to merge 168 commits into from
Closed

Conversation

cacevesva
Copy link
Contributor

Resolves Jira Issue Title

Description

Please explain the changes you made here.

Acceptance Criteria

  • Code compiles correctly

Testing Plan

  1. Go to Jira Issue/Test Plan Link or list them below
  • For feature branches merging into master: Was this deployed to UAT?

Frontend

User Facing Changes

  • Screenshots of UI changes added to PR & Original Issue
BEFORE AFTER

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?

jimfoley25 and others added 30 commits December 26, 2023 07:38
* Initial Commit

* Running tests

* Adding appellant phone number to serializer

* Adding paper case attribute

* Add attributes to search hash

* add KNAPSACK_PRO_FIXED_QUEUE_SPLIT to workflow.yml (#20329)

* add KNAPSACK_PRO_FIXED_QUEUE_SPLIT to workflow.yml

* update deprecated method for knapsack

* add comment

---------

Co-authored-by: AimanK <Aiman.Kayad@va.gov>
Co-authored-by: raymond-hughes <raymond.hughes2@va.gov>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: Raymond Hughes <131811099+raymond-hughes@users.noreply.github.com>
* Test spec fixes

* lint issue
* Refactor Correspondence Controller

- Move intake processing logic to new service.

- Clean up some class variables in controller to use method.

* Create Tasks Not Related To Appeal

* Fix Issues with Creating Unrelated Appeal Tasks

* Task Routing: Mail Tasks additions

* Fix Create Mail Tasks Bugs

- Fix issues preventing mail tasks from being created.

- Enhance specs for creating mail tasks and tasks not related to
an appeal.

- Fix linting errors.

* Add Exemptions when Creating Correspondence Tasks

* Refactor Task Creating Edge Case Handling

- Update the Correspondence class to responde to Appeal methods vs.
littering the code with conditionals.

* Fix Linting Error

* Update correspondence_controller_spec.rb

Fix spec failure

---------

Co-authored-by: Dev-KRedd <khalin.redding@va.gov>
* Fixed UAT seed data

* fix in uat seed data veteran save

* Added in missing fields

---------

Co-authored-by: Kevin Ma <magavakevin10@gmail.com>
Co-authored-by: youfoundmanesh <129548081+youfoundmanesh@users.noreply.github.com>
* remove package

* Added Correspondence Task Serializer to show type

* Added isReadOnly check to tasks on initial fetch

* Jest test fix

* Removed duplicate method

* Remove dropdown for readOnly page

* Added feature test

* Added extra check for banner

* Typo fix

* Fixed packageActionModal jest test

* Add Banner

* spec files

* fix rubocop error

* fix modal

* Fix spec file

* Disabled all buttons

---------

Co-authored-by: Kevin Ma <magavakevin10@gmail.com>
Co-authored-by: Kevma50287 <104021955+Kevma50287@users.noreply.github.com>
* Refactored task ID logic for related tasks.

* Updated logic to be cleaner.

---------

Co-authored-by: Jim Foley <james.foley4@va.gov>
* Added Correspondence Task Serializer to show type

* Added isReadOnly check to tasks on initial fetch

* Jest test fix

* Removed duplicate method

* Remove dropdown for readOnly page

* Added feature test

* Added extra check for banner

* Typo fix

* Fixed packageActionModal jest test

* Added guard to error handling

* Spec fix

* Missing comma

* Piedram/appeals 36343 (#20350)

* remove package

* Added Correspondence Task Serializer to show type

* Added isReadOnly check to tasks on initial fetch

* Jest test fix

* Removed duplicate method

* Remove dropdown for readOnly page

* Added feature test

* Added extra check for banner

* Typo fix

* Fixed packageActionModal jest test

* Add Banner

* spec files

* fix rubocop error

* fix modal

* Fix spec file

* Disabled all buttons

---------

Co-authored-by: Kevin Ma <magavakevin10@gmail.com>
Co-authored-by: Kevma50287 <104021955+Kevma50287@users.noreply.github.com>

---------

Co-authored-by: piedram <110848569+piedram@users.noreply.github.com>
… is disabled (#20335)

* Adding under construction page for authorized users

* fixing cmp spec

* routing more specs to under_construction - rspec job 12,5

* Test run helpers

* adding test for unauthorized

* Changing from mail intake to mail team in helpers

* adding unauthorized user check

* Fix to correspondence intake spec

---------

Co-authored-by: Jim Foley <james.foley4@va.gov>
* Refactor Correspondence Controller

- Move intake processing logic to new service.

- Clean up some class variables in controller to use method.

* Create Tasks Not Related To Appeal

* Fix Issues with Creating Unrelated Appeal Tasks

* Task Routing: Mail Tasks additions

* Test for completed mail tasks & add tasks not related to an appeal

* Bug fix and passing failure test.

---------

Co-authored-by: Alexander Smith <alex.smith.99@thunderyard.com>
Co-authored-by: Jim Foley <james.foley4@va.gov>
* review package status to in progress

* Efloder error banner display

* Ability to resume review package specs

* Split package other option place holder fix

---------

Co-authored-by: youfoundmanesh <129548081+youfoundmanesh@users.noreply.github.com>
* APPEALS-35703 - Update Task Type Labels

* APPEALS-35703 - Correspondence CSS Work

* APPEALS-35703 - Update CSS

* APPEALS-35703 - Fix Table, Removed unused styling

* APPEALS-35703 - Linting

* APPEALS-35703 - Lint 2 To Too

* Update _correspondence.scss

---------

Co-authored-by: Jim Foley <james.foley4@va.gov>
Co-authored-by: Jim Foley <james.foley4@va.gov>
Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>
…ction (#20407)

Co-authored-by: Jim Foley <james.foley4@va.gov>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
Co-authored-by: HunJerBAH <99915461+HunJerBAH@users.noreply.github.com>
* Added create_veteran to helper module and used in multi_correspondences

* Added seed_helper module to cavc_ama_appeals

* Added seed_helper module to test_case_data

* Added seed_helper module to seeds/tasks.rb

* Adjust formatting

* Added seed_helper module to static test data

* Added seed_helper module to static dispatched test data

* Added seed_helper module to remanded legacy appeals

* Added seed_helper module to remanded ama appeals

* Added seed_helper module to cavc dashboard data

* Relocate duplicate correspondence intake setup to CorrespondenceHelpers

* Relocated duplicate create_child_class methods to shared parent

* Moved create_child_class to private section

* Move autotext table seeding to CorrespondenceHelpers

* Codeclimate fixes and ignores

* Update validation syntax on CorrespondenceIntake

* Refactor method naming convention inCorrespondenceRelation

* Update validation syntax on CorrespondenceRelation

* Fixing requires

* replaces timeout with sleep to fix offense

* scss linting fix

* Updated Time.local to Time.zone.local (reran tests)

* parameter lint fix.

* fixed linter issue.

* Several linting fixes

* fixed cyclomatic complexity

* refactored logging statement

* Converted statement to one line for better readability.

* fixed element count

* fixed incorrect element being clicked

* Fix other motion bug

---------

Co-authored-by: William Medders <medders_william@bah.com>
* upload static correspondence document

* update spec

---------

Co-authored-by: Jonathan Hoang <trinhjoanthan.hoang@va.gov>
* PdfDocument is hard-coded to access only the first N documents available

* Add limit so we're not pulling the entire table for testing purposes

* Removed loading message from jest test. Updated lint

---------

Co-authored-by: youfoundmanesh <129548081+youfoundmanesh@users.noreply.github.com>
Co-authored-by: youfoundmanesh <129548081+youfoundmanesh@users.noreply.github.com>
HunJerBAH and others added 25 commits March 5, 2024 13:22
… populating. (#21035)

* updates query to prevent efolderuploadfailed tasks

* updated query to look better

* Fixed task sorting.

---------

Co-authored-by: Jim Foley <james.foley4@va.gov>
* Add new correspondence tasks not related to appeal

* Fix error when submitting correspondence intake

* Add scope tasks_not_related_to_appeal

* Change intake processor to create new correspondence tasks

* Refactor to have new Correspondence task class names

* Refactor to simplify and be less flaky

* Refactor with the updated class names

* add veteran full name

* create abstract base class for tasks not related to an appeal

* remove task not related to appeal scope

* move correspondence mail tasks to folder

* correspondence mail tasks inherit from CorrespondenceMailTask

* remove hard coded true return for task creation verification

* abstract class and create child class override

* replace deleted verification bypass

* revert task creation refactor
…fixes (#21047)

Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
* adding correspondence intake controller

* moving methods that seem to be suited for the intake-specific controller

* refactor conditional

* updating the routes

* Updating the remainder of intake routes

* removing a repeated method found

* moving intake specs to new intake controller spec

* fixing file for failing tests

* Fixing failing specs

---------

Co-authored-by: William Medders <medders_william@bah.com>
Co-authored-by: Jim Foley <james.foley4@va.gov>
* creating review package controller, moving methods, editing routing

* Moving review package spec tests to new RP Spec file

* cleaning up code from intake controller spec
Copy link

codeclimate bot commented Apr 22, 2024

Code Climate has analyzed commit 887ee14 and detected 10 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 2
Security 1
Style 6
Complexity 1

View more on Code Climate.

Copy link

Code Scanning Policy Findings

Your repository contains unresolved code scanning alerts. Policy requires that all code scanning alerts of critical severity be resolved within 30 days.

In the future, if your repository contains unresolved code scanning alerts older than 30 days, you will not be able to merge this pull request.

Learn more about how to triage and remediate these alerts in the GitHub Code Scanning documentation.

If this pull request remediates these alerts, after your pull requests CodeQL scan has completed, follow this link to re-run the policy check and select Re-run all jobs at the top of the page: https://github.com/department-of-veterans-affairs/caseflow/actions/runs/8788511739

You may also re-run this required check by simply commenting on this pull request with the following command:
/actions-bot rerun-required-workflows

Alert NumberURLAgePolicy Violation
24Link396 DaysYes
20Link399 DaysYes
19Link399 DaysYes
18Link399 DaysYes

@cacevesva cacevesva closed this Apr 22, 2024
@cacevesva cacevesva deleted the caceves/APPEALS-27311-31542 branch April 22, 2024 18:18
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.