Save/restore/add reports via trac-admin
|Reported by:||pkou at ua.fm||Owned by:|
Implementing a customized workflow system in Trac affects almost every feature (timeline, roadmap, reports, tickets, queries) because ticket statuses can be different. While all features can be abstracted from ticket statuses, reports cannot.
A solution for this problem is to give administrator a possibility to update reports when a workflow is changed.
It requires the following changes:
trac-adminshall allow admins to save existing reports in a file;
trac-adminshall allow admins to add new reports from a file;
trac-adminshall allow admins to replace workflow-specific reports from a file.
While (1) and (2) is understandable, it is necessary to define how to distinguish between a report that should be replaced during workflow change (e.g. system report) and a report that should be kept during workflow change (e.g. user report).
- Classify all reports as system and other. User is not able to change report type. By default, all reports that are created by Trac are marked as system. When user creates a report, it is marked as other. When user edits a system report, Trac shows a warning that the changes will be lost after workflow change.
- It requires changes in database (new column type for table report).
- When system reports are replaced, Trac deletes existing system reports first, then creates reports from a file trying to keep recommended report ID that is specified in a file.
- Reserve first N reports as system (e.g. N=30). When user creates a report, it is created in user area and has id>N.
- It requires an upgrade script that moves all reports created by user behind N. As result, report references in wiki will be lost.
report save (system|user) <filename>- save system or user reports to a file;
report add (system|user) <filename>- add system or user reports from a file;
report replace (system|user) <filename>- replace system or user reports from a file.
Thus, when a workflow needs to be changed for a project, admin should take the following steps:
- Specify new workflow in configuration;
- Replace system reports for a project.
Workaround until the feature is not implemented: Update reports by direct database editing using
(In preparation to #869)
Change History (10)
comment:5 by , 16 years ago
|Priority:||normal → low|
|Summary:||Save/restore reports in trac-admin. System vs user reports → Save/restore/add reports via trac-admin|
comment:6 by , 15 years ago
|Component:||trac-admin → report system|
|Keywords:||multiple project added|
|Priority:||low → lowest|