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

Feature/appeals 26750 kepler #21142

Merged
merged 237 commits into from
Mar 14, 2024

Conversation

amybids
Copy link
Contributor

@amybids amybids commented Mar 14, 2024

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?

amybids and others added 30 commits October 16, 2023 14:49
* placeholder files exist

* APPEALS-32385 the lever component should be singular

* APPEALS-32385 fixed plurality in the content file
Co-authored-by: SHarshain <spoosa@razortalent.com>
- Allow intial state to be passed into the Lever Reducer
- Add generator to Lever Reducer
- Add functions for Lever Reducer
- Fix test data array

Co-authored-by: Christopher Detlef <>
* Created LeverHistory Component and updated test data

* Fixed name and title, resubmitted styling and testing

---------

Co-authored-by: 631966 <amy.detwiler@va.gov>
* Add toggle switch component

* Added toggle fuctions for ON,OFF and Disable states

* Clean up

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
* Add Lever Reducer test

Co-authored-by: SHarshain <133917878+SHarshain@users.noreply.github.com>
* Lint Fix for toggle

* Add actions to the toggle

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
* Add Lever Buttons
* Add Lever Buttons wrapper
* Add Lever Buttons story and test
* Update Lever Reducer to no longer use lodash
* Update test data
* Add comments for future funtionality

Co-authored-by: Christopher Detlef <>
* fix the syntax in test data

* added new line EOF to fix parse error

* added AdminTabs story to access the InteractableLever

* WIP: nested and toggle. Completed Boolean and field component scenarios

* Uppercase the unit to match the wireframe

* WIP

* Removed the new line

* refactor and move the Scenarios into seperate component

* updated the test data levers

* fixed Id violation

* fix indentation

* match with the feature branch

* add styling for the headers and fixed Header violation

* code cleanup

* Add the label for number

* refactor

* Move the components into a seperate stories, added reducers, additional filters to the lever list

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
* Add functions and function shells for save and cancel buttons

Co-authored-by: Christopher Detlef <>
* Created Distribution Content Area and updated history for implementation.

* Created Distribution Content Area and updated history for implementation.

* Updated test data and static lever implementation.

* Static lever and lever history updates, declared text constants

* Fixed and implementated Static Levers, Updated styling and storybook

* Fixed and added buttons, fixes for static lever wrapper, updated history.

* Implemented interactive levers, updated test data, created jest test

* Updated data for disabled states

* APPEALS-32388 made changes to the affinity days so that the default s… (#19851)

* APPEALS-32388 made changes to the affinity days so that the default selected option is shown and the text box is always shown

* APPEALS-32388 used a ternary statement to make the radio button always display the expected selected value

* Added Exclusion Table, added notes, jest test, styling

* Test Data Fix for history

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>
* Make tests more robust

Co-authored-by: Christopher Detlef <>
#19855)

* error validation for the Number Field and Accessibility violations fix

* Altered the validation message on affinity days component

* added test cases for AffinityDays, BatchSize and DocketTimeGoals components

* Added Dom ID element for the toggle

* fix the lint errors in the component

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
…19889)

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: SHarshain <spoosa@razortalent.com>
* adds case_distribution_lever.rb file

* removes id column from model

* removes migration files

* APPEALS-34066 re-added the case distribution levers migration

---------

Co-authored-by: 631966 <amy.detwiler@va.gov>
* APPEALS-32253. Seeding the case distribution levers table

* APPEALS-32253. Updated the levers data according the requirements

* updated some values in the case distribution levers.

* conditional model validation for new lever object and cleanup

---------

Co-authored-by: SHarshain <spoosa@razortalent.com>
Co-authored-by: 631966 <amy.detwiler@va.gov>
Co-authored-by: Christopher Detlef <>
Co-authored-by: 631966 <amy.detwiler@va.gov>
* Moved Caseflow Distribution work to new directory, fixed imports, created CaseflowDistributionApp file

* Removed AdminTabs, and AffinityDays, BatchSize updates.

* Caseflow Distribution cleanup and Implementing LeversWrapper.

* Component and CSS Updates

* Updated stories and styling

* More styling formatting and moved scss files.

* Further CSS Updates and clean up

* Updated Tests, and Test Data

---------

Co-authored-by: 631966 <amy.detwiler@va.gov>
* Second draft

* APPEALS-34018 Create CDLever Controller and Routing

---------

Co-authored-by: Christopher Detlef <>
Co-authored-by: 631966 <amy.detwiler@va.gov>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>
* adds levermodal update

* adds levermodal story, adds return state in table

* updates logic to parse/compare json, styling, story

* Updated modal styling

* adds jest test for levermodal

* Updated LeverModal Test

---------

Co-authored-by: 631068 <rickybmanus@gmail.com>
* APPEALS-34018 Create CDLever Controller and Routing

* Second draft

* APPEALS-34018 Add alpha of Lever page and update controller spec

---------

Co-authored-by: Christopher Detlef <>
zurbergram and others added 29 commits February 23, 2024 11:51
)

* bring over fix for ordering

* suggested change

* Create 20240130152058_update_case_distribution_levers_is_toggle_active.rb

* Update schema.rb

* Updates to enable levers that are being tested and for null values in is_toggle_active for n/a levers

* Update test.jsx

* Update test.jsx

* updates for Combination levers, missing updates to allow saving of them

* Save combination levers

* Update SaveModal.jsx

* swap over to methods focused on updating a specific attribute of a lever

* change radio to not have value in value

* for radio levers set selectedOption when loading levers

* Update case_distribution_lever.rb

* Update AffinityDays.jsx

* Update case_distribution_lever.rb

* updates to account for is_toggle_active being nullable

* Update case_distribution_levers.rb

* Update case_distribution_levers.rb

* Update case_distribution_levers.rb

* Update case_distribution_levers.rb

* fix validation error messages, Radio levers update redux store correctly

* changing radio enables Save and displays in Save Modal correctly

* fix max values to be 999

* Can save Radio levers successfully

* history entries match frontend

* Update AffinityDays.jsx

* cleanup and comments
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>
* fix units showing when not needed

* Update schema.rb

* APPEALS-38967 minor cleanup of ticket

---------

Co-authored-by: 631966 <amy.detwiler@va.gov>
* APPEALS-38744 added checks for ama hearing case affinity days lever

* APPEALS-38744 refactored logic for ama hearing case affinity days lever

* APPEALS-38744 update method name
* fix units showing when not needed

* Update schema.rb

* APPEALS-38967 minor cleanup of ticket

---------

Co-authored-by: Matthew Roth <roth_matthew@bah.com>
* "adds ama aod original appeals method to scopes"

* "adds conditional to only_genpop_appeals"

* "removes unnecessary copied code"

* "adds comment"

* "Updates to formatting for shovel methods"

* "updates conditional to include correct function, changes scope chain"

* "Updates and adds scope for infinite, test passes"

* "adds infinite method to scopes"

* "created new test scenarios"

* "moves line up"

* "updates distribution scope methods"

* "updates methods"

* "updates rspec to update attribute"

* "updates def and values"

* "updates rspec to new methods"

---------

Co-authored-by: Michael Beard <michael.beard@va.gov>
Co-authored-by: Christopher Detlef <>
Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>
* "init commit for updating not_genpop_appeals"

* "adds new context and updates top ama"

* "updates methods on scopes, adds new appeals, updates specs"

* Updated logic and rspec tests

* APPEALS-38744 rearranged the not_genpop_appeals to only run the not_genpop_appeals query once

* APPEALS-38744 took out puts

* APPEALS-38744 the queries work through binding.pry the tests are failing due to setup issues

* APPEALS-38744 update with new pattern

* APPEALS-38744 added a conditional to make affinity days chained correctly

* APPEALS-38744 more fiddling

* Fix code issues for query structures

* Make returns uniformly arrays of arrays

* flagged error

* "updates hearing docket method to if else"

* "fixes ish respecs adding with_no_held_hearings to the array"

* "cleanup brush brush brush"

---------

Co-authored-by: 631068 <rickybmanus@gmail.com>
Co-authored-by: 631966 <amy.detwiler@va.gov>
Co-authored-by: Christopher Detlef <>
* "updates jest to reflect code changes and updates selector logic"

* "updates savemodal jest"

* "Updates leversActions test, removes redundancies"

* "Updates infinite, omit, and updated value tests"
* APPEALS-42010 fix rspecs

* APPEALS-42010 update specs and address pr suggestions

---------

Co-authored-by: Amy Detwiler <133032208+amybids@users.noreply.github.com>
* Updated seed data

* Updated seed data for days_before_goal_due_for_distribution lever

* Reworked solution and renamed lever to be correct
* APPEALS-26750 commenting out method that was failing in seeds

* APPEALS-26750 added logic for unique veteran too

* APPEALS-26750 updating the seeds to get the params properly

* APPEALS-26750 enabled the call to           create_case_ready_for_more_than_hearing_affinity_days(judge)
* increase the number of digits in the css_id sequence

* modify generated CSS_IDs and sequence to shorten to 12 characters
@amybids amybids merged commit 24ffeb7 into feature/APPEALS-26750-36998 Mar 14, 2024
14 of 17 checks passed
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.

9 participants