Results of surgery are best when the deformity can be stretched out with therapy so that the finger is limber. If the joints get stiff so that the the finger can't be fully straightened or bent, surgery is not likely to provide a satisfactory result. After surgery, therapy and further splinting is needed for several months. With proper therapy and effort on the part of the patient, this problem is improved to a tolerable level most of the time - the finger may not be as it was before the injury, but it will work well enough to do what it needs to. Surgery is best reserved for fingers which are limber but just can't straighten.
Surgery is less likely to be successful for a stiff or fixed boutonniere deformity.
Even so, surgery may be a long run for a short slide, and should be undertaken only after at least one in depth discussion with the surgeon regarding therapy requirements and outcome expectations with the surgeon. The biggest problem is that the deformity can worsen gradually over a period of weeks after the initial injury. However, there is a limited period of time during which treatment of any sort can help. If treatment is delayed for a month or two, therapy and splinting is much less likely to bring a permanent improvement. If the joints are allowed to become stiff, results are even worse.