adding a task not assigned to anybody works (no default
in the Delegate to field) but then errors show up in
the task list, you're unable to view the task (SQL
error), and it must be deleted by connecting to the DB
and issuing the SQL statement directly.
Also, it would be nice to be able to add tasks not
assigned to anybody, without start/due date, just to
keep them as reminder of things that should be done
later (then a due date and delegate can be assigned)
Logged In: NO
Patch in index.php:
if ($subaction=='doaddtask') {
if ($authed!="true") { Header('Location: ?action=login'); }
$notifyatdate = $notifyatdate_year.$notifyatdate_mo.
$notifyatdate_day;
$startdate = $startdate_year.$startdate_mo.$startdate_day;
$duedate = $duedate_year.$duedate_mo.$duedate_day;
$notifyat = $notifyatdate." ".$notifyattime;
if ($notifysms=="on") { $notifysms="Yes"; } else {
$notifysms="No"; }
if ($notifyemail=="on") { $notifyemail="Yes"; } else {
$notifyemail="No"; }
$sql = 'insert into tasks
(project_id, owner_id, name, description,
startdate, duedate, priority, status, notifyat, notifyemail,
notifysms)
values ('.$project_id.','.$authuser_id.',"'.$name.'","'.
$description.'","'.$startdate.'","'.$duedate.'",'.$priority.','.
$status.',"'.$notifyat.'","'.$notifyemail.'","'.$notifysms.'");';
if (isset($delegates)) {
$ins_id = SQLInsert($sql);
foreach ($delegates as $v) {
$sql = 'insert into delegations (task_id, user_id) values ('.
$ins_id.','.$v.');';
SQLInsert($sql);
maildelegate($v, $ins_id, 0);
}
$notice = ("Task added.");
} else {
$notice = ("Error, cannot delagate. Please fill \"Delaget To\"
form.");
}
}
Logged In: YES
user_id=806718
This is caused when there is no delegation. The SQL at line
29 in sec/tasks/list.inc then returns an ambiguous column
name for task_id and loses its place. This is easily fixed (even
if it took me an hour to find it!) by replacing the statement
with
$sql = 'select distinct
tasks.task_id,project_id,owner_id,name,description,startdate,d
uedate,priority,status,notifyat,notifyemail,notifysms,user_id
from tasks
left join delegations on tasks.task_id=delegations.task_id
where (owner_id='.$authuser_id.'
or delegations.user_id='.$authuser_id.') '.$filter.'
group by tasks.task_id
order by '.$sortby.' '.$sortorder.',startdate desc,
project_id asc';
Logged In: YES
user_id=806718
See release 0.7.6 in patch 946849
https://sourceforge.net/tracker/index.php?
func=detail&aid=946849&group_id=54668 which fixes this
problem
Logged In: YES
user_id=740394
I saw this error, this is a good idea
Logged In: YES
user_id=207268
This can be fixed by applying the following patch:
/tmp> diff -Nur taskware-0.7.5/index.php
/var/www/taskware/index.php
--- taskware-0.7.5/index.php 2003-01-28
12:09:19.000000000 +0100
+++ /var/www/taskware/index.php 2004-06-02
21:32:27.000000000 +0200
@@ -252,6 +252,9 @@
SQLInsert($sql);
maildelegate($v, $ins_id, 0);
}
+ } else {
+ $sql = 'insert into delegations (task_id, user_id)
values ('.$ins_id.',0);';
+ SQLInsert($sql);
}
$notice = _("Task added.");
}