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

Reporting: Custom Case Inventory Report #9723

Closed
10 of 28 tasks
cholly75 opened this issue Nov 22, 2022 · 14 comments
Closed
10 of 28 tasks

Reporting: Custom Case Inventory Report #9723

cholly75 opened this issue Nov 22, 2022 · 14 comments

Comments

@cholly75
Copy link
Collaborator

cholly75 commented Nov 22, 2022

As a court employee, so that I can understand our case data, I need to be able to run reports on cases in DAWSON using multiple criteria.

There are many situations in which the Court requests data around the case inventory in DAWSON that are ad hoc, one-time requests that cannot be satisfied using the current reports available in DAWSON. To begin facilitating self-service for these users and enable better visibility into Court data, we want to provide users with a way to query DAWSON's case inventory using a variety of criteria associated with the case.

Pre-Conditions

Acceptance Criteria

  • Feature is accessible to any internal court user regardless of role

  • User can enter one or more criteria to search DAWSON and return a list of cases that match the criteria selected

  • Criteria available for selection:

    • Case creation date range (date field, required)
      • Start date and End date
    • Notice/Case Type (multi-select, optional)
      • Selectable Values: derived from case type list in DAWSON, organized alphabetically
    • Case Status (multi-select, optional)
      • Selectable Values: derived from all possible case statuses in DAWSON, organized alphabetically
    • Filing Method (single-select, required)
      • Selectable Values: Paper, Electronic, All (default)
  • Results list should display a count of total number of results matching criteria input

  • Results list should indicate what criteria were used to generate the results listed

  • Results list should be sorted in ascending order by Case creation date as default

  • Results list should display the following for each result returned:

    • Docket number (clickable hyperlink to docket record)
    • Case title
    • Case status
    • Case Type
    • Case creation date
    • Assigned Judge (if any)
    • Requested Place of Trial (if any)
    • High Priority flag (if any)
    • Consolidation icon (if any)

Notes

  • Follow-on stories to be aware of: printable/exportable version, sorting the results list, consolidation grouping, saving custom reports
  • Title: Custom Case Report

Tasks

  • Add validation for all properties of a getcustomcaseReportRequest
  • Remove validateCustomCaseInventorySearchFiltersInteractor in place of the entity itself
  • Confirm with UX if end date cannot be in the future
  • Consolidate our use of validation rules for date range stuff.
  • add better types on shared/src/persistence/elasticsearch/getCasesByFilters.ts
  • remove pagination buttons when only one page of results is displayed
  • add maxEndDate being today for the DateRangePicker.tsx
  • Reset initialCustomCaseInventoryReportState state when the user leaves the page.
  • What is the difference between createdAt and receivedAt and what should we be using for the query? (question for court).
  • Test/load cases past 20,000
  • add integration testing
  • add pa11y test
  • change onChange behavior so that unfocusing the date fields is not required to click the "run report" button

Questions

  • Have Mike and Jim run custom queries like the ones described in this story before?
  • What are some reasons for not adding all the items of a case to the case mappings?
  • Can we remove the old Case Inventory Report now that this new feature accommodates both use cases.
  • Is the "highPriority" property on a Case the same field as the "High Priority For Calendaring" column in the custom case report?
    Answer: Yes, confirmed with C.Holly

Test Cases

Story Definition of Ready (Created on 9/26/21)

The following criteria must be met in order for the user story to be picked up by the Flexion development team.
The user story must:

  • Be immediately actionable for the development team
  • Be focused on users
  • Include a narrative. “As a ____, so that I can ______, I need _____.”
  • Include user-centric acceptance criteria that expresses the users' needs
  • Include user-centric testing scenarios
  • Include preconditions (story dependencies)
  • Not include design or technical solutions
  • Include non-standard testing, deployment, documentation, browser, mobile or security requirements, as well as any requirements for 3rd-party integrations

Process: Flexion developers and designers will test if the story meets acceptance criteria and test cases in Flexion dev and staging environments (“standard testing”). If additional acceptance criteria or testing scenarios are discovered while the story is in progress, a new story should be created, added to the backlog and prioritized by the product owner.

Definition of Done (Updated 5-19-22)

Product Owner

UX

  • Business test scenarios have been refined to meet all acceptance criteria
  • Usability has been validated
  • Wiki has been updated (if applicable)
  • Story has been tested on a mobile device (for external users only)

Engineering

  • Automated test scripts have been written, including visual tests for newly added PDFs
  • Field level and page level validation errors (front-end and server-side) integrated and functioning
  • Verify that language for docket record for internal users and external users is identical
  • New screens have been added to pa11y scripts
  • All new functionality verified to work with keyboard and macOS voiceover https://www.apple.com/voiceover/info/guide/_1124.html
  • READMEs, other appropriate docs, JSDocs and swagger/APIs fully updated
  • UI should be touch optimized and responsive for external only (functions on supported mobile devices and optimized for screen sizes as required)
  • Interactors should validate entities before calling persistence methods
  • Code refactored for clarity and to remove any known technical debt
  • Acceptance criteria for the story has been met
  • If there are special instructions in order to deploy into the next environment, add them as a comment in the story
  • Reviewed by UX on a deployed environment.
  • Reviewed by PO on a deployed environment. Can be deployed to the Court's test environment if prod-like data is required. Otherwise deployed to any experimental environment.
  • Deployed to the Court's staging environment.
@cholly75 cholly75 added the WIP label Nov 22, 2022
@cholly75 cholly75 changed the title Reporting: Case Statistics Report Reporting: Advanced Case Inventory Report Nov 23, 2022
@cholly75 cholly75 added Need to Refine UX Needed General UX work is needed (this work does not fall into the 'design' or 'research' bucket) and removed WIP labels Nov 23, 2022
@swongCO swongCO self-assigned this Dec 8, 2022
@swongCO
Copy link
Collaborator

swongCO commented Jan 9, 2023

UX Notes

Mockups:

9723 Mockup - default state.png

9723 Mockup.png

  • Start and end dates are required fields - display appropriate error messages for invalid format and dates
  • Primary btn is disabled unless both date fields have inputs
  • In a UX mob, devs recommended using the combo box for the optional dropdowns
  • Optional dropdowns - the selected items will display beneath the group in dismissible blue pills (like the one on this page) in the order they were selected
  • When a user types into an optional dropdown field (like Case Status), the list should narrow down to match the text; if there are no matches, display "No options" as a result
  • When one or more dropdown filters are selected, the Clear filters link will be enabled
  • Clear filters link will remove all the blue pills
  • After the primary btn is clicked, display the results with the user's criteria
  • Keep the primary btn enabled
  • Add pagination if there is more than one page of results
  • Display pagination component above and below the table
  • Use USWDS pagination components
  • High Priority cases will be indicated by a green check
  • NEED TO DISCUSS WITH DEVS Does the primary btn become inactive again until the user makes a change to any of the criteria since the results are not being automatically refreshed? DONE

For reference - mockup with functionality included in this story and follow up story 9769:

Full Mockup.png

Link to clickable prototype of mockup: https://www.figma.com/proto/DsiP6YBBn3rxCCwFWK8ZjG/USTC-%7C-Reports-%7C-Advanced-Case-Inventory-9723?page-id=93%3A1718&node-id=93%3A3763&viewport=-920%2C-514%2C0.43&scaling=min-zoom&starting-point-node-id=93%3A3763

Figma file, page "Concepts round 6": https://www.figma.com/file/DsiP6YBBn3rxCCwFWK8ZjG/USTC-%7C-Reports-%7C-Advanced-Case-Inventory-9723?node-id=121%3A2462&t=ptGYE0ViSB14lX8g-1

@swongCO
Copy link
Collaborator

swongCO commented Jan 9, 2023

Keeping the UX Needed tag until the outstanding question above has been addressed.

@ttlenard
Copy link
Collaborator

ttlenard commented Jan 17, 2023

Test Cases

1) Court User clicks on the reports dropdown menu; Advanced Case Inventory Report is now available in the dropdown.

  • Log in as any court user
  • Click on the Reports menu

Expected Results:

  • NEW FUNCTIONALITY - A new report option called "Advanced Case Inventory Report" is available in the dropdown picklist.

2) Court User selects the option for Advanced Case Inventory Report; User is navigated to a new report page.

  • Continuing from the previous test, Select the option for the Advanced Case Inventory Report

Expected Results:

  • NEW FUNCTIONALITY - A new page displays for the user and is called Advanced Case Inventory
  • NEW FUNCTIONALITY - There are two date fields and the Petition filing method that are required to be entered
  • NEW FUNCTIONALITY - There are two fields with dropdown menus that are optional; Case Type and Case Status
  • NEW FUNCTIONALITY - No data will be in any of the fields by default (with the exception of "All" being selected for filing method), and no data will be listed in the results.

3) User types in a date in an incorrect format; receives error message

  • Continuing from the previous test, type in a date in an incorrect format from what is required

Expected Results:

  • NEW FUNCTIONALITY - User receives appropriate error message

*Repeat this test by inputting other invalid date options (i.e., end date is before start date). You should receive appropriate validation error messages.

4) User types in dates in correct format; Leaves the default filing method set to All, clicks Run Report; Results list populates correctly.

  • Continuing from the previous test
  • Select a date range
  • Leave the filing method default to All
  • Do not fill out any of the other optional filters
  • Click Run Report

Expected Results:

  • NEW FUNCTIONALITY - The results list populates with Cases in the appropriate date range, and displays cases that were filed both by paper and electronically (you may need to do some spot checking by clicking on the docket number).
  • NEW FUNCTIONALITY - The criteria used to generate the report is displayed for the user
  • NEW FUNCTIONALITY - The default sort order should show the earliest creation date of filing first.
  • NEW FUNCTIONALITY - The total count of results should display on the right side of the screen above the table
  • NEW FUNCTIONALITY - There should be pagination available.
  • NEW FUNCTIONALITY - The results list should have the following columns:
    • Docket Number (with a clickable hyperlink to the docket record)
      • Cases that are consolidated will display the consolidated icon
    • Case Creation Date
    • Case Title
    • Case Status
    • Case Type
    • Assigned Judge
    • Requested place of trial
    • High Priority

5) User types in dates and selects Electronic filing type; Clicks Run Report; Results list populates correctly

  • Continuing from the previous test
  • Click Clear Filters (Results list should reset back to 0)
  • Select a date range
  • Select Electronic
  • Do not fill out any of the optional filters
  • Click Run Report

Expected Results:

  • NEW FUNCTIONALITY - The results list populates with Cases in the appropriate date range, and displays cases that were filed electronically only (you may need to do some spot checking by clicking on the docket number).
  • NEW FUNCTIONALITY - The criteria used to generate the report is displayed for the user
  • NEW FUNCTIONALITY - The default sort order should show the earliest creation date of filing first.
  • NEW FUNCTIONALITY - The total count of results should display on the right side of the screen above the table
  • NEW FUNCTIONALITY - There should be pagination available.
  • NEW FUNCTIONALITY - Column data (explained in the expected results from test case 4) is populated correctly
    • NEW FUNCTIONALITY - Cases that have been marked as high priority have the green check mark and the tooltip when hovering over it.

6) User types in dates and selects Paper filing type; Clicks Run Report; Results list populates correctly

  • Continuing from the previous test
  • Click Clear Filters (Results list should reset back to 0)
  • Select a date range
  • Select Paper
  • Do not fill out any of the optional filters
  • Click Run Report

Expected Results:

  • NEW FUNCTIONALITY - The results list populates with Cases in the appropriate date range, and displays cases that were filed paper only (you may need to do some spot checking by clicking on the docket number).
  • NEW FUNCTIONALITY - The criteria used to generate the report is displayed for the user
  • NEW FUNCTIONALITY - The default sort order should show the earliest creation date of filing first.
  • NEW FUNCTIONALITY - The total count of results should display on the right side of the screen above the table
  • NEW FUNCTIONALITY - There should be pagination available.
  • NEW FUNCTIONALITY - Column data (explained in the expected results from test case 4) is populated correctly
    • NEW FUNCTIONALITY - Cases that have been marked as high priority have the green check mark and the tooltip when hovering over it.

7) User types in dates, selects All for filing type and selects a case type; Clicks Run Report; Results list populates correctly

  • Continuing from the previous test
  • Click Clear Filters (Results list should reset back to 0)
  • Select a date range
  • Select All for filing method
  • Select one case type from the Case type picklist
  • Do not select a Case Status
  • Click Run Report

Expected Results:

  • NEW FUNCTIONALITY - When selecting the Case Type, the picklist for Case Type is organized alphabetically
  • NEW FUNCTIONALITY - The results list populates with Cases in the appropriate date range, displays cases that were filed both paper and electronically.
  • NEW FUNCTIONALITY - The results list should only have cases displayed that match the case type you selected from the step above
  • NEW FUNCTIONALITY - The criteria used to generate the report is displayed for the user
  • NEW FUNCTIONALITY - The default sort order should show the earliest creation date of filing first.
  • NEW FUNCTIONALITY - The total count of results should display on the right side of the screen above the table
  • NEW FUNCTIONALITY - There should be pagination available.
  • NEW FUNCTIONALITY - Column data (explained in the expected results from test case 4) is populated correctly
    • NEW FUNCTIONALITY - Cases that have been marked as high priority have the green check mark and the tooltip when hovering over it.
  • Repeat this test by selecting different case types and ensure that the appropriate case types display in the results.
  • Repeat this test by selecting multiple case types from the case type picklist - ensure that the appropriate case types are displayed in the results.

8) User types in dates, selects All for filing type and selects a case type; Selects a Case Status; Clicks Run Report; Results list populates correctly

  • Continuing from the previous test
  • Click Clear Filters (Results list should reset back to 0)
  • Select a date range
  • Select All for filing method
  • Select one case type from the Case type picklist
  • Select one Case Status from the Case Status picklist
  • Click Run Report

Expected Results:

  • NEW FUNCTIONALITY - When selecting the Case Status, the picklist for Case Status is organized alphabetically
  • NEW FUNCTIONALITY - The results list populates with Cases in the appropriate date range, displays cases that were filed both paper and electronically.
  • NEW FUNCTIONALITY - The results list should only have cases displayed that match the case type you selected from the step above
  • NEW FUNCTIONALITY - The results list should only have cases displayed that match the Case Status you selected from the step above
  • NEW FUNCTIONALITY - The criteria used to generate the report is displayed for the user
  • NEW FUNCTIONALITY - The default sort order should show the earliest creation date of filing first.
  • NEW FUNCTIONALITY - The total count of results should display on the right side of the screen above the table
  • NEW FUNCTIONALITY - There should be pagination available.
  • NEW FUNCTIONALITY - Column data (explained in the expected results from test case 4) is populated correctly
    • NEW FUNCTIONALITY - Cases that have been marked as high priority have the green check mark and the tooltip when hovering over it.
  • Repeat this test by selecting different case statuses and ensure that the appropriate case statuses display in the results.
  • Repeat this test by selecting multiple case statuses from the case status picklist - ensure that the appropriate case statuses are displayed in the results

@cholly75 cholly75 changed the title Reporting: Advanced Case Inventory Report Reporting: Custom Case Inventory Report Feb 6, 2023
@zachrog zachrog self-assigned this Mar 20, 2023
@jasonfu9966 jasonfu9966 self-assigned this Mar 20, 2023
@jimlerza
Copy link
Collaborator

I currently provide a report of "petitions filed - paper vs electronic" each month by running the get-petition-counts script:

npx ts-node shared/admin-tools/elasticsearch/get-petition-counts.js 2023

@swongCO
Copy link
Collaborator

swongCO commented Mar 23, 2023

Updated UX notes after a convo with Jason and Zach. Changes include adding pagination, re-ordering the optional input fields and keeping the primary btn enabled.

@cholly75 @ttlenard

@swongCO swongCO removed the UX Needed General UX work is needed (this work does not fall into the 'design' or 'research' bucket) label Mar 23, 2023
@zachrog
Copy link
Collaborator

zachrog commented Apr 28, 2023

In order to not allow end dates in the future we will not be adding new validation rules but constraining the picker to disable any dates in the future.

@jasonfu9966
Copy link

We are aware of and working on a bug where the app crashes when navigating to high-numbered pages. We have identified the cause of the problem and will be fixing it before completing.

@swongCO
Copy link
Collaborator

swongCO commented May 2, 2023

Discussion today with Chris, Jim and mob on how to handle ES constraints of displaying more than 20,000 results. Decision is to modify the pagination component to only include the current page and "Previous" and/or "Next". Also need to display the pagination below the table.

9723 Mockup - new pagination.png

@jasonfu9966
Copy link

This story will require a migration to expose some fields on cases that are not currently queryable.

@jasonfu9966
Copy link

Implementation of the Consolidated Icon was not included in this story but will be picked up in the next one.

@cholly75
Copy link
Collaborator Author

cholly75 commented May 18, 2023

Doing a search w/ 918 results and paging through the results list (search cases from 6/1/2021 - 6/4/2021, no other filters)

Pages 5 and 10 are blank, all other surrounding pages contain expected results:

image.png

image.png

Additional Info:

Modifying the query to only select paper filings in this range also produces these results, but on different pages (presumably due to the new result count):

image.png

image.png

Modiying the query in that range for only electronic results does not produce this behavior.

CC: @jasonfu9966 @zRogersFlexion

@cholly75
Copy link
Collaborator Author

All other testing passes! Sending this back to In Progress to address/discover root cause of issue mentioned above.

@jasonfu9966
Copy link

re: the last message with the pagination bug:

we have identified the issue and have solutioned a fix for it, and are working on updating tests before redeploying.
great catch!

@zachrog
Copy link
Collaborator

zachrog commented May 19, 2023

Fixed the issue which was caused by paginating through results with the exact same date of creation. Fix has been deployed to test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Closed
Development

No branches or pull requests

10 participants