wiki:EpochFieldPlugin

Version 8 (modified by matobaa, 3 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 here.

Source

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

Example

epoch field

trac.ini (or 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

[12704] by matobaa on 2013-03-10 15:22:25
closes #10920, included license text for
ContextChromePlugin, EpochFieldPlugin, FieldTooltipPlugin, HideFieldChangesPlugin, MsSqlBackendPlugin, NeighborPagePlugin, QueryUiAssistPlugin, ShowWhenMacro, SnapshotPlugin, StatusHistoryChartMacro, and TracLinksPlugin.
[12520] by matobaa on 2013-01-11 16:57:13
EpochFieldPlugin: PEP8 cleanup
[12498] by matobaa on 2012-12-31 11:59:00
EpochFieldPlugin: add docstring for each option

Author/Contributors

Author: matobaa
Maintainer: matobaa
Contributors:

Attachments (2)

Download all attachments as: .zip