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

Case subjects filter MURs #6530

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

johnnyporkchops
Copy link
Contributor

@johnnyporkchops johnnyporkchops commented Oct 30, 2024

Summary (required)

Issue 6500:

  • One single select for Case Subject (primary_subject_id)
  • One single select for Secondary Case Subject (secondary_subject_id) that is only shown and populated when the chosen case subject has secondary subjects
  • Set pagination back to page one upon filter-tag removal in case there are fewer pages in resulting data (otherwise it shows a blank table, example on prod)
  • Alterations to the dropdown_json macro to make it more versatile
  • Alterations to the constants for Audit search to make it work with the altered macro

Issue 6503:

  • Add tooltip to macro and subject filters in MUR template
  • Change language in Case details and documents column for archived MURs

Required reviewers

Required: one frontend
Optional: One UX
@fec-jli - Just to check Audit search

Impacted areas of the application

MUR and ADR detatables

Screenshots

(Include a screenshot of the new/updated features in context (“in the wild”). If it is an interface change, include both before and after screenshots)

How to test

  • Checkout and run branch
  • Test Case subjects filter
  • Filter tag removal:
    • You can remove a secondary subject filter tag to filter only the primary subject for different results
      • Example: remove Corporations from Contributions- Corporations
    • When you remove a primary filter tag that has a secondary subject filter tag too, they are both removed together
      • Example: there is no difference in results between filtering Contributions- Corporations and Corporations because that secondary subject is tied to the primary subject.
      • There is one edge case where the secondary subject Exemptions, exists under two primary subjects. We can address this in the future if necessary
  • Test pagination
  • Confirm new language in Case details and documents column for archived MURs (issue 6503)
  • @fec-jli - Please do a cursory check of Audit search Category and Sub-category selects as there was an adjustment to the constants that build the Category select for this PR.

@johnnyporkchops johnnyporkchops changed the title Case subjects filter MURs?/ADRs Case subjects filter MURs/ADRs Oct 30, 2024
@johnnyporkchops johnnyporkchops marked this pull request as ready for review October 30, 2024 15:17
@@ -1036,3 +988,59 @@
('7', 'Conciliation: Pre Probable Cause'),
('6', 'Conciliation: Probable Cause'),
])


primary_subject_ids = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we name primary_subject_* and secondary_subject_* so they're more clearly tied to audits, audit categories, etc?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rfultz I am not sure I follow, can you give example?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because these subjects are for audits specifically and we're in the constants file for data, could we rename primary_subject_ids to something like audit_primary_subject_id so we know later where and how they're being used and that they aren't simply generic subjects? (primary_subject_ids, secondary_subject_placeholder, secondary_subject_ids)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The constants specific to audits are still named audit_category_options and audit_sub_category_options . The primary/secondary subject constants are specific to MUR/ADR.

@johnnyporkchops johnnyporkchops added this to the 26.5 milestone Oct 31, 2024
@johnnyporkchops johnnyporkchops changed the title Case subjects filter MURs/ADRs [DONT MERGE YET] Case subjects filter MURs/ADRs Oct 31, 2024
Copy link

codecov bot commented Nov 1, 2024

Codecov Report

Attention: Patch coverage is 35.71429% with 9 lines in your changes missing coverage. Please review.

Project coverage is 80.21%. Comparing base (b0a6c41) to head (a50f759).

Files with missing lines Patch % Lines
fec/legal/views.py 0.00% 9 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6530      +/-   ##
===========================================
- Coverage    80.34%   80.21%   -0.13%     
===========================================
  Files          235      235              
  Lines         5113     5125      +12     
===========================================
+ Hits          4108     4111       +3     
- Misses        1005     1014       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@johnnyporkchops johnnyporkchops changed the title [DONT MERGE YET] Case subjects filter MURs/ADRs Case subjects filter MURs Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 👀 Ready
Development

Successfully merging this pull request may close these issues.

Add filter by subjects for MUR and ADR search
2 participants