Skip to content

Comments

refact:updated the date filters in delivery and request order#3534

Open
nandkishorr wants to merge 1 commit intodevelopfrom
nandkishorr/fix/order_date_filters
Open

refact:updated the date filters in delivery and request order#3534
nandkishorr wants to merge 1 commit intodevelopfrom
nandkishorr/fix/order_date_filters

Conversation

@nandkishorr
Copy link
Contributor

@nandkishorr nandkishorr commented Feb 17, 2026

Proposed Changes

  • Updated the date filters
  • Update the validation error import

Merge Checklist

  • Tests added/fixed
  • Update docs in /docs
  • Linting Complete
  • Any other necessary step

Only PR's with test cases included and passing lint and test pipelines will be reviewed

@ohcnetwork/care-backend-maintainers @ohcnetwork/care-backend-admins

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced date range filtering for inventory delivery orders and request orders, enabling users to search by specific date intervals for more precise and flexible inventory management.

@nandkishorr nandkishorr self-assigned this Feb 17, 2026
@nandkishorr nandkishorr requested a review from a team as a code owner February 17, 2026 08:14
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 17, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

Two inventory API filter classes have been updated to support datetime range filtering. The created_date filter in DeliveryOrderFilters and the date filter in RequestOrderFilters were switched from basic date filters to DateTimeFromToRangeFilter. An import statement was also consolidated.

Changes

Cohort / File(s) Summary
Inventory Filter Updates
care/emr/api/viewsets/inventory/delivery_order.py, care/emr/api/viewsets/inventory/request_order.py
Both files updated their filter declarations from DateFilter()/DateRangeFilter() to DateTimeFromToRangeFilter(field_name="created_date"), enabling datetime range-based querying. Minor import consolidation and formatting adjustments in delivery_order.py.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description is quite sparse and lacks specifics. While it mentions updating date filters and validation imports, it provides minimal detail about what changed or why. Expand the description to specify which filters were changed (DateFilter/DateRangeFilter to DateTimeFromToRangeFilter), explain the rationale for these changes, and add the missing 'Associated Issue' section referencing the relevant issue.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: updating date filters in delivery and request order viewsets, which matches the file modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch nandkishorr/fix/order_date_filters

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.45%. Comparing base (0d866d3) to head (79e3fee).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3534      +/-   ##
===========================================
- Coverage    75.45%   75.45%   -0.01%     
===========================================
  Files          473      473              
  Lines        21977    21976       -1     
  Branches      2293     2293              
===========================================
- Hits         16582    16581       -1     
  Misses        4877     4877              
  Partials       518      518              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant