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

hotfix/APPEALS-46639: SCT Bulk Assign Backend Pagination & AOD Filter #21850

Closed
wants to merge 19 commits into from

Conversation

TylerBroyles
Copy link
Contributor

@TylerBroyles TylerBroyles commented Jun 7, 2024

Resolves APPEALS-46639

Description

Updated the Task Assignment page for the Specialty Case Team (SCT) to use backend pagination instead of frontend pagination. This includes updates to the UnassignedCasesPage, TaskTable, and QueueTable components as well as additions and modifications to the queue redux store.

Queue Table was also modified to support request caching via redux instead of local component state to further support existing bulk task assignment behavior for backend paginated task retrieval.

Acceptance Criteria

  • Code compiles correctly
  • Tasks are retrieved via backend call instead of all front-loaded.
  • Tasks are default sorted by case type (priority & docket number)
  • Task filtration options are retrieved via the backend and task filtration is for all tasks, not only for tasks visible in the UI.
  • Task sorting is done via the backend, not only for tasks visible in the UI.
  • Behavior should remain the same as the current SCT Bulk Assign Queue, aside from returning to the 15 task limit. Tasks that were assigned should be successfully removed from the queue.
  • Regression testing
    • Judge assign queues are not backend paginated or experience any changes in behavior.
    • Attorney assign queues are not backend paginated or experience any changes in behavior.

Testing Plan

  1. Data setup
# Setup ~ 50 tasks in the SCT queue
FactoryBot.create_list(:specialty_case_team_assign_task, 50)

# Setup 10 or so ACD tasks
FactoryBot.create_list(:specialty_case_team_assign_task,10, :advanced_on_docket)

# Run the cached appeals job so the tasks can be filtered/sorted correctly
UpdateCachedAppealsAttributesJob.perform_now
  1. Login as an SCT USER and navigate to the sct bulk assign queue either through the UI or the url /queue/[YOUR USER CSS_ID]/assign?role=sct_coordinator
    image

  2. Verify that the SCT bulk assign queue is now using backend pagination by clicking the second page of tasks and getting a page load instead of it instantly swapping to a new 15 tasks demonstrating that all the tasks are not loaded already.

  3. Verify that the get parameters are present in the url bar
    image

  4. Verify that the aod cases are at the front of the queue
    image

  5. Verify the aod filter options are present
    image

  6. Verify that sorting and filtering works for the other columns

  7. Verify that the task assignment still works by selecting a few tasks on page 1 and then moving to page 2 and selecting some tasks from a different set of 15 tasks.
    image

  8. Click the assign cases button and verify the success message and that the tasks you assigned are removed from their respective pages.
    image
    image

  9. Login as a judge user and verify that the judge assignment page remains unchanged.

  10. Navigate to the attorney assignment by clicking an attorney from the judge's judge team and verify that the attorney assignment page is also unchanged.

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

…end pagination for the bulk assign tab for the specialty case team.
…and a new redux action to remove tasks from a cached queue state. Also updated queue table to work with the redux caching instead of local state caching.
with the altered task selection redux action. Also added the ability to pass down the redux cache property to queue table. Refactored the UnassignedCasesPage to allow for backend pagination of queue table instead of only working via frontend loaded data from the redux store.
…trait to the task factory for specialty_case_team_assign_tasks. Added the caching combined reducer to the queue table reducers.
…TableBuilder.jsx into a utils file so it can be used in multiple components around the app.
…ue table instead of always setting it to true. Removed some comments from the queueTableCacheSlice removeTaskIdsFromCache reducer method/action. Passed in the new useReduxCache property to TaskTable in the UnassignedCasesPage component for the sct bulk assign queue.
@TylerBroyles TylerBroyles added Stakeholder: VHA Functionality associated with Veterans Health Administration workflows/feature requests javascript Pull requests that update Javascript code ART: VHA Ability to route VHA SCT appeals labels Jun 7, 2024
Copy link

codeclimate bot commented Jun 7, 2024

Code Climate has analyzed commit 2bfe003 and detected 0 issues on this pull request.

View more on Code Climate.

@TylerBroyles TylerBroyles marked this pull request as ready for review June 7, 2024 19:52
@brandondorner brandondorner mentioned this pull request Aug 2, 2024
49 tasks
@brandondorner
Copy link
Contributor

Closed in favor of #22389

@brandondorner brandondorner deleted the hotfix/APPEALS-46639 branch October 15, 2024 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ability to route VHA SCT appeals ART: VHA javascript Pull requests that update Javascript code Stakeholder: VHA Functionality associated with Veterans Health Administration workflows/feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants