Project

General

Profile

Actions

Defect #44643

open

Versions are shown twice (start and due date) without any visual distinction in the calendar

Added by Julius Haman 2 days ago. Updated 1 day ago.

Status:
Confirmed
Priority:
Normal
Assignee:
-
Category:
Calendar
Resolution:
Affected version:

Description

Description

In the calendar, a version is displayed on two different days:

  1. on its due date (effective_date)
  2. on its start date, which is derived from the earliest start date of its assigned issues

Both entries look identical (same icon, same link, no label). Users can't tell which one is the actual due date of the version, so it looks like the version is duplicated or planned on two dates. The second entry is especially confusing because the start date is not set on the version itself.

Suggestion

Possible solutions:

  1. Show only the due date of the version in the calendar.
  2. Keep both, but label or style them differently, e.g. Start: Version 1.0 vs. Due: Version 1.0, or use different icons.
  3. Make it configurable whether the start entry of a version is shown in the calendar at all.

Preferred solution: options 2 and 3 combined. The start entry would be clearly distinguishable, and everyone could decide whether they want to see it at all.

If neither 2 nor 3 is implemented, then at least option 1. The due date is the date that really matters for a version, while the derived start date adds little value and only causes confusion.

Environment

  • Redmine 7.0.2
  • Relevant code: app/views/common/_calendar.html.erb, Redmine::Helpers::Calendar

Screenshots


Files

Actions #1

Updated by Go MAEDA 1 day ago

  • Tracker changed from Feature to Defect
  • Status changed from New to Confirmed

I was able to reproduce this on the current trunk. A version is shown both on its due date and on the earliest start date of its issues.

This is a side effect of an old change rather than intended behaviour. Redmine::Helpers::Calendar#events_on places each event on both its start_date and its due_date, for issues and versions alike:

  • When Version#start_date was added in r428, it simply returned effective_date. The two dates were always the same, so the uniq call in #events_on merged them into a single entry on the due date.
  • In r4574 (Redmine 1.1.0), Version#start_date was changed to return the earliest start date of the version's issues. This was done for the Gantt chart, and the calendar was not taken into account.

The calendar was never designed to show a start date for versions. The template does not distinguish the start entry from the due date entry, as it does for issues. CalendarsController also loads versions only by effective_date, so the start entry appears only when the due date falls within the same period.

I therefore think the right fix is to restore the original behaviour and show versions only on their due date (option 1). This removes the confusion without the need for labels or a new setting.

Actions #2

Updated by Go MAEDA 1 day ago

I have attached a patch that shows versions only on their due date in the calendar.

Redmine::Helpers::Calendar#events= no longer places versions on their start date. Issues are still shown on both their start date and their due date. Because the change is in the helper, it applies to both the project calendar and the calendar block on My page.

Actions

Also available in: Atom PDF