Due date is used to set an expected time for developers to solve bugs when a tester creates a ticket.
As follows:
(1) download setuptools-0.6c11-py2.4.egg
Shell> easy_install-2.4 setuptools-0.6c11-py2.4.egg
(2) install the datefieldplugin plug-in
Shell> easy_install-2.4 https://trac-hacks.org/svn/datefieldplugin/0.11/
(3) Modify TRAC. ini
Shell> Vim TRAC. ini
[Components]
Datefield. * = Enabled
[Ticket-custom]
Due_date = text
Due_date.date = true
Due_date.label = due date
Due_date.value = mm/DD/YYYY
Due_date.date_empty = true
[Datefield]
Format = mdy
Separator =/
First_day = 1
(4) Modify db_default.py
Purpose: To view the due_date in view tickets.
As follows:
Shell> pwd
/Usr/lib/python2.4/Site-packages/Trac-0.11.2.1-py2.4.egg/TRAC
Modify the default reports query statement in db_default.py. Take one of them as an example.
# Default reports
Select P. value as _ color __,
ID as ticket, summary, component, version, milestone, T. type as type,
Owner, status,
Time as created,
Changetime AS _ changetime, description as _ description,
Reporter as _ reporter, C. Value as due_date
From ticket t
Left join Enum P on p. name = T. priority and P. type = 'priority 'join ticket_custom C on t. id = C. ticket and C. name = 'due _ date'
Where status <> 'closed'
Order by "+ dB. Cast ('p. value', 'int') +" ", milestone, T. type, time
"""),
This article is from the "Notes" blog, please be sure to keep this source http://sunflower2.blog.51cto.com/8837503/1549000
TRAC plug-in --- due date