nextcloud / nextcloud/tables

In views, filters on date based on a current period are in fact based on the first day of the current period.

Open
#2,275 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage bug
Dominant language
JavaScript
Stars
214
Forks
52
Avg merge
1d 10h
Merged PRs (30d)
82

Description

Steps to reproduce
  1. Create a table with a date column.
  2. Create five lines:
  • one with date in past month,
  • one at first day of current month,
  • one in middle of current month,
  • one at last day of current month;,
  • one in next month.
  1. Create a view.
  2. Apply filters on the date column with condition "superior to", "superior or equal to, "inferior to" then "inferior or equal to".
Expected behavior
  • When filtering date as "superior to" current month, no line where the date is in the current month shall be visible, only lines where the date is in following months.
  • When filtering date as "superior or equal to" current month, every line where the date is in the current and following months shall be visible.
  • When filtering date as "inferior to" current month, no line where the date is in the current month shall be visible, only lines where the date is in previous months.
  • When filtering date as "inferior or equal to" current month, every line where the date is in the previous and current months shall be visible.
Actual behavior
  • When filtering date as "superior to" current month, lines where the date is superior or equal to the second day of the current month are visible.
  • When filtering date as "superior or equal to" current month, every line where the date is in the current and following months are visible. As expected.
  • When filtering date as "inferior to" current month, no line where the date is in the current month is be visible, only lines where the date is in previous months. As expected
  • When filtering date as "inferior or equal to" current month, every line where the date is in previous months are visible and the line where the date is the first day of the current month. Lines where the date is in the current month but superior or equal to the first day of the current month are hidden.

Same issue has been reproduced with "current week", assuming that the first day of the week is Sunday.
Same issue has been reproduced with "current year".

To put it simply, the filter "current period" is in reality "first day of the current period", period being replaced by week, month or year.

Tables app version

1.0.3

Browser

Librewolf 147.0.1-3

Client operating system

Ubuntu 24.04 LTS

Operating system

Linux 5.10.0-35-amd64 x86_64

Web server

None

PHP engine version

PHP 8.3

Database

MySQL

Additional info

Using NextCloud in French, my translations of the contents may be different from their actual wording.

  • NextCloud version: 31.0.8
  • PHP version: 8.3.30
  • MySQL version: 10.11.11

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in a view with date values spanning the current week, month, and year, then trace the date-filter entry point for current-period conditions. Verify the boundary behavior for strict and inclusive comparisons; done means dates throughout the current period are handled consistently with the expected results in the report.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.