Skip to content

Commit

Permalink
Evarisk#3304 [Task] fix: display user creat name instead of current user
Browse files Browse the repository at this point in the history
  • Loading branch information
evarisk-micka committed Oct 11, 2023
1 parent 67d3709 commit bee2ef4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions class/digirisktask.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ public function fetchAll($usert = null, $userp = null, $projectid = 0, $socid =
$sql .= " DISTINCT"; // We may get several time the same record if user has several roles on same project/task
}
$sql .= " p.rowid as projectid, p.ref, p.title as plabel, p.public, p.fk_statut as projectstatus, p.usage_bill_time,";
$sql .= " t.rowid as taskid, t.ref as taskref, t.label, t.description, t.fk_task_parent, t.duration_effective, t.progress, t.fk_statut as status,";
$sql .= " t.rowid as taskid, t.ref as taskref, t.label, t.description, t.fk_user_creat, t.fk_task_parent, t.duration_effective, t.progress, t.fk_statut as status,";
$sql .= " t.dateo as date_start, t.datee as date_end, t.planned_workload, t.rang, t.datec as date_c, ";
$sql .= " t.description, ";
$sql .= " t.budget_amount, ";
Expand Down Expand Up @@ -503,7 +503,8 @@ public function fetchAll($usert = null, $userp = null, $projectid = 0, $socid =
$tasks[$obj->taskid]->fk_parent = $obj->fk_task_parent; // deprecated
$tasks[$obj->taskid]->fk_task_parent = $obj->fk_task_parent;
$tasks[$obj->taskid]->duration = $obj->duration_effective;
$tasks[$obj->taskid]->planned_workload = $obj->planned_workload;
$tasks[$obj->taskid]->planned_workload = $obj->planned_workload;
$tasks[$obj->taskid]->fk_user_creat = $obj->fk_user_creat;

if ($includebilltime) {
$tasks[$obj->taskid]->tobill = $obj->tobill;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="riskassessment-task-data">
<span class="riskassessment-task-reference" value="<?php echo $related_task->ref ?>"><?php echo $related_task->getNomUrlTask(0, 'withproject'); ?></span>
<span class="riskassessment-task-author">
<?php $userAuthor = $usersList[$related_task->timespent_fk_user?:$user->id];
<?php $userAuthor = $usersList[$related_task->fk_user_creat?:$user->id];
echo getNomUrlUser($userAuthor); ?>
</span>
<span class="riskassessment-task-date">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@
<div class="riskassessment-task-data" value="<?php echo $related_task->id ?>">
<span class="riskassessment-task-reference" value="<?php echo $related_task->ref ?>"><?php echo $related_task->getNomUrlTask(0, 'withproject'); ?></span>
<span class="riskassessment-task-author">
<?php $userAuthor = $usersList[$related_task->fk_user_creat?:$user->id];
<?php $userAuthor = $usersList[$related_task->fk_user_creat > 0 ? $related_task->fk_user_creat : $user->id];
echo getNomUrlUser($userAuthor); ?>
</span>
<span class="riskassessment-task-date">
Expand Down

0 comments on commit bee2ef4

Please sign in to comment.