[rt-users] Time stamp for area change
arclight at jump.net
arclight at jump.net
Wed Oct 4 01:25:40 EDT 2000
On 3 Oct 00, at 12:25, Cameron Murrell wrote:
> Is there a time stamp stored each time the area is changed? I
> have looked through the source, but have not had any luck tracking
> this down. Thanks in advance for your help.
>
> Cameron
Yes, you can find when a ticket's area has changed:
(example:)
# /usr/local/mysql/bin/mysql -u root -p rt
Password: ***********
mysql> SELECT * FROM transactions WHERE type = 'area' AND
actor = 'apthorpe'
-> ;
+------+--------------+------------+----------+------+------------+------------+
| id | effective_sn | serial_num | actor | type | trans_data |
trans_date |
+------+--------------+------------+----------+------+------------+------------+
| 307 | 65 | 65 | apthorpe | area | DNS |
965692014 |
| 1287 | 58 | 58 | apthorpe | area | AU |
970524921 |
| 1314 | 284 | 284 | apthorpe | area | ES |
970593071 |
+------+--------------+------------+----------+------+------------+------------+
3 rows in set (0.01 sec)
The SQL query
SELECT * FROM transactions WHERE type = 'area'
will give you all fields of all transactions where the area was set or
changed; the trans_date field contains the serial time of the change
(seconds since Epoch, midnight 1/1/1970 GMT) which you can
reformat into a more pleasing date.
Look at the source of one of the report generators in the contrib
directory for examples of how to run your own queries against the
RT database.
hth,
-- Bob
More information about the rt-users
mailing list