SiT! Bugs

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001693SiT!taskspublic2011-08-19 18:102013-07-06 16:39
Reporterjcaldwell 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformWindowsOSWindowsOS VersionXP+Later
Product Version3.64 LTS 
Target VersionFixed in Version 
Summary0001693: Start / End date does not show up
DescriptionWhen I am trying to show all my completed tasks from the drop down box it does not tell me on the list what date the task was completed or started.

tasks.php?user=1&show=completed&sort=&order=

It would be nice if this information filled in automatically.

Steps To Reproducejust goto tasks.php?user=1&show=completed&sort=&order=
Additional InformationIf anyone could also tell me where I can change the settings for tasks that would be great too.
Tagspatch
Attached Filespng file icon dates.png [^] (20,994 bytes) 2011-08-19 18:19


png file icon taskdates.png [^] (27,477 bytes) 2011-08-22 18:57

- Relationships

-  Notes
User avatar (0004235)
paulh (administrator)
2011-08-19 19:52

Am I correct in saying that you haven't defined start and end dates on the task? If so this is 'by design' though I agree perhaps end date should be set to the date the task is completed, what do others think?
(0004241)
jcaldwell (reporter)
2011-08-19 20:42
edited on: 2011-08-19 20:44

That is right, I have not defined start and end points. This is because the way I am using this system is to track small tasks like deploying a system which will take a day or two. I just want a simple way to see how long a task took.

In my opinion, if you don't set a start date you should have it start on the date that you posted it, if you don't set a due date it is not an issue and the end date should be the date it was closed.

User avatar (0004242)
ivan (administrator)
2011-08-20 11:55

I don't agree that tasks should start on the day that you post them. I think it's quite valid to have tasks for which you haven't decided a start date yet.

I think the solution to your problem is to set the start date when you add the task.

The end-date is already set when tasks are marked completed.
(0004252)
jcaldwell (reporter)
2011-08-22 16:09

Start date isnt an issue, the end date is.

It does not show the date on the screen as I posted.
User avatar (0004253)
ivan (administrator)
2011-08-22 18:56

I can't reproduce that, setting a task as complete always sets the end date and displays for me.
(0004254)
jcaldwell (reporter)
2011-08-22 18:57

This is a fresh install
(0004828)
paulvh (reporter)
2013-05-23 15:12

We have been using tasks more this year to manage room setups of computers. The task list as it is in 3.67 is not as complete as we would like it. Here is a patch file to add and expand data in the list

--- /root/sit-3.67/tasks.php 2012-08-18 10:40:26.000000000 -0400
+++ tasks.php 2013-05-23 10:05:34.456749047 -0400
@@ -40,7 +40,7 @@ else
 // 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', 'distribution'));
+$sort = clean_fixed_list($_REQUEST['sort'], array('', 'id', 'owner', 'name', 'priority', 'completion', 'startdate', 'duedate', 'enddate', 'distribution'));
 $order = clean_fixed_list($_REQUEST['order'], array('', 'a', 'ASC', 'd', 'DESC'));
 $incident = clean_int($_REQUEST['incident']);
 $siteid = clean_int($_REQUEST['siteid']);
@@ -240,7 +240,7 @@ else
     echo "</select>\n";
     echo "</form>
";

- $sql = "SELECT * FROM `{$dbTasks}` WHERE ";
+ $sql = "SELECT `{$dbTasks}`.*, `{$dbUsers}`.realname FROM `{$dbTasks}` LEFT JOIN `{$dbUsers}` ON `{$dbTasks}`.owner = `{$dbUsers}`.id WHERE ";
     if ($user != 'all')
     {
         $sql .= "owner='$user' AND ";
@@ -282,7 +282,8 @@ else

     if (!empty($sort))
     {
- if ($sort == 'id') $sql .= "ORDER BY id ";
+ 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,7 +291,7 @@ else
         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 ";
+ else $sql .= "ORDER BY `{$dbTasks}`.id ";

         if ($order == 'a' OR $order == 'ASC' OR $order == '') $sql .= "ASC";
         else $sql .= "DESC";
@@ -339,14 +340,19 @@ if (mysql_num_rows($result) >=1 )
         }

         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')
         {
             echo colheader('priority', $strPriority, $sort, $order, $filter);
             echo colheader('completion', $strCompletion, $sort, $order, $filter);
         }
- echo colheader('startdate', $strStartDate, $sort, $order, $filter);
         echo colheader('duedate', $strDueDate, $sort, $order, $filter);
+ echo colheader('startdate', $strStartDate, $sort, $order, $filter);
+ echo colheader('enddate', $strEndDate, $sort, $order, $filter);
         if ($show == 'completed')
         {
             echo colheader('enddate', $strEndDate, $sort, $order, $filter);
@@ -432,6 +438,10 @@ if (mysql_num_rows($result) >=1 )
             echo "<td>";
             echo "{$task->id}";
             echo "</td>";
+ if ($user == 'all')
+ {
+ echo "<td>".$task->realname."</td>";
+ }
             echo "<td>";
             if (empty($task->name))
             {
@@ -465,6 +475,19 @@ if (mysql_num_rows($result) >=1 )
         if ($mode != 'incident')
         {
             echo "<td";
+ if ($duedate > 0 AND $duedate <= $now AND $task->completion < 100)
+ {
+ echo " class='urgent'";
+ }
+
+ echo ">";
+ if ($duedate > 0)
+ {
+ echo ldate($CONFIG['dateformat_datetime'],$duedate);
+ }
+ echo "</td>";
+
+ echo "<td";
             if ($startdate > 0 AND $startdate <= $now AND $task->completion <= 0)
             {
                 echo " class='urgent'";
@@ -478,21 +501,28 @@ if (mysql_num_rows($result) >=1 )
             echo ">";
             if ($startdate > 0)
             {
- echo ldate($CONFIG['dateformat_date'],$startdate);
+ echo ldate($CONFIG['dateformat_datetime'],$startdate);
             }

             echo "</td>";
+
             echo "<td";
- if ($duedate > 0 AND $duedate <= $now AND $task->completion < 100)
+ if ($enddate > 0 AND $enddate <= $now AND $task->completion <= 0)
             {
                 echo " class='urgent'";
             }
+ elseif ($enddate > 0 AND $enddate <= $now AND
+ $task->completion >= 1 AND $task->completion < 100)
+ {
+ echo " class='idle'";
+ }

             echo ">";
- if ($duedate > 0)
+ if ($enddate > 0)
             {
- echo ldate($CONFIG['dateformat_date'],$duedate);
+ echo ldate($CONFIG['dateformat_datetime'],$enddate);
             }
+
             echo "</td>";
         }
         else

- Issue History
Date Modified Username Field Change
2011-08-19 18:10 jcaldwell New Issue
2011-08-19 18:19 jcaldwell File Added: dates.png
2011-08-19 19:52 paulh Note Added: 0004235
2011-08-19 19:52 paulh Status new => feedback
2011-08-19 20:42 jcaldwell Note Added: 0004241
2011-08-19 20:42 jcaldwell Status feedback => new
2011-08-19 20:44 jcaldwell Note Edited: 0004241 View Revisions
2011-08-20 11:55 ivan Note Added: 0004242
2011-08-22 16:09 jcaldwell Note Added: 0004252
2011-08-22 18:56 ivan Note Added: 0004253
2011-08-22 18:57 ivan File Added: taskdates.png
2011-08-22 18:57 jcaldwell Note Added: 0004254
2013-05-23 15:12 paulvh Note Added: 0004828
2013-07-06 16:39 ivan Tag Attached: patch


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker