SiT! Bugs

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001784SiT!taskspublic2012-05-07 09:032012-05-14 04:57
ReporterTomse 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusconfirmedResolutionopen 
PlatformOSOS Version
Product Version3.65 LTS 
Target VersionFixed in Version 
Summary0001784: Show engineer names for "show all tasks"
Descriptionwhen you show all/everyones tasks, it should display who owns the tasks.

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0004486)
paulvh (reporter)
2012-05-14 04:57

Try this

*** /var/sit-3.65/tasks.php Sun Sep 4 12:51:21 2011
--- tasks.php Sun May 13 23:53:07 2012
***************
*** 40,46 ****
  // External variables
  $user = cleanvar($_REQUEST['user']);
  $show = clean_fixed_list($_REQUEST['show'], array('','incidents', 'active', 'completed'));
! $sort = clean_fixed_list($_REQUEST['sort'], array('', 'id', 'name', 'priority', 'completion', 'startdate', 'duedate', 'enddate', 'distributi
on'));
  $order = clean_fixed_list($_REQUEST['order'], array('', 'a', 'ASC', 'd', 'DESC'));
  $incident = clean_int($_REQUEST['incident']);
  $siteid = clean_int($_REQUEST['siteid']);
--- 40,46 ----
  // External variables
  $user = cleanvar($_REQUEST['user']);
  $show = clean_fixed_list($_REQUEST['show'], array('','incidents', 'active', 'completed'));
! $sort = clean_fixed_list($_REQUEST['sort'], array('', 'id', 'owner', 'name', 'priority', 'completion', 'startdate', 'duedate', 'enddate', 'd
istribution'));
  $order = clean_fixed_list($_REQUEST['order'], array('', 'a', 'ASC', 'd', 'DESC'));
  $incident = clean_int($_REQUEST['incident']);
  $siteid = clean_int($_REQUEST['siteid']);
***************
*** 240,246 ****
      echo "</select>\n";
      echo "</form>
";

! $sql = "SELECT * FROM `{$dbTasks}` WHERE ";
      if ($user != 'all')
      {
          $sql .= "owner='$user' AND ";
--- 240,246 ----
      echo "</select>\n";
      echo "</form>
";

! $sql = "SELECT * FROM `{$dbTasks}` LEFT JOIN `{$dbUsers}` ON `{$dbTasks}`.owner = `{$dbUsers}`.id WHERE ";
      if ($user != 'all')
      {
          $sql .= "owner='$user' AND ";
***************
*** 282,288 ****

      if (!empty($sort))
      {
! if ($sort == 'id') $sql .= "ORDER BY id ";
          elseif ($sort == 'name') $sql .= "ORDER BY name ";
          elseif ($sort == 'priority') $sql .= "ORDER BY priority ";
          elseif ($sort == 'completion') $sql .= "ORDER BY completion ";
--- 282,289 ----

      if (!empty($sort))
      {
! if ($sort == 'id') $sql .= "ORDER BY `{$dbTasks}`.id ";
! elseif ($sort == 'owner') $sql .= "ORDER BY realname ";
          elseif ($sort == 'name') $sql .= "ORDER BY name ";
          elseif ($sort == 'priority') $sql .= "ORDER BY priority ";
          elseif ($sort == 'completion') $sql .= "ORDER BY completion ";
***************
*** 290,296 ****
          elseif ($sort == 'duedate') $sql .= "ORDER BY duedate ";
          elseif ($sort == 'enddate') $sql .= "ORDER BY enddate ";
          elseif ($sort == 'distribution') $sql .= "ORDER BY distribution ";
! else $sql .= "ORDER BY id ";

          if ($order == 'a' OR $order == 'ASC' OR $order == '') $sql .= "ASC";
          else $sql .= "DESC";
--- 291,297 ----
          elseif ($sort == 'duedate') $sql .= "ORDER BY duedate ";
          elseif ($sort == 'enddate') $sql .= "ORDER BY enddate ";
          elseif ($sort == 'distribution') $sql .= "ORDER BY distribution ";
! else $sql .= "ORDER BY `{$dbTasks}`.id ";

          if ($order == 'a' OR $order == 'ASC' OR $order == '') $sql .= "ASC";
          else $sql .= "DESC";
***************
*** 339,344 ****
--- 340,350 ----
          }

          echo colheader('id', $strID, $sort, $order, $filter);
+ if($user == 'all')
+ {
+ echo colheader('owner', $strOwner, $sort, $order, $filter);
+ }
+
          echo colheader('name', $strTask, $sort, $order, $filter);
          if ($show != 'incidents')
          {
***************
*** 432,437 ****
--- 438,447 ----
              echo "<td>";
              echo "{$task->id}";
              echo "</td>";
+ if ($user == 'all')
+ {
+ echo "<td>".$task->realname."</td>";
+ }
              echo "<td>";
              if (empty($task->name))
              {

- Issue History
Date Modified Username Field Change
2012-05-07 09:03 Tomse New Issue
2012-05-07 10:51 Tomse Summary Show names for "show all tasks" => Show engineer names for "show all tasks"
2012-05-08 10:07 ivan Status new => confirmed
2012-05-14 04:57 paulvh Note Added: 0004486


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker