Trac on ndl.uva.netherlight.nl
Configuration of Trac on NDL.uva.netherlight.nl:
Local Repository
Trac needs a subversion respository on the same machine. After some shouting and screaming, I got "svk" working, which is able to make a mirror of the repository:
rm -rf .svk; rm -rf svk; mkdir svk
svk depotmap --relocate // /home/ndl/svk
# Repository /home/ndl/.svk/local does not exist, create? (y/n)n
# Repository /home/ndl/svk does not exist, create? (y/n)y
svk depotmap --list
svk mirror https://svn.uva.netherlight.nl/projects/ndl //ndl
svk sync -s 2 //ndl
# The 2 results that the revision numbers match, at the cost that revision 1 is not stored in the local repository.
svk mirror --list
Then, I configured trac:
/var/trac/ndl/conf/trac.ini:
[trac]
repository_dir = /home/ndl/svk/ndl
Permissions
- disable anonymous wiki and ticket modification to don't encoureage spammers
- disable anonymous browser, changset, file and log view as we are not sure if the code can be made public.
- added roadmap and report admin for authenticated users
trac-admin /var/trac/ndl:
permission remove anonymous WIKI_MODIFY WIKI_CREATE TICKET_MODIFY
permission remove anonymous BROWSER_VIEW CHANGESET_VIEW FILE_VIEW LOG_VIEW
permission add authenticated BROWSER_VIEW CHANGESET_VIEW FILE_VIEW LOG_VIEW
permission add authenticated WIKI_MODIFY WIKI_CREATE TICKET_MODIFY
permission add authenticated ROADMAP_ADMIN REPORT_ADMIN CONFIG_VIEW
The final permission list looks like:
User Action
------------------------------
anonymous MILESTONE_VIEW
anonymous REPORT_SQL_VIEW
anonymous REPORT_VIEW
anonymous ROADMAP_VIEW
anonymous SEARCH_VIEW
anonymous TICKET_CREATE
anonymous TICKET_VIEW
anonymous TIMELINE_VIEW
anonymous WIKI_VIEW
authenticated BROWSER_VIEW
authenticated CHANGESET_VIEW
authenticated CONFIG_VIEW
authenticated FILE_VIEW
authenticated LOG_VIEW
authenticated REPORT_ADMIN
authenticated ROADMAP_ADMIN
authenticated ROADMAP_VIEW
authenticated TICKET_MODIFY
authenticated TIMELINE_VIEW
authenticated WIKI_CREATE
authenticated WIKI_MODIFY
Add custom reports
# sqlite3 /var/trac/ndl/db/trac.db
And insert these SQL statements:
INSERT INTO report VALUES(9, NULL, 'Active Tickets Reported by Me', '
SELECT p.value AS __color__,
id AS ticket, summary, component, version, milestone, t.type AS type,
(CASE status WHEN ''assigned'' THEN owner||'' *'' ELSE owner END) AS owner,
time AS created,
changetime AS _changetime, description AS _description,
reporter AS _reporter
FROM ticket t
LEFT JOIN enum p ON p.name = t.priority AND p.type = ''priority''
WHERE status IN (''new'', ''assigned'', ''reopened'') AND reporter = $USER
ORDER BY p.value, milestone, t.type, time
', '
* List all active tickets reported by me by priority.
');
INSERT INTO report VALUES(10, NULL, 'All Tickets Reported by Me', '
SELECT p.value AS __color__,
id AS ticket, summary, component, version, milestone, t.type AS type,
(CASE status WHEN ''assigned'' THEN owner||'' *'' ELSE owner END) AS owner,
time AS created,
changetime AS _changetime, description AS _description,
reporter AS _reporter
FROM ticket t
LEFT JOIN enum p ON p.name = t.priority AND p.type = ''priority''
WHERE reporter = $USER
ORDER BY time
', '
* List all tickets reported by me by submission date.
');
INSERT INTO report VALUES(11, NULL, 'Unassigned Tickets', '
SELECT p.value AS __color__,
id AS ticket, summary, component, version, milestone, t.type AS type,
owner AS owner,
time AS created,
changetime AS _changetime, description AS _description,
reporter AS _reporter
FROM ticket t
LEFT JOIN enum p ON p.name = t.priority AND p.type = ''priority''
WHERE status = ''new''
ORDER BY p.value, milestone, t.type, time;
', '
* List all unassigned or not yet accepted tickets.
* Lots of tickets, ready for you to take and fix.
');
UPDATE report SET query='
SELECT p.value AS __color__,
component AS __group__,
id AS ticket, summary, t.type AS type,
(CASE status WHEN ''assigned'' THEN owner||'' *'' ELSE owner END) AS owner,
milestone, time AS created,
changetime AS _changetime, description AS _description,
reporter AS _reporter
FROM ticket t
LEFT JOIN enum p ON p.name = t.priority AND p.type = ''priority''
WHERE status IN (''new'', ''assigned'', ''reopened'')
ORDER BY (component IS NULL),component, p.value, t.type, time
', description='
This report groups open tickets by component. Tickets are colored according to priority.
A * behind a name means that a ticket is accepted. Tickets without a * are still free
for you to pick and solve.
Last modification time, description and reporter are included as hidden fields
in the RSS export.
', title='Active Tickets by Component' WHERE id =2;
Proper date & time format
I want to replace the hideous "US" dates (06/14/07) with ISO dates (2007-06-14).
Currently, trac formats according to the current locale, but this is not set.
Applied the patch at:
http://trac.edgewall.org/attachment/ticket/1690/trac-0.10.4-ISO8601.2.patch∞
There are no comments on this page. [Add comment]