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
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
|
sanjibani seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
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)
📝 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 |
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_atsearches now match the correct date field.Tests