Hello! I’ve been digging into Django’s Triage Workflow and Trac a lot lately, and I would like to gather your thoughts on a proposal to reduce the confusion with ticket statuses and ticket queues.
Proposal
Would it help to have a separate field to provide clarity for the “big gray area” of the Accepted stage? This field may be called “Solution Status” or something similar, and it can consist of 3 values:
- Needs Patch
- Needs Review
- Needs Improvement
The logic for the Solution Status would follow the definitions outlined in the Triaging Tickets documentation:
- Needs Patch = Accepted
- Needs Review = Accepted + Has Patch
- Needs Improvement = Accepted + Has Patch + {Needs Docs | Needs Tests | Patch Needs Improvement}.
It could look something like this diagram, where the Triage Stages remain the same, and now the Accepted stage is accompanied by the Solution Status.
Changes to ticket description
There are a lot of fields in the ticket description. It takes some thought to figure out the combination of Triage Stage, Has Patch, Patch Needs Improvement, etc. to understand where the ticket stands.
The idea with the Solution Status is to abstract away the Has Patch and Patch Needs Improvement flags. Reducing the number of fields that determine the ticket status can improve the contributor experience.
Changes to ticket form
Currently, many contributors can be confused on how to modify the ticket status. They may not understand the meaning of “Has Patch” or the other boolean fields. It is also not clear what happens when those fields are modified and which queue the ticket ends up in.
In some cases, contributors will set the wrong values, in other cases they modify the wrong fields. This creates extra work for the Triage and Review Team members to manually revert the fields.
Trac has a plugin called DynamicFieldsPlugin. We can leverage it to only show the fields that are relevant for a given Triage Stage or Solution Status. For example:
- When Triage Stage != Accepted, hide Solution Status, Needs Docs, Needs Tests.
- When Triage Stage = Accepted, show Solution Status defaulted to “(unset)”. The form will raise an error if the Solution Status is submitted with “(unset)”.
- When Triage Stage = Accepted and Solution Status != Needs Improvement, hide Needs Docs and Needs Tests
- When Triage stage = Accepted and Solution Status = Needs Improvement, show Needs Docs and Needs Tests.
The dynamic fields can help contributors modify the correct fields.
Changes to query page
While experienced contributors have techniques for navigating the ticket queues (bookmarks, reports tab, dashboard, etc), new contributors or occasional contributors can feel lost.
The query page can be enhanced by including quick links for the Triage Stages and Solution Statuses. These quick links can be borrowed from the preset filters outlined in the Reports tab, but having them available on the query page can be very convenient. Contributors can get a good sense of Django’s Workflow, and they can also easily access the queues.
Code Changes & Data Migration
Adding the Solution Status field and applying dynamic form fields can be accomplished by configuring the trac.ini file. A proof of concept can be found in this PR: PoC: Add Solution Status Field by ontowhee · Pull Request #267 · django/code.djangoproject.com · GitHub
There will be a data migration on tracdb’s ticket_custom
and ticket_change
tables to calculate and store the value for the Solution Status field and to remove the Has Patch and Patch Needs Improvement fields.
Adding the quick links for the queues on the query page can be accomplished by creating a new CustomSubNavigationBar class that inherits from the Trac “Component”. Proof of concept in this PR: Added tabs for queues. by ontowhee · Pull Request #266 · django/code.djangoproject.com · GitHub
Thoughts?
Would changes similar to these be helpful to your workflow and your interactions with other contributors? I would love to hear your suggestions!