File tree 2 files changed +14
-2
lines changed
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [ Keep a Changelog] ( http://keepachangelog.com/ )
6
+ and this project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
7
+
8
+ ## [ Unreleased]
9
+
10
+ ### Added
11
+
12
+ - Use real dates as priority over planned dates for tasks and projects
Original file line number Diff line number Diff line change @@ -186,8 +186,8 @@ public function populateGanttItem($record, $type)
186
186
$ item ->type = ($ type == "root-project " ) ? "project " : $ type ;
187
187
$ item ->parent = ($ type == "root-project " ) ? 0 : (($ type == "project " ) ? $ record ['projects_id ' ] : ($ record ["projecttasks_id " ] > 0 ? $ parentTaskUid : $ record ['projects_id ' ]));
188
188
$ item ->linktask_id = ($ item ->type != "project " ) ? $ record ["id " ] : 0 ;
189
- $ item ->start_date = $ record ['plan_start_date ' ] ?? $ _SESSION ['glpi_currenttime ' ];
190
- $ item ->end_date = $ record ['plan_end_date ' ] ?? date ('Y-m-d H:i:s ' , strtotime ($ item ->start_date . ' + 1 day ' ));
189
+ $ item ->start_date = $ record ['real_start_date ' ] ?? $ record [ ' plan_start_date ' ] ?? $ _SESSION ['glpi_currenttime ' ];
190
+ $ item ->end_date = $ record ['real_end_date ' ] ?? $ record [ ' plan_end_date ' ] ?? date ('Y-m-d H:i:s ' , strtotime ($ item ->start_date . ' + 1 day ' ));
191
191
$ item ->text = $ record ['name ' ];
192
192
$ item ->content = isset ($ record ['content ' ]) ? RichText::getSafeHtml ($ record ['content ' ]) : "" ;
193
193
$ item ->comment = $ record ['comment ' ] ?? "" ;
You can’t perform that action at this time.
0 commit comments