Skip to content

fix: correct Created On date range filter behavior - #3602

Open
harrishragavan wants to merge 1 commit into
frappe:developfrom
harrishragavan:fix/created-on-between-date-filter
Open

fix: correct Created On date range filter behavior#3602
harrishragavan wants to merge 1 commit into
frappe:developfrom
harrishragavan:fix/created-on-between-date-filter

Conversation

@harrishragavan

Copy link
Copy Markdown

Fix: "Created On" Between Date Filter Returns No Results (#3518)

Problem

The Created On filter does not work correctly when the Between operator is selected. Even when records exist within the selected date range, the ticket list incorrectly displays "No data available."

This issue occurs because the front-end does not consistently handle the value emitted by DateRangePicker when constructing the filter value.

Root Cause

DateRangePicker emits the selected date range as a string[] ([startDate, endDate]), while parts of the filtering logic expected a comma-separated string.

As a result:

  • The Between filter value was not parsed consistently.
  • Date range values were processed incorrectly before the filter was applied.
  • An invalid filter value was generated, causing records that fall within the selected date range to be excluded from the results.

Solution

The date range handling has been updated to support both array and string inputs, ensuring the Between filter is parsed correctly regardless of the value format returned by DateRangePicker.

The implementation now:

  • Accepts the string[] value emitted by DateRangePicker.
  • Maintains compatibility with legacy comma-separated string values.
  • Safely handles unexpected or empty inputs.
  • Generates the correct filter value so records within the selected date range are returned as expected.

This restores the expected behavior for the Created On → Between filter while preserving compatibility with existing filter functionality.
image

@mergify

mergify Bot commented Jul 20, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@greptile-apps

greptile-apps Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

Targeted two-file fix for a well-understood parsing mismatch; no side-effects on other filter operators.

Both changed functions now correctly branch on Array.isArray, the ' to ' delimiter detection covers the actual DateRangePicker output format, and legacy comma-separated paths are preserved. No regressions visible in adjacent logic.

No files require special attention.

Reviews (1): Last reviewed commit: "fix: correct Created On date range filte..." | Re-trigger Greptile

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