jira/apps/api/plane/tests/unit/utils
Manish Gupta 39856932cd
[WEB-8477] fix(api): filter "Updated At" by updated_at column, not created_at (#9514)
filter_updated_at() passed `created_at__date` as the date term in both its GET
and POST branches, so filtering by "Updated At" actually filtered on the
creation date. Work items updated today but created earlier never appeared under
"Updated At -> is -> today", and the two filters returned identical result sets.

Re-raise of community PR #9323 by @sanjibani, which is approved-ready but cannot
merge because the CLA is unsigned. Original patch and tests carried over
unchanged apart from the two fixes below; credit for the fix is theirs.

Adjustments made while porting:
- test_get_method_targets_updated_at_column asserted the exact key
  "updated_at__date", but date_filter's single-value branch appends a lookup
  suffix ("updated_at__date__contains"), so the assertion always failed. Match
  on the key prefix instead.
- Added the missing trailing newline to the new test file.

Verified on a local canary build: with one work item created 2020-01-01 but
updated today, `?updated_at=2026-07-01;after` now returns 5 while
`?created_at=2026-07-01;after` returns 4 — previously both returned 4. Unit
tests pass (5); 4 of the 5 fail without the source change.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-30 20:30:21 +05:30
..
__init__.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
test_csv_export_sanitization.py fix(api): sanitize XLSX export cells to prevent formula injection (#9224) 2026-06-10 11:32:13 +05:30
test_issue_datetime_filters.py [WEB-8477] fix: created_at/updated_at filters return no work items (#9513) 2026-07-30 19:51:16 +05:30
test_issue_filters.py [WEB-8477] fix(api): filter "Updated At" by updated_at column, not created_at (#9514) 2026-07-30 20:30:21 +05:30
test_order_by_sanitize.py [WEB-8017] fix(security): sanitize order_by on external REST API list endpoints (#9348) 2026-07-09 18:32:53 +05:30
test_order_queryset.py [WEB-8012] fix: prevent ORM group_by/sub_group_by injection in issue endpoints (#9347) 2026-07-13 20:40:01 +05:30
test_paginator.py [WEB-8012] fix: prevent ORM group_by/sub_group_by injection in issue endpoints (#9347) 2026-07-13 20:40:01 +05:30
test_url.py fix: Add docker pytest runner and fix bugs the suite surfaced (#9138) 2026-05-26 01:21:37 +05:30
test_uuid.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
test_xlsx_export_sanitization.py fix(api): sanitize XLSX export cells to prevent formula injection (#9224) 2026-06-10 11:32:13 +05:30