wiki:TracUserSelectFieldPlugin

Enable a drop-down list to select users for custom fields. Set a specific user according to workflow

This plugin uses a 'patch-style' implementation rather than according to standard Trac's guidelines. It may adversely affect other plugins that depend on TicketSystem.custom_fields and ConfigurableTicketWorkflow._to_users.

Not recommended in production use. Use at your own risks.

Description

This plugin enables a field to select a specific user according to configuration. This field can later be used in workflow.

  1. Create a select Custom Field in your trac.ini file:
project_usera = select
project_usera.format = user
project_usera.user = Manager     

where:

  • field type must be 'select',
  • format must be 'user',
  • user is optional and default to 'authenticated', and can be set to comma separated users, groups or PERMISSIONS.

  1. Use this user in the workflow configuration section in your trac.ini file:
    pj0102_test = PJ01 -> PJ02
    pj0102_test.operations = set_owner
    pj0102_test.name = test
    pj0102_test.set_owner = $project_usera
    

all you need to do is use a '$' with the field name.

Note: Function 2 can also be achieved by AdvancedTicketWorkflowPlugin's set_owner_to_field operation:

[ticket]
workflow = ConfigurableTicketWorkflow, TicketWorkflowOpOwnerField

[ticket-workflow]
reassign2 = new,assigned,accepted,reopened -> assigned
reassign2.operations = set_owner_to_field
reassign2.set_owner_to_field = project_usera

Bugs/Feature Requests

Existing bugs and feature requests for TracUserSelectFieldPlugin are here.

If you have any issues, create a new ticket.

defect

2 / 2

Download

Download the zipped source from here.

Source

You can check out TracUserSelectFieldPlugin from here using Git.

Installation

General instructions on installing Trac plugins can be found on the TracPlugins page.

Note: UserSelectFieldPlugin should be activated, but PatchedTicketSystem is NOT supposed to be activated!

Make the following changes in your trac.ini file:

tracuserselectfield.userselectfield.patchedticketsystem = disabled
tracuserselectfield.userselectfield.userselectfieldplugin = enabled

Author/Contributors

Author: cauly
Maintainer: Cauly
Contributors:

Last modified 3 years ago Last modified on Oct 4, 2021, 11:50:42 AM

Attachments (2)

Download all attachments as: .zip