Edgewall Software
Modify

Opened 2 years ago

Closed 2 years ago

#12807 closed enhancement (fixed)

Make it easier to customize the allowed owners for a ticket

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: 1.3.2
Component: ticket system Version:
Severity: normal Keywords: workflow
Cc: Branch:
Release Notes:

The allowed ticket owners can be programmatically controlled by subclassing ConfigurableTicketWorkflow and overriding the get_allowed_owner method.

API Changes:

Added get_allowed_owners method to ConfigurableTicketWorkflow class, which returns the allowed ticket owners that will populate the assign-to select.

Description

I've been reviewing FlexibleAssignToPlugin and looking at how we can provide equivalent functionality in Trac. It appears it can be done by simply adding a get_allowed_owners method to ConfigurableTicketWorkflow. Users wishing to programmatically control the allowed ticket owners can subclass ConfigurableTicketWorkflow and override the method.

Attachments (0)

Change History (4)

comment:1 by Ryan J Ollos, 2 years ago

Proposed changes in [86bacacb/rjollos.git].

Regarding the get_allowed_owners and eventually_restrict_owner TicketSystem methods, those are used to control the population of the select boxes on the query page and ticket admin components page, and create a list of valid users to complete the trac-admin component add and chown commands. I think we should consider changing the behavior when implementing #7628. Rather than having a select box we can autocomplete the fields to a list of all possible owners. For the query page, that would be the set of all ticket owners. For the component owner field, that can just be all known users. If those changes are made, the methods will be unused by Trac and can be deprecated.

Documented:

comment:2 by Ryan J Ollos, 2 years ago

Component: generalticket system

comment:3 by Ryan J Ollos, 2 years ago

Keywords: workflow added

comment:4 by Ryan J Ollos, 2 years ago

Resolution: fixed
Status: assignedclosed

Added tests and committed to trunk in r15910.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.