[[PageOutline(2-5,Contents,pullout)]] = SimpleMultiProjectPlugin = == Description == Lets you easily '''manage multiple user projects with one Trac instance''' or, respectively, one Trac database (.db file). * This is not a meta project in front of several other Trac projects, it just implements the idea of [T:wiki:TracMultipleProjects/SingleEnvironment]. * Milestones and versions are assigned to their projects, and both are displayed on the roadmap. There are several possibilities to filter by projects on that page, and also the timeline. * Components can be assigned to all or only certain projects. * 'New Ticket' will just offer the associated milestones, versions and components of the chosen project. This requires a new custom-ticket field 'project'. Still an experimental version, though actually already running stable in a real production environment; feedback much appreciated. Note: The Multiple Project feature in the sense of having a meta Trac project on top of several Trac projects is discussed in T:#130 and scheduled for [T:milestone:topic-multiproject Trac topic-multiproject] which is eventually part of [T:milestone:next-dev-1.1.x Trac next-dev-1.1.x]. == Plan == in testing state: [[TicketQuery(component=SimpleMultiProjectPlugin&keywords=~testing)]] work in progress: [[TicketQuery(component=SimpleMultiProjectPlugin&keywords$=planned&status=assigned|reopened)]] still just an idea: [[TicketQuery(component=SimpleMultiProjectPlugin&keywords$=planned&status!=assigned|reopened|closed)]] == Technical thoughts == This plugin adds a new resource 'project' implemented by database table: 1. smp_project: a list of all defined projects Actually, most database tables of Trac core related to resources would need a new column 'project_id'. This way tickets, components, milestones, versions or even wikis could attach to certain projects. Since a plugin just adds stuff but cannot change the core structure, it implements the new dimension 'project' not by adding a new column to each resource table but rather by adding several mapping tables smp_[resource]_project, each one mapping a certain resource to projects: 2. smp_milestone_project: the association of milestones to projects 3. smp_version_project: the association of versions to projects 4. smp_component_project: the association of components to projects == Example == '''''Admin Interface''''': [[BR]] [[Image(admin_project.png)]] ---- '''''Add project summary and description. This is displayed on the roadmap page then''''': [[BR]] [[Image(admin_projects_modify.png)]] ---- '''''Associate a milestone in a project''''': * From the "Roadmap" Page, find the desired milestone/version and click it. * Scroll to bottom of page and "Edit" the page. Select the project from the given combobox. Traps: * Mapping milestones and versions to a project is not supported via main menu item "Admin" -> "Ticket System" -> "Milestones" / "Versions". * If you forget to map milestones and versions to a new project, and you try to create a new ticket, it will happen to you that after you have selected a project from its combobox the "New Ticket" form cannot offer any in the comboboxes of ''milestone'' and ''version''. [[Image(edit_milestone.png)]] ---- '''''Group milestones and versions on the roadmap by project, show project summary and description in the header of the project box, and display only projects chosen in the filter box''''': [[BR]] [[Image(roadmap_projects_filter.png)]] ---- '''''display only tickets in the timeline of projects chosen in the filter box (adapted from TimelineComponentFilterPlugin)''''': [[BR]] [[Image(timeline_projects_filter.png)]] == Bugs/Feature Requests == total issue record: [[TicketQuery(component=SimpleMultiProjectPlugin,format=progress)]] open issues by type: [[TicketQuery(component=SimpleMultiProjectPlugin,status!=closed&group=type,format=progress)]] If you have any issues, create a [http://trac-hacks.org/newticket?component=SimpleMultiProjectPlugin&owner=falkb new ticket]. == Download == Download the zipped source from [download:simplemultiprojectplugin here]. == Source == You can check out SimpleMultiProjectPlugin from [http://trac-hacks.org/svn/simplemultiprojectplugin here] using Subversion, or [source:simplemultiprojectplugin browse the source] with Trac. == Installation == 1. Add a custom ticket field 'project' in your trac.ini to give tickets the information to which project they belong. Milestones selection depends on that as well. {{{ #!ini [ticket-custom] project = text project.label = Project project.value = }}} 2. Generate the plugin .egg file from sources {{{ #!sh python setup.py bdist_egg }}} 3. Copy the plugin to Trac, e.g. {{{ #!sh cp dist/SimpleMultiProject-0.0.1-py2.6.egg /instance_trac/plugins/ }}} 4. Restart Apache. After installation of this plugin Trac needs a database upgrade! {{{ #!sh trac-admin /instance_trac/ upgrade }}} 5. Give permissions to certain users. Available permissions are: - {{{ PROJECT_SETTINGS_VIEW }}} - you can see the list of projects with their description and their component mapping on the Admin panel - {{{ PROJECT_ADMIN }}} - full access, you can also create and delete projects, and map to milestones, versions and components 6. Since plugin version 0.4 we support project-wise restriction of resources to a subset of users (#11367). Switch on the plugin component ''ProjectTicketsPolicy'' to activate it, and add the following to your trac.ini {{{ [trac] permission_policies = ProjectTicketsPolicy, ... any other ... }}} Define a comma-separated list of users or groups in 'Admin' -> 'Manage Projects' -> 'Projects' -> '' -> 'Retrict to users' to limit the access to certain projects (milestones, versions, tickets).[[BR]]For example, set - {{{ john, mary, group1, authenticated }}} to restrict to this set of users - {{{ !, bob, anonymous, group2 }}} to exclude from the project. == Recent Changes == [[ChangeLog(simplemultiprojectplugin, 5)]] == Author/Contributors == '''Author:''' [wiki:crossroad], [wiki:falkb], [wiki:thomasd] [[BR]] '''Maintainer:''' [wiki:falkb] [[BR]] '''Contributors:'''