[Tiki-users] A good way of representing record subtypes with trackers

Ilya Perminov <[email protected]>
Newsgroups gmane.comp.cms.tiki.user
Message-ID <CAD63mQacfKpHNyeMxwhapt79N1QO7fBapeaLa9SrkUgvbdmHLg@mail.gmail.com>
Hi,

Imagine we want to represent some events using trackers. Each event
has event class, event timestamp, maybe some other common fields, and
some fields that are specific to its event class.
The classes can be  key press, mouse click, timer event, etc. For a
key press we want to store which key was pressed, for a mouse click we
want to store a mouse position, for a timer event a timer id, etc.
What is a reasonable way of doing this?
I can think of 3 options:
- Put all events to one tracker that has a union of all fields from
all event types. Hide/show class-specific fields based on the selected
event class, probably using rules. This seems a bit hard to maintain,
e.g. if there are 5 class-specific fields for each class and 4
classes, I'll have to define 4 rules with 20 hide/show commands each.
Plugin JQ may help, but I am not sure how to inject it into a standard
tracker item editor.
- Define a tracker per event class and give the common fields the same
names in all the trackers. Plugin List can fetch items from multiple
trackers, so it may work, but I think it is a bit hackish, and plugins
that take only one tracker will not be usable.
- Define one tracker for common fields, one tracker per class for
class-specific fields and link the trackers via item links. This is
how one would do it in a SQL database, but I think doing joins in
TikiWiki is not that easy.

How do people usually handle something like this in TikiWiki?

Thanks,
Ilya
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.