Opened 16 years ago
Closed 16 years ago
#7649 closed enhancement (wontfix)
Workflow addition: to_be_tested -> in_testing with Tester field
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | |
Component: | ticket system | Version: | 0.11.1 |
Severity: | minor | Keywords: | workflow |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I wanted to be able to have a Tester assigned to a ticket in addition to submitter and owner.
I added the field (in trac.ini):
[ticket-custom] tester = text tester.label = Tester
and added the workflow (in trac.ini):
# owner sets the ticket to be tested tobetested = new,accepted,needs_work -> tobetested tobetested.name = Submit for testing tobetested.permissions = TICKET_MODIFY # tester accepts the ticket for testing # Tester is set to Tester field testing = tobetested -> testing testing.name = Accept for testing testing.operations = set_tester_to_self testing.permissions = TICKET_MODIFY # Tester rejects reject = testing -> needs_work reject.name = Failed testing reject.permissions = TICKET_MODIFY # Tester passes pass = testing -> closed pass.name = Passed Testing pass.operations = set_resolution pass.set_resolution = fixed pass.permissions = TICKET_MODIFY # Tester unaccepts # Tester field is cleared unaccept = testing -> tobetested unaccept.name = Cancel testing unaccept.operations = del_tester unaccept.permissions = TICKET_MODIFY
Of course, this requires adding support for set_tester_to_self and del_tester, which is done in ticket/default_workflow.py:
... def render_ticket_action_control(self, req, ticket, action): ... if 'set_tester_to_self' in operations: hints.append(_("The tester will change to %s") % req.authname) if 'del_tester' in operations: hints.append(_("Tester will be cleared.")) ... ... def get_ticket_changes(self, req, ticket, action): ... if operation == 'set_tester_to_self': updated['tester'] = req.authname elif operation == 'del_tester': updated['tester'] = '' ... ...
I suspect this could be improved for more people by also adding support for set_tester. Maybe it could even be made more generic to allow arbitrary custom field names configured in trac.ini.
Attachments (1)
Change History (4)
by , 16 years ago
Attachment: | default_workflow.py.patch added |
---|
follow-up: 2 comment:1 by , 16 years ago
The TracWorkflow system is pluggable as not all workflows are similar or all operations of interest to everyone. Trac provides some basic, quite common features, but leave it to plugins to provide customized actions for for individual install configurations.
See for intance th:AdvancedTicketWorkflowPlugin
If you could turn this into a plugin and put it out on trac-hacks.org, those that need it will find it and use it.
Nice enough idea, but not for Trac core. Propose wontfix
.
ticket/default_workflow.py