Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update configuration wiki, some descriptions and TracIni macro

  • Loading branch information...
commit 3dbf43d81cc74ff18b06095c3ae41acde60178b7 1 parent f3d4a2f
@lexqt authored
View
14 trac/env.py
@@ -137,18 +137,18 @@ class Environment(Component, ComponentManager):
only sent to the server on HTTPS connections. Use this if your Trac
instance is only accessible through HTTPS. (''since 0.11.2'')""")
- project_name = Option('project', 'name', 'My Project',
- """Name of the project.""")
+ project_name = Option('project', 'name', 'My EduTrac Environment',
+ """Name of the environment.""")
- project_description = Option('project', 'descr', 'My example project',
- """Short description of the project.""")
+ project_description = Option('project', 'descr', 'My example environment',
+ """Short description of the environment.""")
project_url = Option('project', 'url', '',
- """URL of the main project web site, usually the website in which
+ """URL of the main environment web site, usually the website in which
the `base_url` resides. This is used in notification e-mails.""")
project_admin = Option('project', 'admin', '',
- """E-Mail address of the project's administrator.""")
+ """E-Mail address of the environment's administrator.""")
project_admin_trac_url = Option('project', 'admin_trac_url', '.',
"""Base URL of a Trac instance where errors in this Trac should be
@@ -165,7 +165,7 @@ class Environment(Component, ComponentManager):
"""Page footer text (right-aligned).""")
project_icon = Option('project', 'icon', 'common/trac.ico',
- """URL of the icon of the project.""")
+ """URL of the icon of the environment.""")
log_type = Option('logging', 'log_type', 'none',
"""Logging facility to use.
View
24 trac/ticket/api.py
@@ -525,40 +525,40 @@ class TicketSystem(Component):
# <field>.value = <default_value>
default_version = Option('ticket', 'default_version', None,
- """Default version for newly created tickets.""")
+ """NOT USED. Default version for newly created tickets.""")
default_type = Option('ticket', 'default_type', 'task',
- """Default type for newly created tickets (''since 0.9'').""")
+ """NOT USED. Default type for newly created tickets (''since 0.9'').""")
default_priority = Option('ticket', 'default_priority', 'normal',
- """Default priority for newly created tickets.""")
+ """NOT USED. Default priority for newly created tickets.""")
default_milestone = Option('ticket', 'default_milestone', None,
- """Default milestone for newly created tickets.""")
+ """NOT USED. Default milestone for newly created tickets.""")
default_component = Option('ticket', 'default_component', None,
- """Default component for newly created tickets.""")
+ """NOT USED. Default component for newly created tickets.""")
default_severity = Option('ticket', 'default_severity', 'normal',
- """Default severity for newly created tickets.""")
+ """NOT USED. Default severity for newly created tickets.""")
default_summary = Option('ticket', 'default_summary', None,
- """Default summary (title) for newly created tickets.""")
+ """NOT USED. Default summary (title) for newly created tickets.""")
default_description = Option('ticket', 'default_description', None,
- """Default description for newly created tickets.""")
+ """NOT USED. Default description for newly created tickets.""")
default_keywords = Option('ticket', 'default_keywords', None,
- """Default keywords for newly created tickets.""")
+ """NOT USED. Default keywords for newly created tickets.""")
default_owner = Option('ticket', 'default_owner', None,
- """Default owner for newly created tickets.""")
+ """NOT USED. Default owner for newly created tickets.""")
default_cc = Option('ticket', 'default_cc', None,
- """Default cc: list for newly created tickets.""")
+ """NOT USED. Default cc: list for newly created tickets.""")
default_resolution = Option('ticket', 'default_resolution', 'fixed',
- """Default resolution for resolving (closing) tickets
+ """NOT USED. Default resolution for resolving (closing) tickets
(''since 0.11'').""")
def __init__(self):
View
3  trac/ticket/default_workflow.py
@@ -602,7 +602,8 @@ class UserGroupProvider(Component):
implements(IValidUserProvider)
default_owner_realms = ListOption('ticket-workflow-config', 'default_owner_realm', 'team', sep='|',
- doc="""Default owner realms for set_owner ticket actions.""", switcher=True)
+ doc="""Default owner realms for set_owner ticket actions.
+ Available realms: `team` (developers), `manager`.""", switcher=True)
def get_users(self, req, ticket, next_action, realm_key=None, perm_group_key=None):
if realm_key is None:
View
105 trac/wiki/default-pages/TracIni
@@ -3,11 +3,17 @@
[[TracGuideToc]]
[[PageOutline]]
-Trac configuration is done by editing the '''`trac.ini`''' config file, located in `<projectenv>/conf/trac.ini`. Changes to the configuration are usually reflected immediately, though changes to the `[components]` or `[logging]` sections will require restarting the web server. You may also need to restart the web server after creating a global configuration file when none was previously present.
+Configuration in !EduTrac is done in three ways:
+
+ * Environment configuration — by editing the '''`trac.ini`''' config file, located in `<projectenv>/conf/trac.ini`. Changes to the configuration are usually reflected immediately, though changes to the `[components]` or `[logging]` sections will require restarting the web server. You may also need to restart the web server after creating a global configuration file when none was previously present.
+ * Syllabus configuration — by editing the '''`id<id_number>.ini`''' config file, located in `<projectenv>/conf/syllabus` directory.
+ * Project configuration — by editing the '''`id<id_number>.ini`''' config file, located in `<projectenv>/conf/project` directory.
The `trac.ini` configuration file and its parent directory should be writable by the web server, as Trac currently relies on the possibility to trigger a complete environment reload to flush its caches.
-== Global Configuration ==
+== Environment Configuration ==
+
+=== Global Configuration ===
In versions prior to 0.11, the global configuration was by default located in `$prefix/share/trac/conf/trac.ini` or /etc/trac/trac.ini, depending on the distribution. If you're upgrading, you may want to specify that file to inherit from. Literally, when you're upgrading to 0.11, you have to add an `[inherit]` section to your project's `trac.ini` file. Additionally, you have to move your customized templates and common images from `$prefix/share/trac/...` to the new location.
@@ -24,14 +30,33 @@ There are two more entries in the [[#inherit-section| [inherit] ]] section, `tem
Note that the templates found in the `templates/` directory of the TracEnvironment have precedence over those found in `[inherit] templates_dir`. In turn, the latter have precedence over the installed templates, so be careful about what you put there, notably if you override a default template be sure to refresh your modifications when you upgrade to a new version of Trac (the preferred way to perform TracInterfaceCustomization being still to write a custom plugin doing an appropriate `ITemplateStreamFilter` transformation).
-== Reference for settings
+=== Environment trac.ini ===
+
+Options' values from `trac.ini` are used for a lot of environment configuration options. If option has syllabus switcher, its value from `trac.ini` will overwrite its default value used in syllabuses.
+
+== Syllabus Configuration ==
+
+Some options have syllabus switcher. It means that their values depends on current syllabus and read from syllabus configuration file. There are also some [#Referenceforspecialsections special sections] that must be defined on syllabus level.
+
+Values defined in syllabus configuration for options without syllabus switcher will be ignored.
+
+Syllabus configuration always '''must''' inherit configuration from main environment `trac.ini` file:
+{{{
+[inherit]
+file = ../trac.ini
+}}}
+
+== Project Configuration ==
-This is a brief reference of available configuration options, and their default settings.
+Project configuration files are optional. Only `[ticket-fields]` section is used for default values of project ticket fields (such as milestone, component, version).
+
+== Reference for settings ==
+
+This is a brief reference of available configuration options, their switchers and default values.
[[TracIni]]
-== Reference for special sections
-[[PageOutline(3,,inline)]]
+== Reference for special sections ==
=== [components] === #components-section
This section is used to enable or disable components provided by plugins, as well as by Trac itself. The component to enable/disable is specified via the name of the option. Whether its enabled is determined by the option value; setting the value to `enabled` or `on` will enable the component, any other value (typically `disabled` or `off`) will disable the component.
@@ -47,18 +72,28 @@ webadmin.* = enabled
The first option tells Trac to disable the [wiki:TracReports report module]. The second option instructs Trac to enable all components in the `webadmin` package. Note that the trailing wildcard is required for module/package matching.
-See the ''Plugins'' page on ''About Trac'' to get the list of active components (requires `CONFIG_VIEW` [wiki:TracPermissions permissions].)
+Enabled / disabled components should be defined in `trac.ini`. Then settings for some components may be redefined in syllabus configuration. This is available in two cases:
+ * This is directly supported by component (used in some plugins).
+ * Component is used by others through `SyllabusExtensionPoint`. !EduTrac components use it for following interfaces: `ITicketManipulator`, `ITicketChangeListener`, `ITimelineEventProvider`, `INavigationContributor`.
+
+See the ''Plugins'' page on ''About Trac'' to get the list of active environment components (requires `CONFIG_VIEW` [wiki:TracPermissions permissions].)
See also: TracPlugins
=== [extra-permissions] === #extra-permissions-section
''(since 0.12)''
-Custom additional permissions can be defined in this section when [wiki:ExtraPermissionsProvider] is enabled.
+Custom additional permissions can be defined in this section when [wiki:ExtraPermissionsProvider] is enabled:
+{{{
+[extra-permissions]
+meta_action_name = ACTION1, ACTION2, ACTION3
+}}}
=== [milestone-groups] === #milestone-groups-section
''(since 0.11)''
+'''Syllabus configuration only.'''
+
As the workflow for tickets is now configurable, there can be many ticket states,
and simply displaying closed tickets vs. all the others is maybe not appropriate
in all cases. This section enables one to easily create ''groups'' of states
@@ -98,13 +133,7 @@ selector: `table.progress td.<class>`
=== [repositories] === #repositories-section
-(''since 0.12'' multirepos)
-
-One of the alternatives for registering new repositories is to populate the `[repositories]` section of the trac.ini.
-
-This is especially suited for setting up convenience aliases, short-lived repositories, or during the initial phases of an installation.
-
-See [TracRepositoryAdmin#Intrac.ini TracRepositoryAdmin] for details about the format adopted for this section and the rest of that page for the other alternatives.
+(''Disabled since !EduTrac 0.1'')
=== [svn:externals] === #svn:externals-section
''(since 0.11)''
@@ -132,15 +161,61 @@ Finally, the relative URLs introduced in [http://subversion.tigris.org/svn_1.5_r
=== [ticket-custom] === #ticket-custom-section
+'''Syllabus configuration only.'''
+
In this section, you can define additional fields for tickets. See TracTicketsCustomFields for more details.
+=== [ticket-fields] === #ticket-fields-section
+
+'''Syllabus and project configuration only.'''
+
+This section is used to redefine ticket fields configuration:
+ * default values;
+ * optionality (only syllabus).
+
+Example:
+{{{
+[ticket-fields]
+milestone.optional = false
+priority.value = normal
+}}}
+
+=== [ticket-fields-filters] === #ticket-fields-filters-section
+
+'''Syllabus configuration only.'''
+
+`fields`: a list of all the fields to apply filters to.
+
+`field.permission`: PERMISSION:consequence
+
+where consequence is one of: hide, remove, disable
+ * `hide` - replaces with hidden input.
+ * `remove` - removes element.
+ * `disable` - removes input in favor of text.
+
+If consequence must occur always, it should be defined as:
+`field.<consequence> = true`
+
+Example:
+{{{
+[ticket-fields-filters]
+fields = totalhours, hours, estimatedhours
+totalhours.disable = true
+estimatedhours.permission = TIME_RECORD:disable
+hours.permission = TIME_VIEW:remove, TIME_RECORD:disable
+}}}
+
=== [ticket-workflow] === #ticket-workflow-section
''(since 0.11)''
+'''Syllabus configuration only.'''
+
The workflow for tickets is controlled by plugins.
By default, there's only a `ConfigurableTicketWorkflow` component in charge.
That component allows the workflow to be configured via this section in the trac.ini file.
See TracWorkflow for more details.
+
+
----
See also: TracGuide, TracAdmin, TracEnvironment
View
9 trac/wiki/macros.py
@@ -703,7 +703,14 @@ def expand_macro(self, formatter, name, args):
return tag.div(class_='tracini')(
(tag.h3(tag.code('[%s]' % section), id='%s-section' % section),
tag.table(class_='wiki')(
- tag.tbody(tag.tr(tag.td(tag.tt(option.name)),
+ tag.thead(tag.tr(tag.th(_('Name')),
+ tag.th(_('Switcher')),
+ tag.th(_('Default')),
+ tag.th(_('Description'))
+ )),
+ tag.tbody(tag.tr(tag.td(tag.pre(option.name)),
+ tag.td(option.switcher and 'Syllabus' or 'Environment'),
+ tag.td(option.default),
tag.td(format_to_oneliner(
self.env, formatter.context,
to_unicode(option.__doc__))))
Please sign in to comment.
Something went wrong with that request. Please try again.