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

Combined/appeals 17497 v6 ratings rework appeals 15376 #19387

Closed

Conversation

mikefinneran
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?

msteele96 and others added 30 commits August 1, 2023 14:06
* feature/APPEALS-21339: (30 commits)
  updated deserialize method to check on rating decision model for attributes in hash
  Revert "Take setup-node for a spin"
  Take setup-node for a spin
  allow slack notifications in uat
  Update open_hearing_tasks_without_active_descendants_checker_spec.rb
  HunJerBAH APPEALS-26881: Reject Unknown Attributes in RatingDecisions Hash (#19072)
  hid mst pact special issues banner behind feature toggles
  updated back button routing and special issues showing on decisions for ama appeals
  routed judge/attorney decisions to special issues pending on mst pact toggle
  added toggle for mst on special issues list
  hid blue water and burn pit behind mst/pact toggle
  added 24 hr caching and commented out toggle for bgs call
  adding logging for BGS contention calls
  updated feature toggles to include current user
  added caching to BGS contention call
  hid pact and mst check behind toggles
  added feature toggle guard clause for bgs calls for ratings
  optimized participant contentions method to return contentions to cut down on BGS calls
  APPEALS-17497: MST & PACT Special issues identification
  added 24 hr caching and commented out toggle for bgs call
  ...
* Got the modal to allow the form to be submitted without a decision_date for vha benifit type

* Got optional label to appear next to the Decision date label for vha benifit type

* cleaned up some lint

* Cleaned up the logic of the submit button

* Updated the storebook file for the modal to inculde an example for the vha benefit type

* Got first new test working

* Added a new condition to a test for non vha benefit type to check that the optional label is not visible

* added some testing for the submit button logic

* extracted shared logic to describe block

* Cleaned up the repeated code and logic

* fixed the code climate issue of repeated code

* made the first recommended change

* Made the rest of the recommended changes

---------

Co-authored-by: Alec Spottswood <ajspottswood@gmail.com>
…19063)

* Remove rerouting for VHA issues w/o decision dates

Prior to this change there would be a reroute when trying to edit a
VHA issue that did not have a decision date.

We no longer want to reroute when a VHA issue has a missing decision
date.

* Add NoDecisionBanner to IssueList component

From the jira Epic:
Value Statement: As a VHA Intake user, I need the ability to bypass
the required Decision Date entry for a HLR/SC if the information is
not provided, so that I may proceed with the intake of the claim.

As a result of allowing the user to save issues with no decision date,
we want to alert the user to the outcome of saving without a decision
date.

* Extract issueSectionRow to its own file

In an attempt to make the codebase more maintainable and testable we
are extracting this logic that can go in its own file.

The purpose of this is to better follow Separations of Concerns
principles. The `issueSectionRow` logic is distinct enough that it
justifies being in its own section.

Now when working on this section in the future a developer can focus
on just `issueSectionRow.jsx` instead of the whole `addIssues` file.

The main reason I did this however was to more easily test this
functionality in storybook.

* Create `issueSectionRow` stories

The stories are testing:
- The basic issueSectionRow functionality
- issueSectionRow when the issue has no decision date

* Move `addIssues.jsx` into the `addIssues` folder

There were several new files created related to `addIssues` and it
felt like time to make a new directory to house these files.

One thing that could be done in the future is to use more absolute
paths instead of relative paths so that in the future when files and
folders get moved around we don't have to edit file paths.

* Add messageStyling to` IssueList` and `Alert`

We want to override the existing css of the `Alert` component's
message body. To do this we are adding a new prop called
`messageStyling` which will contain any additional css.

This is used in the `IssueList` component for the NoDecisionDate
banner. We want the font size and color to match the mockups provided
to us.

I don't love using the `!important` tag here but I think for now it is
fine and can be potentially improved in the future.

* Minor lint fix

* Add margin to No Decision Date Banner

Adjusted the spacing on the no decision date banner so it does not
cover up the dividing line between issues.

* Add tests for NoDecisionDateBanner in `IssueList`

---------

Co-authored-by: Alec Spottswood <ajspottswood@gmail.com>
* feature/APPEALS-21339:
  exclude db/scripts in codeclimate (#19103)
  Craig/test yarn cache (#19096)
  test update to yarn dependency cache keys
  add exception handling to audit remove script
…view Queue (#19048)

* Initial commit with the incomplete tab for the vha business line.

* Updated the issue type count query logic to work for the new incomplete tab. Added the new appeal unique id alias i.e. the external id to the select statements. Added tabname to the TaskTableTab state in order to account for different behavior for different types of tabs.

* Removed some debugging code.

* Added new constant for the incomplete tab description. Updated a lot of instances of BusinessLine.find_by(url: vha) to use the new VhaBusinessLine.singleton method to hopefully avoid module/class preloading issues.

* Refactored business line querybuilder to work with subtypes of businessline. Added a None tag to the list of filter options if there is not a issue category present on a request issue and fixed the method of counting to work with null issue category column values. Refactored union query joins into an array to reduce code complexity.

* Updated decision review task serializer spec and it's inherited specs for the new fields.

* Refactored the task_filter_details to only include the filter counts for the tabs that the businessline can query for.

* Updated the decision reviews controller in progress method for
 generic non comp buisiness line org to verify that it also includes on hold tasks. Added new tests for the incompe vha businessline for the incomplete tasks method and tab. Also added an in progress tasks test for vha since it should no longer include tasks that have the on_hold status.

* Added tests for generic non comp business line to the business line spec. Also added incomplete_tasks to the vha businessline spec tests.

* Fixed a typo in the controller for the in progress issue types key in the filtering hash.

* Updated reviews spec test and added a test for a non vha business line to make sure on_hold tasks still appear in the in progress tab and that the incomplete tab is not present.

* Storybook file updates for Noncomp.

* Updated the NonCompTabs jest test file.

* Updated NonCompTabs jest test for both vha and generic businesslines.

* Removed unused import.

* Added more expect statements to the reviews spec feature test to check the incomplete tab description and a check to make sure that it is using the correct filter information from the backend for each tab.

* Removed some commented out code. Removed some todos. Fixed some code climate issues.

* Fixed a lot of tests that were failing because the swap to VhaBusinessLine instead of using BusinessLine.create or similar factory bot methods in test setup. Fixed a bug where the completed tab index is now 2 instead of 1 for vha since there are 3 tabs now. It still guesses that it is the last tab or 1. Added a couple of todos related to possibly overriding methods in business line to make sure VhaBusinessLine is created correctly. Added businessline config to show.html.erb for determining the tab and preventing a possible error.

* More testing changes for VhaBusinessLine.

* Made some small updates to the veterans_health_administration seed file to attepmt to fix test setup failures and some other small code climate fixes.

* Changed VhaBusinessLine singleton a to more closely resemble what happens in the has_business_line concern.

* Updated sanitized json file so that the VhaBusinessLine has the correct type on it.

* Altered the wrong json block to the VhaBusinessLine type and fixed it.

* Changed sanitize to sanitize_sql and updated a jest test to use the renamed constant.

* More spec test updates to deal with the VhaBusinessLine subclass and decision review task serializer changes.

* Removed import and todo.

* Another attempt at fixing the brakeman warning.

* Yet more attempts to fix brakeman warning.

* Brakeman really doesn't like string interpolation.

* Fixed a bug where the assigned_to field was set to business_line_id instead of parent in the business line model class.

* Fixed a rare css bug where the user dropdown menu could be blocked by the search bar div in the decision review queue.

* Rewrote some of the issue type count to use arel to avoid brakeman warnings.

* Refactored some repeated code into the issue count helper method.

* Removed a couple of todo statements. Rewrote the issue type count method to use active record instead of an SQL string block.

* Removed another todo block.

* Added a VhaBusinessLine migration.

* Made a couple of small code refactors and moved the require_dependency to the bottom of the business_line.rb file instead of in the decision_reviews_controller.

* Removed commented out code in user.rb model.
@codeclimate
Copy link

codeclimate bot commented Sep 7, 2023

Code Climate has analyzed commit fa7ce10 and detected 137 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 64
Duplication 4
Security 1
Style 65
Performance 3

Note: there are 2 critical issues.

View more on Code Climate.

HunJerBAH and others added 12 commits September 7, 2023 15:37
We do not want the ability to add a decision date to a withdrawn
issue. So we need to update the conditional to exclude withdrawn
issues from having the AddDecisionDate action.

We also will remove the showNoDecisionDateModal for withdrawn issues.
* Added a change to the banner to make the text say Establish instead of Save

* Changed the banner to also change to establish which withdrawn issues

* Changed the button text to establish with withdrawn issues

* Altered the vha flash success message for the claim review controller to more accurately reflect how the user altered the claim's issues. Updated the no decision date feature spec file to reflect these changes. Also added in a withdraw issue to the existing test for more edge case code coverage. Fixed a line length lint issue in addIssues.jsx. Renamed the no decision date feature spec file.

* Added one more expectation to verify that the add decision date action is removed from withdrawn issues.

* Updated a json seed file to the correct subclass type for the new VhaBusinessLine.

---------

Co-authored-by: = <tyler.broyles@va.gov>
…APPEALS-17497-v6-ratings-rework-APPEALS-15376
…APPEALS-17497-v6-ratings-rework-APPEALS-15376
@TylerBroyles TylerBroyles deleted the combined/APPEALS-17497-v6-ratings-rework-APPEALS-15376 branch February 27, 2024 23:55
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.