Feature #14654
closedAllow a bigger range for the gantt timeline
0%
Description
Currently the gantt chart can only display up to 24 months. Every bigger value is ignored and sets the chart back to 6 months.
There is no obvious reason for this constraint, so the possible range should be extended to more than 24 months (maybe 48 or a configurable value).
Files
Related issues
Updated by Daniel Felix over 11 years ago
The limitation is set in this file and line: source:trunk/lib/redmine/helpers/gantt.rb#L65
You can set this value (the second one in the if) to a higher value, for example 49 to define 4 years on a gantt.
Maybe this could be set per option, but this would be a workaround for you to get started.
Updated by Liangfu Chen about 10 years ago
Daniel Felix wrote:
The limitation is set in this file and line: source:trunk/lib/redmine/helpers/gantt.rb#L65
You can set this value (the second one in the if) to a higher value, for example 49 to define 4 years on a gantt.
Maybe this could be set per option, but this would be a workaround for you to get started.
after i modified the line and restarted apache2, it still wouldn't work at all.
i thought there is some problem with the cache, but i've cleared it. left the problem unsolved.
Updated by Toshi MARUYAMA almost 10 years ago
- Related to Feature #9296: User preference for storing offset of month in Gantt added
Updated by nico cruz over 7 years ago
Hi
has this issue still not been solved?
it is important to allow the view of more years in the Gantt diagram
nico
Updated by Go MAEDA almost 7 years ago
- Has duplicate Feature #24550: Open GANTT for more than 24months added
Updated by Yuichi HARADA over 5 years ago
- File settings_gantt_months_limit.png settings_gantt_months_limit.png added
- File gantt.png gantt.png added
- File 14654.patch 14654.patch added
Added "Maximum number of months displayed on the gantt chart" to [Settings] > [Issue tracking].
Make this value the maximum number of months for the Gantt chart.
I attached a patch.
Updated by Go MAEDA over 5 years ago
- File test-for-14654.patch test-for-14654.patch added
- Target version set to Candidate for next major release
Here is a test for the patch attached in #14654#note-6.
Updated by Go MAEDA over 5 years ago
- Status changed from New to Needs feedback
Thank you for the patch.
We should consider the behavior when Setting.gantt_months_limit
is less than 6.
Assume that Setting.gantt_months_limit
is 0. You will see a chart with 6 months long. But you cannot enter the value between 1 and 6 to input#months. In other words, you see 6 months chart but you cannot make the gantt shorter, for example, 5 months. I think the behavior is strange.
Maybe it is better to have a lower limit of Setting.gantt_months_limit
. In my opinion, gantt should behave as if Setting.gantt_months_limit
is 6 when Setting.gantt_months_limit
is less than 6.
I think the lower limit should be 6.
Updated by Yuichi HARADA over 5 years ago
- File 14654_v2.patch 14654_v2.patch added
Go MAEDA wrote:
Maybe it is better to have a lower limit of
Setting.gantt_months_limit
. In my opinion, gantt should behave as ifSetting.gantt_months_limit
is 6 whenSetting.gantt_months_limit
is less than 6.I think the lower limit should be 6.
Thank you for pointing out.
If Setting.gantt_months_limit
is less than 6, gantt has rebuilt the patch to behave as if Setting.gantt_months_limit
is 6.
Updated by Go MAEDA over 5 years ago
- Status changed from Needs feedback to New
- Target version changed from Candidate for next major release to 4.1.0
Setting the target version to 4.1.0.
Updated by Marius BĂLTEANU over 5 years ago
We should move [6, Setting.gantt_months_limit.to_i].max
to a method in order to avoid duplicating the logic in two places (view and lib).
Updated by Go MAEDA over 5 years ago
- Assignee set to Marius BĂLTEANU
Marius BALTEANU wrote:
We should move
[6, Setting.gantt_months_limit.to_i].max
to a method in order to avoid duplicating the logic in two places (view and lib).
I think it is a bit overkill to add a method somewhere. Since the problem I pointed out in #14654#note-8 is really small, I think it is OK to apply the first patch (14654.patch). Marius, what do you think about this approach?
Updated by Marius BĂLTEANU over 5 years ago
Go MAEDA wrote:
Marius BALTEANU wrote:
We should move
[6, Setting.gantt_months_limit.to_i].max
to a method in order to avoid duplicating the logic in two places (view and lib).I think it is a bit overkill to add a method somewhere. Since the problem I pointed out in #14654#note-8 is really small, I think it is OK to apply the first patch (14654.patch). Marius, what do you think about this approach?
No problem for me.
Updated by Go MAEDA over 5 years ago
- Status changed from New to Closed
- Assignee changed from Marius BĂLTEANU to Go MAEDA
- Resolution set to Fixed
Committed the patches.