Summary | Changing category's name |
Queue | Horde Groupware Webmail Edition |
Queue Version | 1.1.2 |
Type | Enhancement |
State | Rejected |
Priority | 1. Low |
Owners | |
Requester | akerbos (at) freenet (dot) de |
Created | 09/08/2008 (6145 days ago) |
Due | |
Updated | 09/09/2008 (6144 days ago) |
Assigned | |
Resolved | 09/08/2008 (6145 days ago) |
Milestone | |
Patch | No |
State ⇒ Rejected
Priority ⇒ 1. Low
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Groupware Webmail Edition
Summary ⇒ Changing category's name
Type ⇒ Enhancement
State ⇒ New
only way to do a rename is creating a new category, edit every item
you want to have the "new" category and delete the old one afterwards.
/* Of course, I used an SQL-Query to do this, but not everyone does
have admin access to the database Horde is using. */
I think this reflects a design that is imho very poor: Categories seem
not to be referenced with an (guaranteed) unique identifier but with
their name. If you delete a category, existing items are not changed
but are identified as dirty at runtime. In other words, you leave
inconsistent data.
The problem I mentioned can be solved even with this design: If a
category's name is changed (provided there is no conflict), identify
all references and change the value (one query on the item table of
each application using categories).
I couldn't even find out where categories are stored in the database
currently. I would prefer a separate, application independent table
for them, containing ID, name and color (maybe a delete flag if you
want to preserve current behaviour on delete. Would prefer solution
using SQL that sets references to default value on delete). Then,
renaming a category can be done in constant time.
/* Additionally, one may think about features such as
merging/splitting categories or category hierarchy. Those might come
in handy. */