Welcome to the first question and answer post on “Patches Welcome”. If you have a question about contributing to WordPress please ask!
I’m wondering how best to tell when a Trac ticket really needs a patch. Sometimes it seems like a ticket has the “needs-patch” tag, but is still being discussed. How can a newcomer best tell when to jump in and produce code?
I agree that for a newcomer it can be difficult to decide if a ticket really still needs a patch. Here is the list of questions I would go through in my head when looking at a ticket to decide if it is ready for or still needs a patch, some are obvious some not so obvious.
Is consensus building on the right solution? Just because discussion is still ongoing about what the right solution might be doesn’t necessarily mean that it is the wrong time to offer up a patch. Often a patch can be the best way to express the technicalities of your suggestion and to allow people to try your ideas out. If you can figure a popular direction or consensus that is building it is well worth the time to work on a patch. The availability of a coded solution can be enough to sway a discussion in a particular direction.
Is the ticket patch less? Check to see if someone has already submitted a patch on the ticket. If they have and the patch works for your please change the keywords from needs-patch to has-patch and leave a comment about what testing you did.
Was the needs-patch keyword added / re-added after the latest patch was submitted? This generally means that someone has reviewed the patch and it needs some improvements before it is ready to be committed to the core. Usually they will leave a comment describing the issues with the patch so you should know what needs to be addressed.
Is there feedback on the ticket as to improvements that can be made to the patch or test cases which fail when the patch is applied? If so you could work to merge this feedback and improve the patch. Just because you are not the original patch author does not mean that you should not get involved. In fact it is great for many people to be involved in the patch development and testing process as that means it is much more likely that any edge-case bugs will be found.
Does the patch still apply? If there is a patch on the ticket can it still be applied to the latest trunk code and fix the issue(s) described in the ticket. Over time patches become stale as the code that was patched changes for other reasons. If the patch no longer applies you could update it so that it does and check that the bug(s) are still fixed.
If you are still not sure after playing out all these questions in your head then the best next step is to ask someone. In general there is usually a few of the core contributors hanging out in the development IRC channel
#wordpress-dev on the FreeNode network. If you ask them about a ticket or for feedback on a patch they will be able to help you.
Do you have a question about contributing to WordPress if so please ask!