プロジェクト

全般

プロフィール

Vote #80603

完了

Clicking on a parent object in gantt wrongly collapses objects at the same level

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Gantt_34
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
34
version_id:
160
issue_org_id:
32812
author_id:
362529
assigned_to_id:
332
comments:
4
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

We expect that when a parent ticket is collapsed, only tickets of the child hierarchy and below will be collapsed.
Actually, when the parent ticket (#9) is collapsed, "tickets of the child hierarchy and below (#68,#69,#70)" and " ticket in the same hierarchy (#10)" are collapsed.

Reproduce:
!{width:300px;border:1px solid #ccc;}reproduce.png!

|Expect:|Actual:|
|!{width:300px;border:1px solid #ccc;}expect.png!|!{width:300px;border:1px solid #ccc;}actual.png!|


journals

The cause is that the start position (@subject_left@) did not include the width of the folding icon.
Solved by the following patch (Firefox, Chrome, Safari, IE11, Edge confirmed).

<pre><code class="diff">
diff --git a/public/javascripts/gantt.js b/public/javascripts/gantt.js
index ebaaa2b46..efda080ee 100644
--- a/public/javascripts/gantt.js
+++ b/public/javascripts/gantt.js
@@ -231,8 +231,9 @@ function resizableSubjectColumn(){
}

ganttEntryClick = function(e){
- var subject = $(e.target.parentElement);
- var subject_left = parseInt(subject.css('left'));
+ var icon_expander = e.target;
+ var subject = $(icon_expander.parentElement);
+ var subject_left = parseInt(subject.css('left')) + parseInt(icon_expander.offsetWidth);
var target_shown = null;
var target_top = 0;
var total_height = 0;
</code></pre>
--------------------------------------------------------------------------------
Setting the target version to 4.1.1.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Committed the fix. Thank you.
--------------------------------------------------------------------------------


related_issues

relates,Closed,6417,Allow collapse/expand in gantt chart

Admin Redmine さんが3年以上前に更新

  • カテゴリGantt_34 にセット
  • 対象バージョン4.1.1_160 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0