Skip to content

Fix Time Manager filter ignoring configured attribute resolution (#7056) - #7057

Open
meyerlor wants to merge 2 commits into
3liz:masterfrom
meyerlor:fix/timemanager-attribute-resolution
Open

Fix Time Manager filter ignoring configured attribute resolution (#7056)#7057
meyerlor wants to merge 2 commits into
3liz:masterfrom
meyerlor:fix/timemanager-attribute-resolution

Conversation

@meyerlor

@meyerlor meyerlor commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

The filter datetime format was hardcoded to day precision, truncating sub-day resolutions (minutes, hours, seconds) to date-only. This returned no features for non-midnight timestamps.

Use the layer's configured attributeResolution when formatting the filter, clamping only months/years to days so that year-only ('1928') and month-only ('2020-06') strings are still avoided for DATE-typed fields in QGIS Server (#6571).

Fixes #7056

…z#7056)

The filter datetime format was hardcoded to day precision, truncating
sub-day resolutions (minutes, hours, seconds) to date-only. This returned
no features for non-midnight timestamps.

Use the layer's configured attributeResolution when formatting the filter,
clamping only months/years to days so that year-only ('1928') and
month-only ('2020-06') strings are still avoided for DATE-typed fields
in QGIS Server (3liz#6571).
@rldhont

rldhont commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

@meyerlor can you add a test ?

Extract the datetime format map and the filter resolution clamp into a
pure, importable helper (modules/utils/TimeManagerFilter.js) so they can
be unit tested without the moment/jQuery globals of the legacy module.

buildDateFilter and formatDatetime now delegate to the helper; behaviour
is unchanged. Tests cover that sub-day resolutions keep their time of day
(3liz#7056) and that months/years are clamped to a full ISO date so no
year-only or month-only string is emitted for DATE fields (3liz#6571).
@meyerlor

meyerlor commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

@rldhont are JS unit tests fine or do you prefere full e2e?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Time Manager filter is truncated to date-only, ignoring the configured "minutes" attributeResolution

2 participants