[horde] Bug in nag 4.2.4?

Jens Wahnes wahnes at uni-koeln.de
Fri Nov 6 10:25:33 UTC 2015


Back when this bug was present, some of our users had deleted parent
tasks such that there are leftover child tasks with dangling references
in the database.  As these tasks with dangling references cannot be
deleted from within Nag (in fact, they cannot even be displayed), we
had to find a fix for that problem. Just in case anyone else is having
that same problem, I would like to share the SQL statement I employed
to remove the bogus references that cause the problem:

update nag_tasks as child left join nag_tasks as parent on
child.task_parent=parent.task_id set child.task_parent='' where
child.task_parent != '' and parent.task_id is null

(I know this isn't exactly rocket science, it's just that I also happen
to know not everyone's familar with self joins on tables. For what it's
worth, this statement works with MySQL/MariaDB, but should be OK with
other database systems, too. Well, maybe not with versions of Oracle
that don't make a distinction between empty strings and NULL values,
but other than that ...)


Jens
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.horde.org/archives/horde/attachments/20151106/5df6de43/attachment.bin>


More information about the horde mailing list