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

Save Button Is Not Enabled When VA DOR Date Is Updated #22049

Merged
merged 5 commits into from
Jul 2, 2024

Conversation

vinner57
Copy link
Contributor

@vinner57 vinner57 commented Jun 28, 2024

Resolves Jira Issue Title

Description

Save Button Is Not Enabled When VA DOR Date Is Updated.

Acceptance Criteria

  • Code compiles correctly

Testing Plan

  1. Log into Caseflow as MAIL_TEAM_SUPERVISOR_ADMIN_USER (VACO)
  2. Select Queue and then Correspondence Cases
  3. Select any Veteran under the Veteran Details Column
  4. In the General Information Section Change the VA DOR Date to any other Valid Date
  5. And the save changes button to be enabled
  • 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?

@vinner57 vinner57 changed the base branch from feature/APPEALS-41477-S5 to feature/APPEALS-43876-S6 July 1, 2024 03:59
@cacevesva cacevesva merged commit 0d02e08 into feature/APPEALS-43876-S6 Jul 2, 2024
11 of 17 checks passed
@cacevesva cacevesva deleted the vinner57/APPEALS-49556 branch July 2, 2024 18:42
cacevesva added a commit that referenced this pull request Jul 12, 2024
* Save Button Is Not Enabled When VA DOR Date Is Updated (#22049)

* fix for the save changes button

* fixing jest and rspecs

* fix rspec

* updated parameters in controller to permit batch id (#22084)

* Update explain controller appeal_affinity to test if appeal is a correspondence (#22092)

* added guard clause to response (#22113)

* APPEALS-51209: UAT Test Data Workflow Does Not Create Documents When Creating Correspondences (#22115)

* added guard clause to response

* added document creation to UAT test correspondence workflow

* remove domplexity note creation

* Sivakesh/appeals 48375 (#22064)

* #48376 - Restricted Generate Correspondence button

* #48381 - Restricted correspondence count to 1-40

* #50329 - created auto assign checkbox

* #50330 - generate correspondence functionality

* #50392 - specs for the generate correspondence functionality

* resolved merge conflicts

* lint issues addressed

* #48377 - Jest Tests

* Fix of rubocop offense

---------

Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* Refactor Review Package Frontend (#22073)

* Call the serialized correspondence in Review Package

* Added correspondenceTypes to review_package controller method

* Added has_efolder_failed_task private method to review_package controller method response

* Modified the efolder_upload_failed_before method in backend and frontend as per the comments

* Replacing with serialized methods

* safespot for rollback

* reviewform appearing stable and not regressing

* stable rework point

* Fixed the banner alert when hasEfolderFailedTask is true

* remaning banner updates to the useEffect function

* Modified the change to display correspondenceDocuments array inside the hash of correspondence

* Replaced apiresponse with props

* Adjusted the display intake button to enabled after save changes

* Removed show method

* Commit changes for isEditableDataChanged with prop values

* fixed issue with page load due to out of bounds array accessing

* potential fix for form fields

* Can able to edit notes

* Removed correspondenceDocuments props and utilize the props from correspondence props

* Modified the reviewPackageReducer.js

* fixed params issue. removed unused method. fixed intake appeal logic.

* fixed params issue. removed unused method. fixed intake appeal logic.

* changes variable name from NEW_DATA_CHANGEME to reviewPackageData

* Intake Appeal Button enabled fix

* Fix for Document Type edit form

* Fix for PDF reader when we click on edit link

* fixed params issue

* Removed puts

* Spec fixes for review package controller

* Rubocop fixes

* fixed linting issues

* Fix for form updates for review package

* Changed disable flag.

* fixed intake button logic

* Updated the veteran file number fix

* Modified to previous change for veteran file number fix

* Rubocop fixes

* Lint fix

* Jest fixes

* APPEALS-47125: Refactor frontend (#22102)

* refactored review package to not use editable data

* removed reviewDetails and refactored save button state management

* fixed linting errors in routes page

* refactored review form saving and error handling

* updated efolder check to display review package actions if there is no efolder failed task

* updated props for new props route

* fixed bug where package action wouldn't be created if a review package had closed child tasks

* added safe params

* removed requirement for notes to be filled out in form

* removed unused routes

* resolved linting errors in correspondence test controller

* removed outdated tests

* fixed bug where document type wasn't updating NOD (redux action was disconnected)

* refactored intake button to only show if NOD and the page isn't Read Only

* removed unused document action

* fixed failing lint issues and updated rspec

* Jest tests fixed and working again.

---------

Co-authored-by: divyadasari-va <divya.dasari@va.gov>
Co-authored-by: divyadasari-va <135847343+divyadasari-va@users.noreply.github.com>
Co-authored-by: HunJerBAH <99915461+HunJerBAH@users.noreply.github.com>
Co-authored-by: HunJerBAH <Jeremy.Hunton@va.gov>

* APPEALS-51367: Fixed Bug with Improper Routes in Review Package (#22126)

* Update Scope

* Revert "Update Scope"

This reverts commit 20a6a09.

* updated review package routes

* Intake Updates

* resolved issues on intake spec

---------

Co-authored-by: KiMauVA <Ki.Mau@va.gov>

* APPEALS-50730 : Auto Assign Algorithm Continues when No Available Users are Available (#22106)

* draft pr for error for unassigned auto assign

* fix

* call error method in auto assigner file

* return error method in assign method

* update logger banner

* removed outdated code.

* update spec test from nil to error

* update test

* update auto assigner file

* refactored break condition in auto assigner logic and updated tests

---------

Co-authored-by: HunJerBAH <Jeremy.Hunton@va.gov>
Co-authored-by: HunJerBAH <99915461+HunJerBAH@users.noreply.github.com>

* removed unused task (#22143)

* Ki/APPEALS-42516 - Create Details Page Shell (#22122)

* Reforged

* Reinstante VetCorrespondence

* correspondence_details temporary fix

* Sivakesh/appeals 48375 (#22064)

* #48376 - Restricted Generate Correspondence button

* #48381 - Restricted correspondence count to 1-40

* #50329 - created auto assign checkbox

* #50330 - generate correspondence functionality

* #50392 - specs for the generate correspondence functionality

* resolved merge conflicts

* lint issues addressed

* #48377 - Jest Tests

* Fix of rubocop offense

---------

Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>

* Refactor Review Package Frontend (#22073)

* Call the serialized correspondence in Review Package

* Added correspondenceTypes to review_package controller method

* Added has_efolder_failed_task private method to review_package controller method response

* Modified the efolder_upload_failed_before method in backend and frontend as per the comments

* Replacing with serialized methods

* safespot for rollback

* reviewform appearing stable and not regressing

* stable rework point

* Fixed the banner alert when hasEfolderFailedTask is true

* remaning banner updates to the useEffect function

* Modified the change to display correspondenceDocuments array inside the hash of correspondence

* Replaced apiresponse with props

* Adjusted the display intake button to enabled after save changes

* Removed show method

* Commit changes for isEditableDataChanged with prop values

* fixed issue with page load due to out of bounds array accessing

* potential fix for form fields

* Can able to edit notes

* Removed correspondenceDocuments props and utilize the props from correspondence props

* Modified the reviewPackageReducer.js

* fixed params issue. removed unused method. fixed intake appeal logic.

* fixed params issue. removed unused method. fixed intake appeal logic.

* changes variable name from NEW_DATA_CHANGEME to reviewPackageData

* Intake Appeal Button enabled fix

* Fix for Document Type edit form

* Fix for PDF reader when we click on edit link

* fixed params issue

* Removed puts

* Spec fixes for review package controller

* Rubocop fixes

* fixed linting issues

* Fix for form updates for review package

* Changed disable flag.

* fixed intake button logic

* Updated the veteran file number fix

* Modified to previous change for veteran file number fix

* Rubocop fixes

* Lint fix

* Jest fixes

* APPEALS-47125: Refactor frontend (#22102)

* refactored review package to not use editable data

* removed reviewDetails and refactored save button state management

* fixed linting errors in routes page

* refactored review form saving and error handling

* updated efolder check to display review package actions if there is no efolder failed task

* updated props for new props route

* fixed bug where package action wouldn't be created if a review package had closed child tasks

* added safe params

* removed requirement for notes to be filled out in form

* removed unused routes

* resolved linting errors in correspondence test controller

* removed outdated tests

* fixed bug where document type wasn't updating NOD (redux action was disconnected)

* refactored intake button to only show if NOD and the page isn't Read Only

* removed unused document action

* fixed failing lint issues and updated rspec

* Jest tests fixed and working again.

---------

Co-authored-by: divyadasari-va <divya.dasari@va.gov>
Co-authored-by: divyadasari-va <135847343+divyadasari-va@users.noreply.github.com>
Co-authored-by: HunJerBAH <99915461+HunJerBAH@users.noreply.github.com>
Co-authored-by: HunJerBAH <Jeremy.Hunton@va.gov>

* Update Scope

* Revert "Update Scope"

This reverts commit 20a6a09.

* updated review package routes

* Intake Updates

* Refactor Review Package Frontend (#22073)

* Call the serialized correspondence in Review Package

* Added correspondenceTypes to review_package controller method

* Added has_efolder_failed_task private method to review_package controller method response

* Modified the efolder_upload_failed_before method in backend and frontend as per the comments

* Replacing with serialized methods

* safespot for rollback

* reviewform appearing stable and not regressing

* stable rework point

* Fixed the banner alert when hasEfolderFailedTask is true

* remaning banner updates to the useEffect function

* Modified the change to display correspondenceDocuments array inside the hash of correspondence

* Replaced apiresponse with props

* Adjusted the display intake button to enabled after save changes

* Removed show method

* Commit changes for isEditableDataChanged with prop values

* fixed issue with page load due to out of bounds array accessing

* potential fix for form fields

* Can able to edit notes

* Removed correspondenceDocuments props and utilize the props from correspondence props

* Modified the reviewPackageReducer.js

* fixed params issue. removed unused method. fixed intake appeal logic.

* fixed params issue. removed unused method. fixed intake appeal logic.

* changes variable name from NEW_DATA_CHANGEME to reviewPackageData

* Intake Appeal Button enabled fix

* Fix for Document Type edit form

* Fix for PDF reader when we click on edit link

* fixed params issue

* Removed puts

* Spec fixes for review package controller

* Rubocop fixes

* fixed linting issues

* Fix for form updates for review package

* Changed disable flag.

* fixed intake button logic

* Updated the veteran file number fix

* Modified to previous change for veteran file number fix

* Rubocop fixes

* Lint fix

* Jest fixes

* APPEALS-47125: Refactor frontend (#22102)

* refactored review package to not use editable data

* removed reviewDetails and refactored save button state management

* fixed linting errors in routes page

* refactored review form saving and error handling

* updated efolder check to display review package actions if there is no efolder failed task

* updated props for new props route

* fixed bug where package action wouldn't be created if a review package had closed child tasks

* added safe params

* removed requirement for notes to be filled out in form

* removed unused routes

* resolved linting errors in correspondence test controller

* removed outdated tests

* fixed bug where document type wasn't updating NOD (redux action was disconnected)

* refactored intake button to only show if NOD and the page isn't Read Only

* removed unused document action

* fixed failing lint issues and updated rspec

* Jest tests fixed and working again.

---------

Co-authored-by: divyadasari-va <divya.dasari@va.gov>
Co-authored-by: divyadasari-va <135847343+divyadasari-va@users.noreply.github.com>
Co-authored-by: HunJerBAH <99915461+HunJerBAH@users.noreply.github.com>
Co-authored-by: HunJerBAH <Jeremy.Hunton@va.gov>

* APPEALS-51367: Fixed Bug with Improper Routes in Review Package (#22126)

* Update Scope

* Revert "Update Scope"

This reverts commit 20a6a09.

* updated review package routes

* Intake Updates

* resolved issues on intake spec

---------

Co-authored-by: KiMauVA <Ki.Mau@va.gov>

* APPEALS-50730 : Auto Assign Algorithm Continues when No Available Users are Available (#22106)

* draft pr for error for unassigned auto assign

* fix

* call error method in auto assigner file

* return error method in assign method

* update logger banner

* removed outdated code.

* update spec test from nil to error

* update test

* update auto assigner file

* refactored break condition in auto assigner logic and updated tests

---------

Co-authored-by: HunJerBAH <Jeremy.Hunton@va.gov>
Co-authored-by: HunJerBAH <99915461+HunJerBAH@users.noreply.github.com>

* APPEALS-42516 - Controller Updates, Spec and Route details

* Remove facols file

---------

Co-authored-by: psivakeshva <168677299+psivakeshva@users.noreply.github.com>
Co-authored-by: Christopher Aceves <christopher.aceves@va.gov>
Co-authored-by: Rnmarshall93 <110805785+Rnmarshall93@users.noreply.github.com>
Co-authored-by: divyadasari-va <divya.dasari@va.gov>
Co-authored-by: divyadasari-va <135847343+divyadasari-va@users.noreply.github.com>
Co-authored-by: HunJerBAH <99915461+HunJerBAH@users.noreply.github.com>
Co-authored-by: HunJerBAH <Jeremy.Hunton@va.gov>
Co-authored-by: IsaiahBar <107133331+IsaiahBar@users.noreply.github.com>
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>

* Lint fixes (#22134)

* Lint fixes

* Updated the color variables

* Updated the color variables for hsl values

* Fix for MergeableSelector for corr class

* Fix rubocop offenses

* Continue fixing rubocop offenses

* Update gemfile lint rubocop offense

* MergeableSelector fix for class cf-form-textinput

* Fix for the newly added lint issues

* Fix for the cf-form-textinput lint issue

* Fix for MergeableSelector in team_management.scss

---------

Co-authored-by: divyadasari-va <divya.dasari@va.gov>
Co-authored-by: divyadasari-va <135847343+divyadasari-va@users.noreply.github.com>

* Revert "Ki/APPEALS-42516 - Create Details Page Shell (#22122)"

This reverts commit 667d590.

* Fix flaky lint & specs

---------

Co-authored-by: vinner57 <128258952+vinner57@users.noreply.github.com>
Co-authored-by: HunJerBAH <Jeremy.Hunton@va.gov>
Co-authored-by: HunJerBAH <99915461+HunJerBAH@users.noreply.github.com>
Co-authored-by: psivakeshva <168677299+psivakeshva@users.noreply.github.com>
Co-authored-by: Rnmarshall93 <110805785+Rnmarshall93@users.noreply.github.com>
Co-authored-by: divyadasari-va <divya.dasari@va.gov>
Co-authored-by: divyadasari-va <135847343+divyadasari-va@users.noreply.github.com>
Co-authored-by: KiMauVA <Ki.Mau@va.gov>
Co-authored-by: IsaiahBar <107133331+IsaiahBar@users.noreply.github.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.

2 participants