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-50730 : Auto Assign Algorithm Continues when No Available Users are Available #22106

Merged
merged 13 commits into from
Jul 12, 2024

Conversation

IsaiahBar
Copy link
Contributor

@IsaiahBar IsaiahBar commented Jul 8, 2024

Resolves Auto Assign Algorithm Continues when No Available Users are Available

Description

Success banner shows that correspondences have been assigned

Testing Steps

  1. Sign in as RP_SV_283
  2. Navigate to Inbound Ops Team Management Page
  3. Uncheck all Auto Assign permissions for users except for 1
  4. Open up a Rails console
  5. Run these commands:
    current_user = User.system_user
    batch = BatchAutoAssignmentAttempt.create!(user: current_user, status: Constants.CORRESPONDENCE_AUTO_ASSIGNMENT.statuses.started)
    FeatureToggle.disable!(:auto_assign_banner_failure)
    FeatureToggle.disable!(:auto_assign_banner_no_rpt)
    FeatureToggle.enable!(:auto_assign_banner_max_queue)
    aa = CorrespondenceAutoAssigner.new
    aa.perform(current_user_id: current_user.id, batch_auto_assignment_attempt_id: batch.id)
    Expectation is the Auto Assign logic stops when no more Auto Assign users can take on more correspondences.

Frontend validation:

  1. Sign in as RP_SV_283
  2. Navigate to Inbound Ops Team Management Page
  3. Uncheck all Auto Assign permissions for users except for 1
  4. Navigate to Correspondence Cases page
  5. Click the Auto Assign button
  6. Validate that the algorithm stops when the user is at capacity.

lib/caseflow/error.rb Outdated Show resolved Hide resolved
@HunJerBAH HunJerBAH merged commit c8a21e4 into feature/APPEALS-43876-S6 Jul 12, 2024
14 of 17 checks passed
@HunJerBAH HunJerBAH deleted the IsaiahBar/APPEALS-49769 branch July 12, 2024 11:34
KiMauVA pushed a commit that referenced this pull request Jul 12, 2024
…rs 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>
cacevesva added a commit that referenced this pull request Jul 12, 2024
* 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>
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.

None yet

2 participants