wiki:EpochFieldPlugin

Version 9 (modified by matobaa, 4 years ago) (diff)

--

Epoch (unix time) field, timezone sensitive

Description

this plugin has two functionality:

  1. Timezone sensitive date&time field
  2. date&time presentation in report

Bugs/Feature Requests

Existing bugs and feature requests for EpochFieldPlugin are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from [download:epochfieldplugin here].

Source

You can check out EpochFieldPlugin from here using Subversion, or browse the source with Trac.

Example

epoch field

trac.ini (or use CustomFieldAdminPlugin):

[ticket-custom]
due = text
due.format = epoch

this plugin uses jquery.datetimeentry.js. Ctrl-Home to current datetime.

epoch report

in trac.ini:

[epochfield]
date_columns = .*_date, .*日付?
datetime_columns = .*_datetime, .*日時
time_columns = .*_time, .*時刻

report query as:

select id, summary, ticket.time,
    a.time as accepted_datetime,
    c.time as closed_datetime,
    c.author as Closer
from ticket
left join (
    SELECT ticket, author, newvalue AS status, max(time) AS time
        FROM ticket_change WHERE field = 'status' and status = 'accepted'
        GROUP BY ticket, newvalue
) AS a on (a.ticket = ticket.id and a.status = "accepted")
left join (
    SELECT ticket, author, newvalue AS status, max(time) AS time
        FROM ticket_change WHERE field = 'status' and status = 'closed'
        GROUP BY ticket, newvalue
) AS c on (c.ticket = ticket.id and c.status = "closed")

Recent Changes

15659 by matobaa on 2016-07-11 16:21:25
EpochFieldPlugin: follows changeset:15474
15101 by matobaa on 2015-12-07 04:04:46
epochfieldPlugin: add "Epoch" Macro;
15088 by matobaa on 2015-12-01 16:00:54
EpochFieldPlugin: fix a bug that epoch format is not hold in custom field admin panel by CustomFieldAdminPlugin
(more)

Author/Contributors

Author: matobaa
Maintainer: matobaa
Contributors:

Attachments (2)

Download all attachments as: .zip