You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Phil Steitz <ph...@gmail.com> on 2006/06/05 03:40:44 UTC

[all] Maven changes plugin and Bugzilla -> Jira migration

I can't see a way make "old" bugzilla ids and "new" Jira issues both
generate correct URLs in the maven changes report.  Any clever idea on
this before I write a script to update BZ ids in changes.xml?  Has
anyone already written such a script?  Thanks!

Phil

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


Re: [all] Maven changes plugin and Bugzilla -> Jira migration

Posted by Dennis Lundberg <de...@apache.org>.
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


Re: [all] Maven changes plugin and Bugzilla -> Jira migration

Posted by Phil Steitz <ph...@gmail.com>.
OK, went ahead and scripted this.  Here's what I did after setting
maven.changes.issue.template=http://issues.apache.org/jira/browse/%ISSUE%

No laughing at my Perl ....

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


Re: [all] Maven changes plugin and Bugzilla -> Jira migration

Posted by Niall Pemberton <ni...@gmail.com>.
On 6/5/06, Phil Steitz <ph...@gmail.com> wrote:
> I can't see a way make "old" bugzilla ids and "new" Jira issues both
> generate correct URLs in the maven changes report.  Any clever idea on
> this before I write a script to update BZ ids in changes.xml?  Has
> anyone already written such a script?  Thanks!

No, just did it manually :-(

Niall

> Phil

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