jira/apps/api/plane/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
..
core chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
exporters fix(api): sanitize XLSX export cells to prevent formula injection (#9224) 2026-06-10 11:32:13 +05:30
filters [WEB-8477] fix: created_at/updated_at filters return no work items (#9513) 2026-07-30 19:51:16 +05:30
instance_config_variables [GIT-243]fix: InstanceConfiguration not created for some keys (#9303) 2026-07-29 19:33:02 +05:30
openapi [SILO-1026] feat: add estimates external API endpoints (#8664) 2026-03-30 15:30:02 +05:30
permissions [WEB-8095] fix: scope page-version reads to the URL project (GHSA-g49r/ghcr) (#9380) 2026-07-16 16:03:06 +05:30
porters fix(api): sanitize XLSX export cells to prevent formula injection (#9224) 2026-06-10 11:32:13 +05:30
__init__.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
analytics_events.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
analytics_plot.py fix: prevent ORM field injection via segment parameter in analytics (GHSA-93x3-ghh7-72j3) (#8864) 2026-04-07 16:04:48 +05:30
build_chart.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
cache.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
color.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
constants.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
content_validator.py fix(api): require at least one alphanumeric char in workspace name (#9278) 2026-06-20 17:36:37 +05:30
csv_utils.py fix(api): sanitize XLSX export cells to prevent formula injection (#9224) 2026-06-10 11:32:13 +05:30
cycle_transfer_issues.py fix: cast avatar_asset to CharField to resolve mixed type errors in URL concatenation (#9512) 2026-07-30 20:29:41 +05:30
date_utils.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
email.py [WEB-5917] fix: generate clean plain text from HTML email template #8535 2026-02-17 00:44:52 +05:30
error_codes.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
exception_logger.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
global_paginator.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
grouper.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
host.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
html_processor.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
imports.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
ip_address.py fix: harden webhook/link/OAuth-avatar SSRF (advisory clusters A/B/C/E) (#9163) 2026-05-31 00:12:23 +05:30
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
issue_relation_mapper.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
issue_search.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
logging.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
markdown.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
order_queryset.py feat(api): add lite list endpoints for projects, members, cycles, and modules (#9410) 2026-07-17 17:40:26 +05:30
otlp_endpoints.py [WEB-7447] feat: migrate CE telemetry from OTLP traces to OTLP metrics (#9156) 2026-05-28 18:34:27 +05:30
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
path_validator.py fix: strip control characters from sanitized filenames (#9151) 2026-07-28 17:52:46 +05:30
timezone_converter.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
url.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
url_security.py fix: harden webhook/link/OAuth-avatar SSRF (advisory clusters A/B/C/E) (#9163) 2026-05-31 00:12:23 +05:30
uuid.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30