fix(api): filter "Updated At" by updated_at column, not created_at#9323
fix(api): filter "Updated At" by updated_at column, not created_at#9323sanjibani wants to merge 1 commit into
Conversation
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthrough
ChangesUpdated-at filter fix
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
filter_updated_at was passing `created_at__date` as the date_term to date_filter, so the "Updated At -> is -> today" filter checked the issue's creation date instead of its last-modified date. Work items created earlier but updated today silently disappeared from the results. Fix the typo in both the GET and POST branches and add a focused unit test that pins the column name. Refs makeplane#9316
c8c22ca to
d2e8d10
Compare
Summary
filter_updated_atinapps/api/plane/utils/issue_filters.pywas passingcreated_at__dateas thedate_termtodate_filter— a copy-paste fromfilter_created_at. The "Updated At -> is -> today" filter was therefore checking the issue's creation date instead of its last-modified date. Work items created earlier but updated today silently disappeared from the results.The typo was in both the GET and POST branches of
filter_updated_at. Replacedcreated_at__datewithupdated_at__dateand added a focused unit test inapps/api/plane/tests/unit/utils/test_issue_filters.pythat pins the column name.Test plan
TestFilterUpdatedAtcovers the GET, GET-with-CSV, POST, and prefixed-cycle_issue__cases, asserting every emitted filter key referencesupdated_atand none referencecreated_at.tests/unit/utils/continue to apply.Refs #9316
Summary by CodeRabbit
Bug Fixes
updated_atnow matches against the correct update date field for both GET and POST inputs (including date-based filtering).Tests
updated_atfiltering targets the right date field, supports comma-separated and list-style parameters, honors optional prefixes, and treats empty filter values as a no-op.