View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009054 | mantisbt | integration | public | 2008-04-14 07:17 | 2010-09-19 03:11 |
Reporter | tettamanti | Assigned To | dhx | ||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | won't fix | ||
Product Version | 1.1.1 | ||||
Summary | 0009054: Assign the note to the commiter | ||||
Description | Currently VCS integration works by using a predefined user to interact with the bug tracker. Unfortunately this tends to screw up the stats, since the "fake" account is doing all the work. My patch allows to override the user on a per-commit basis:
Of course for this patch to work properly the username used on the VCS must match the one used in mantis. | ||||
Tags | patch, project_management | ||||
Attached Files | checkin.diff (570 bytes)
Index: scripts/checkin.php =================================================================== --- scripts/checkin.php (revision 5162) +++ scripts/checkin.php (working copy) @@ -41,6 +41,14 @@ exit( 1 ); } + # Override the username with the one passed on the command line - if any + if ($GLOBALS['argc'] > 1) { + $t_committer = $GLOBALS['argv'][1]; + + if (!is_blank( $t_committer ) && ( user_get_id_by_name( $t_committer ) != false ) ) + $t_username = $t_committer; + } + if ( !defined( "STDIN" ) ) { define("STDIN", fopen('php://stdin','r')); } | ||||