Edgewall Software

Changes between Version 30 and Version 31 of TracTicketsCustomTimeFields


Ignore:
Timestamp:
Apr 24, 2010, 9:09:20 PM (14 years ago)
Author:
hoff.st@…
Comment:

more editorial changes, format corrections and re-arrangement of text sections

Legend:

Unmodified
Added
Removed
Modified
  • TracTicketsCustomTimeFields

    v30 v31  
    11= Custom Ticket Time Fields  =
    22This page presents information on adding a new type 'time' to the list of all currently available [wiki:TracTicketsCustomFields custom ticket fields].
     3
     4== Alternative approaches ==
     5Making a long story short: They are there for years to cure the lack of custom time fields for various project management purposes. I've seen them, but I don't like all the string manipulation, at least, if it comes to queries and report generation. I met others feeling the same.
     6
     7Believe me, it's time for a sane extension of current custom fields support. And custom time fields backed by true POSIX microsecond time stamps stored in ticket_custom db table is the best way I could think of. Read on and, if you like it, join in to make it happen, please.
    38
    49== Proposed Implementation ==
     
    3742
    3843==== Code ====
    39 Patches against Trac trunk are published as Mercurial queue at bitbucket.org now:
    40 
    41  http://bitbucket.org/hasienda/custom-time/
    42 
    43 ''base'': patches apply cleanly to Trac trunk r~~9443~~9478, cloned/pulled from rblank's Mercurial repository at bitbucket.org.[[BR]]
     44''base'': patches apply cleanly to Trac trunk ~~r9443~~ r9478[[BR]]
    4445''quality'': beta - read: code flaws should have not much effect, at least not to trac db, '''start of testing announced on 21-Apr-2010''', now expect on only minor changes to core of implementation until my stable release[[BR]]
    4546''focus'': bug-fixes, working ticket change notification for both [TracNotification Trac Notification] system and [th:wiki:AnnouncerPlugin AnnouncerPlugin][[BR]]
    46 ''reviews'': so far just me, I need your help now
     47''reviews'': so far just me, I need your help now[[BR]]
    4748''prospect'': hopefully merge with Trac trunk for official release with any of version 0.12.x or even 0.13
    4849
    49 You're invited to pull right now, but save a backup of your db before testing, please. I never broke the db of my development system. There might still lure some serious bugs, that I'm currently not aware of but could hit you, so you may need the data to recover from a bad db state. You've been warned. See [#KnownBugs Known Bugs] for more details.
     50This is work in progress. Proposed code changes for Trac trunk reside in a Mercurial repository at bitbucket.org ^note 1^. The Mercurial Queue (MQ) aside that repo is the patch stack itself with some meta-data ^note 2^:
     51
     52 http://bitbucket.org/hasienda/custom-time/
     53
     54The repo will be more or less behind current SVN HEAD most of the time, while the MQ linked above is updated quite often to reflect the development of custom time field support ^note 3^.
     55
     56You're invited to pull right now, but save a backup of your db before testing, please. I never broke the db of my development system. However, there might still lure some serious bugs, that I'm currently not aware of but could hit you, so you may need your backup to recover from a bad db. You've been warned. See [#KnownBugs Known Bugs] for more details.
    5057
    5158Feedback could happen through
    52  * chat, while I'm arround in IRC channel #trac at freenode.net
     59 * chat, while I'm around in IRC channel #trac at freenode.net (nickname: hasienda)
    5360 * edits to (the discussion section of) this wiki page
    5461 * comments to #1942
    55  * work on publicly reachable clone of my Mercurial Queue
     62 * work on a publicly reachable clone of my Mercurial Queue
    5663 * private e-mail
    5764 * push to my Mercurial Queue after initial per-developer arrangement inside bitbucket.org
    5865
    59 I urge you to report back on any failure from your testing. Any feedback will help to make the patches ready for production and later bring the code into Trac itself. That was my goal right from the start, not produce just another [http://trac-hacks.org Trac hack].
     66I urge you to report back on any failure from code review or your testing. For test results, as always, mention your local setup (Trac version/revision, if not taken from my repo, Mercurial revision id of the patches). Any feedback will help to make the patches ready for production and later bring the code into Trac itself. That was my goal right from the start, not to produce just another [http://trac-hacks.org Trac hack].
    6067
    6168===== Notes =====
    62 1. The common setup for Mercurial Queue puts patches into a Mercurial repo on their own. So looking at [http://bitbucket.org/hasienda/custom-time/changesets the changes] during development is easy.
    63 2. Since there is no other sane way to push the changes to a repository without making them irreversible, I'll not dare to push anythink else (i.e. real revisions) to my repo before substantial clearing with core Trac developers. Still more patch files will get published somehow (starting with #9209).
     691. My repository is a clone of rblank's Mercurial repository, that in turn consists of changesets imported from Trac SVN repo.
     702. The common setup for Mercurial Queue puts the patches into a Mercurial repo on their own. So looking at [http://bitbucket.org/hasienda/custom-time/changesets the changes] during development is easy.
     713. Since there is no other sane way to push the changes to a public repository without making them irreversible, I'll not dare to push real revisions before substantial clearing with core Trac developers. Some of the patches will get forwarded independently for early, stepwise adoption into Trac, like that published in #9209).
    6472
    6573==== !HowTo testing ====
    66 For help on applying the patches to Trac trunk source the traditional way, i.e. with {{{patch}}}, look at the patch documentation in the [http://bitbucket.org/hasienda/custom-time/src/tip/series series] file. But you'll see, Mercurial will save you and me much time and hassle, even more for true collaboration on bugs and feature requests.
    67 
    68 For the lazy ones I recommend to just use Mercurial along the lines of the following walk-through (Debian way).
     74For help on applying the patches to Trac trunk source the traditional way, i.e. with {{{patch}}}, look at the patch documentation in the [http://bitbucket.org/hasienda/custom-time/src/tip/series series] file.
     75
     76But you'll see, Mercurial will save you and me some time and hassle, even more for true collaboration on bugs and feature requests. For the lazy or impatient ones not familiar with Mercurial I recommend to go along the lines of the following walk-through (Debian way).
    6977
    7078===== Before you start =====
    71 I can't guarantee and so can't be responsible on behalf of you for actions on your system. Please understand, what you type and think twice. Be careful especially while you act as root, and at the very least '''don't blame me''' for any mess YOU did.
     79I tested this on my own, really, but can't guarantee and so can't be responsible on behalf of you for any action on your system. Please try to understand, what you type and think twice. Look at documentation I referenced as [#Externalrelatedresources external related resources] at the bottom of this page. Be careful especially while you act as root, and at the very least '''don't blame me''' for any mess YOU did.
    7280
    7381===== Quickstart =====
     82I assume that you'll have all pre-requisites like Python, setup-tools, Genshi and optionally Babel for the i18n support in place. If you're unsure or have issues with following procedure, look at the current [wiki:TracInstall Trac Install Guide] before crying at me.
     83
    7484{{{
    7585$> apt-get install mercurial
     
    92102$> env LANG=de_DE.UTF-8 /usr/local/bin/tracd -d -s --port 8000 /trac-environments/sandbox
    93103}}}
     104
    94105That will
    95106 * install Mercurial, if not installed before,
     
    98109 * copy patched sources to a build dir,
    99110 * build Trac with custom time fields support and
    100  * install it to your system,
    101 provided you have root permission or equivalent with sudo.
    102 
    103 I assume you have other pre-requisites like Python, setup-tools, Genshi and Babel (for i18n support) installed before. If you have issues, first look at the current [wiki:TracInstall Trac Install Guide].
    104 
    105 Install to /usr/local will normally overrule any other Trac installation without replacing it.
    106 
    107 Second {{{hg -v qpush}}} command is optional, but recommended to get verbose information from Trac log file, when Trac is configured with loglevel DEBUG, i.e. with a section in your trac.ini like the following:
     111 * install it to your system, provided you have root permission or equivalent with sudo and last but not least
     112 * fire up the standalone webserver tracd hosting a trac environment you've prepared before.
     113
     114You may have {{{/usr/bin/tracd}}} and {{{/usr/local/bin/tracd}}} than at different versions. Install to /usr/local will normally overrule the other Trac installation without replacing it. So calling just {{{tracd}}} will kick {{{/usr/local/bin/tracd}}}. However, just make sure, you always know, what is going on. (I mention all this because I messed up on my own and now refrain from having multiple versions at the same system at a time.)
     115
     116Second {{{hg -v qpush}}} command from above is optional, but recommended to get verbose information from Trac log file, when Trac is configured with log level DEBUG, i.e. with a section in your trac.ini like the following:
    108117{{{
    109118[logging]
     
    112121log_type = file
    113122}}}
    114 (see: [wiki:TracLogging Trac Logging] for more details on the matter)
     123See [wiki:TracLogging Trac Logging] for more details on the matter.
    115124
    116125==== Known Bugs ====
    117 Problems (with priority) occurring arround ticket changes
     126Issues (with priority) occurring around ticket changes
    118127 * (B) [TracNotification Trac Notification] system unpatched, need to test and investigate, if necessary at all
    119  * (B) fix [th:wiki:AnnouncerPlugin AnnouncerPlugin], that already worked before introducing datetime.datetime format for all internal time variables
     128 * (B) [th:wiki:AnnouncerPlugin AnnouncerPlugin] non-functional, that already worked before introducing datetime.datetime format for all internal time variables
    120129fixed:
    121130 * {{{TypeError: unsupported type for timedelta microseconds component: unicode}}} on TracQuery: simply needed to take care for conversation of variable type 'string' to a number and handle custom time values in trac/ticket/templates/query_results.html separately from standard time fields
     
    136145 * add jQuery datepicker function to custom time fields or even more general to input forms for time stamps like was requested in a [http://trac.edgewall.org/ticket/1942#comment:18 comment to ticket #1942]
    137146
    138 === Related Trac Plugins ===
    139  * [th:wiki:CustomFieldAdminPlugin CustomFieldAdminPlugin], modified version to ease the setup for new field type, private patch done
    140  * [th:wiki:DateFieldPlugin DateFieldPlugin] working flawlessly with custom time fields, since these are still simple text input form fields
    141  * [th:wiki:AnnouncerPlugin AnnouncerPlugin], modified version produces reports with pretty date/time strings, private patch done
    142 
    143147=== Discussion ===
    144148==== Development questions ====
     
    193197      Re-based on r9478 meanwhile, nothing to update inside my patches. Nice. Time to move on.
    194198
    195 == Alternative approaches ==
    196 in short: They are there for years to cure the lack of custom time fields for various project management purposes. I've seen them, but I don't like all the string manipulation, at least, if it comes to queries and report generation. I met others feeling the same.
    197 
    198 Believe me, it's time for a sane extension of current custom fields support. And custom time fields backed by true POSIX microsecond time stamps stored in ticket_custom db table is the best way I could think of. Join now, to make it happen, please.
     199== Related Trac plugins ==
     200 * [th:wiki:CustomFieldAdminPlugin CustomFieldAdminPlugin], modified version to ease the setup for new field type, private patch done
     201 * [th:wiki:DateFieldPlugin DateFieldPlugin] working flawlessly with custom time fields, since these are still simple text input form fields
     202 * [th:wiki:AnnouncerPlugin AnnouncerPlugin], modified version produces reports with pretty date/time strings, private patch done
    199203
    200204== Related tickets ==