summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Migrate
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2018-01-02 14:55:07 +0100
committerFlorian Pritz <bluewind@xinu.at>2018-12-06 11:06:00 +0100
commit1effa62b767cb23a19f6179160e4c5b5403e3e4b (patch)
tree501d040ce91c7ce3d10daf57b913e50ac4fd98fd /Bugzilla/Migrate
parent8426dcc12aeea5a86511230de384f57142e76910 (diff)
downloadbugzilla-1effa62b767cb23a19f6179160e4c5b5403e3e4b.tar.gz
bugzilla-1effa62b767cb23a19f6179160e4c5b5403e3e4b.tar.xz
WIP: misc
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'Bugzilla/Migrate')
-rw-r--r--Bugzilla/Migrate/Flyspray.pm38
1 files changed, 23 insertions, 15 deletions
diff --git a/Bugzilla/Migrate/Flyspray.pm b/Bugzilla/Migrate/Flyspray.pm
index 579e7704d..cba1143f7 100644
--- a/Bugzilla/Migrate/Flyspray.pm
+++ b/Bugzilla/Migrate/Flyspray.pm
@@ -51,13 +51,6 @@ use constant FIELD_MAP => {
};
use constant VALUE_MAP => {
- bug_severity => {
- 'critical' => 'critical',
- 'high' => 'high',
- 'medium' => 'medium',
- 'low' => 'low',
- 'very low' => 'very low',
- },
bug_status => {
'unconfirmed' => 'NEW',
'new' => 'NEW',
@@ -79,13 +72,22 @@ use constant VALUE_MAP => {
'fixed' => 'FIXED',
'implemented' => 'FIXED',
},
+ priority => {
+ 0 => "--",
+ 1 => "Low",
+ 2 => "Normal",
+ 3 => "High",
+ 4 => "Highest",
+ 5 => "Immediate",
+ 6 => "Flash",
+ },
bug_severity => {
- 'Flash' => 'Flash',
- 'Immediate' => 'Immediate',
- 'Urgent' => 'Urgent',
- 'High' => 'High',
- 'Normal' => 'Normal',
- 'Low' => 'Low',
+ 0 => "--",
+ 1 => "enhancement",
+ 2 => "minor",
+ 3 => "normal",
+ 4 => "major",
+ 5 => "blocker",
},
};
@@ -294,6 +296,7 @@ sub _read_bugs {
t.detailed_desc,
t.opened_by,
t.task_priority,
+ t.task_severity,
t.item_status,
t.date_opened,
t.last_edited_time,
@@ -328,7 +331,8 @@ sub _read_bugs {
op_sys => "Linux",
rep_platform => "PC",
bug_status => $row->{status_name} // "Unknown",
- bug_severity => $row->{task_priority},
+ bug_severity => $row->{task_severity},
+ priority => $row->{task_priority},
resolution => $row->{is_closed} ? $row->{resolution_name} // 'UNKNOWN' : '',
reporter => $self->_get_username($row->{opened_by}),
creation_ts => $row->{date_opened},
@@ -349,6 +353,7 @@ sub _read_bugs {
= "--- The description has been moved to an attachment because it is longer than 65535 characters ---";
unshift @{$bug->{attachments}},
{
+ submitter => $bug->{reporter},
data => $row->{detailed_desc},
description => "Initial bug description",
mimetype => "text/plain",
@@ -539,8 +544,11 @@ sub after_insert {
my ($self) = @_;
for my $dupe (keys %{$self->{dupes}}) {
+ my $dupe_of = $self->{dupes}->{$dupe};
+ my $bug = Bugzilla::Bug->new($dupe_of);
$self->{dbh}->do("INSERT INTO duplicates (dupe_of, dupe) VALUES (?, ?)",
- undef, $self->{dupes}->{$dupe}, $$dupe);
+ undef, $dupe_of, $dupe)
+ unless defined $bug->{error};
}
}