Skip to content

feat(#10577): adds task filtering#10623

Merged
dianabarsan merged 18 commits intomasterfrom
10577-task-filtering
Feb 16, 2026
Merged

feat(#10577): adds task filtering#10623
dianabarsan merged 18 commits intomasterfrom
10577-task-filtering

Conversation

@dianabarsan
Copy link
Member

@dianabarsan dianabarsan commented Feb 9, 2026

Description

Adds following task filters:

  1. Due date - radio with two options, that show either tasks that are overdue (or due today) or that are due in the future.

  2. Task type - checkboxes for every task type available in the task list

  3. Area - identical to the reports area filter. will filter tasks based on the task owner lineage.

Minor refactor to how we display (and filter) item lineage, changed from being filtered in every component that will display items with lineage to using the store for user facilities and filtering lineage in the lineage pipe itself.

AI Disclosure

AI Assistance: This PR was developed using Claude Code.

How AI was used

  • I instructed Claude to reuse the Reports filters component for tasks, including the types of filters and which fields should be used for filtering
  • Instructed to write unit tests for the new and changed code
  • Instructed to generate an e2e test code skeleton
  • Added translations for all of the new translation keys
  • Instructed and guided through doing a high level refactor of a repeated code pattern (of lineage filtering)

Human oversight:

  • Corrected errors around area filters not being applied correctly
  • Corrected Claude altering existing code behaviors - it switched the area filter from being lazy loaded to being eagerly loaded because it wanted to count the places.
  • Completed e2e test
  • Manually verified the behavior using multiple types of user accounts
  • Reviewed and perfected all code to adhere to my standards

closes #10577

Code review checklist

  • UI/UX backwards compatible: Test it works for the new design (enabled by default). And test it works in the old design, enable can_view_old_navigation permission to see the old design. Test it has appropriate design for RTL languages.
  • Readable: Concise, well named, follows the style guide, documented if necessary.
  • Documented: Configuration and user documentation on cht-docs
  • Tested: Unit and/or e2e where appropriate
  • Internationalised: All user facing text
  • Backwards compatible: Works with existing data and configuration or includes a migration. Any breaking changes documented in the release notes.

Compose URLs

If Build CI hasn't passed, these may 404:

License

The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.

Signed-off-by: Diana Barsan <barsan@medic.org>
Signed-off-by: Diana Barsan <barsan@medic.org>
Signed-off-by: Diana Barsan <barsan@medic.org>
Signed-off-by: Diana Barsan <barsan@medic.org>
Signed-off-by: Diana Barsan <barsan@medic.org>
Signed-off-by: Diana Barsan <barsan@medic.org>
Signed-off-by: Diana Barsan <barsan@medic.org>
Signed-off-by: Diana Barsan <barsan@medic.org>
Signed-off-by: Diana Barsan <barsan@medic.org>
…d improve typings

Signed-off-by: Diana Barsan <barsan@medic.org>
Signed-off-by: Diana Barsan <barsan@medic.org>
Signed-off-by: Diana Barsan <barsan@medic.org>
@dianabarsan dianabarsan marked this pull request as ready for review February 10, 2026 17:48
Signed-off-by: Diana Barsan <barsan@medic.org>
…, e2e tests, and unit tests accordingly

Signed-off-by: Diana Barsan <barsan@medic.org>
… reducer logic and update related tests

Signed-off-by: Diana Barsan <barsan@medic.org>
@dianabarsan dianabarsan requested a review from sugat009 February 11, 2026 13:11
@dianabarsan
Copy link
Member Author

Hi @sugat009 ! Would appreciate a review.

The PR does a bit of centralizing data: with adding facilities and online user type to the redux state.
I used these directly in the work to move removing user facility from breadcrumbs in the lineage pipe instead of scattered around in every component.
However there are more components and places that could benefit from this, but I chose not to address them now (due to the already large size of this PR).
Another thing I really wanted to do was to unify the filters for more reuse - for example add a generic "status" filter and use if for report verification and task overdue. But I think that would be another larger refactor that can wait, especially since @jkuester is working on filtering for the targets page. And refactoring after that lands will make sure we target all filters, not just the ones that exist now.

Let me know what you think. Thanks for your time!

@dianabarsan
Copy link
Member Author

Added demo to main issue.

Copy link
Member

@sugat009 sugat009 left a comment

Choose a reason for hiding this comment

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

Minor feedback.

Signed-off-by: Diana Barsan <barsan@medic.org>
Signed-off-by: Diana Barsan <barsan@medic.org>
@dianabarsan
Copy link
Member Author

Thanks a lot for the review @sugat009 . I pushed most of your suggestions - one exception about using sets for filters. I think that just creates an additional layer of complexity and confusion. We expect filters to be bite-sized and the task list to be something that a human can scroll through.
This is ready for review again, I believe.
I appreciate your time!

@dianabarsan dianabarsan requested a review from sugat009 February 12, 2026 10:09
Copy link
Member

@sugat009 sugat009 left a comment

Choose a reason for hiding this comment

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

@dianabarsan thanks for the changes. LGTM! 🚀🚀🚀

@sugat009
Copy link
Member

@dianabarsan I just noticed something while testing manually. All filters does work but when clicking the "place filters" on the place name it does not check the box. Clicking the box checks the box for the place filter but not when clicking the place name. I've attached a video for clarity.

2026-02-12.18-01-07.mp4

The same issue exists for the place filter in reports as well

@dianabarsan
Copy link
Member Author

@sugat009 the place filter is just reused from reports, so this is "inherited" behavior.

@dianabarsan
Copy link
Member Author

dianabarsan commented Feb 12, 2026

ah, now i saw the italics comment. I'm not sure about this one. the click on the place name is set to open the accordion (to display the lower level of places), so it's already assigned to an action.

@sugat009
Copy link
Member

I see. I think we can keep it as it is.

@dianabarsan dianabarsan merged commit 2e64efc into master Feb 16, 2026
68 of 70 checks passed
@dianabarsan dianabarsan deleted the 10577-task-filtering branch February 16, 2026 13:16
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.

Implement task filtering

2 participants