Thanks for the patch. This is good functionality to have, but there's a better place for it.
We handle filling out these fields automatically in the Perforce SCMTool (scmtools/perforce.py). Basically, a few fields are parsed out of the change description and filled out. You can see the VMware-specific Perforce SCMTool (scmtools/perforce_vmware.py) for an example of adding custom fields to this.
What I'd suggest is modifying parse_change_desc in perforce.py to retrieve the fixes (using the p4 API) and setting changeset.bugs_closed.
This would unify the logic and remove the need for any custom configuration in post-review.
1. I did this change specifically to workaround bug 777. And that is why the change lies in post-review script.
2. If we decide to move the change to scmtools/perforce.py then we will have to add a field in perforce repository configuration where user can specify the regular expression to be used to retrieve the bug numbers from jobs fixed.