commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis Lundberg <denn...@apache.org>
Subject Re: [all] Maven changes plugin and Bugzilla -> Jira migration
Date Sun, 18 Jun 2006 22:09:45 GMT
Phil Steitz wrote:
> OK, went ahead and scripted this.  Here's what I did after setting
> maven.changes.issue.template=http://issues.apache.org/jira/browse/%ISSUE%

You shouldn't have to set that if you use maven-changes-plugin 1.5.1 or 
newer.

> No laughing at my Perl ....

Oh, I'm laughing alright. Not at your Perl, but at how easy it was to use :)
Works like a charm, thanks!

> Phil
> ------------------------
> 
> #
> # Script to replace Bugzilla IDs with JIRA.
> # $file needs to be csv with jira ID first, then BZ.
> # Use "all" issue view from JIRA issue browser and download to 
> spreadsheet, then
> # delete other cols and export to csv.
> #
> 
> # read CSV file exported from JIRA into hash
> $file = 'issueMap.csv';
> $changes = 'changes.xml';
> open (F, $file) || die ("Could not open $file!");
> while ($line = <F>)
> {
>  $line =~ s/[\"\n\ ]//g; # lose the quotes, newlines, spaces
>  ($jira,$bugzilla) = split ',', $line;
>  $issues{$bugzilla} = $jira;
> }
> close (F);
> 
> # make replacements one at a time (ugly, but simple and works)
> while (($bugzilla, $jira) = each(%issues))
> {
>  `cat $changes |sed "s/$bugzilla/$jira/g" > $changes.new`;
>  `mv $changes.new $changes`;
>  print "jira: $jira <- bugzilla: $bugzilla \n";
> }
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 


-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message