summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2018-01-02 14:55:07 +0100
committerFlorian Pritz <bluewind@xinu.at>2018-04-10 18:31:51 +0200
commit997d3dfb571243fef274f2a8f9e2a783bc42e68d (patch)
tree46e8b459744129a6092cd0d99905f2b48015df69 /Bugzilla
parent0468c97dd1d78f94ecb1537e77bc96e2f5acbbd4 (diff)
downloadbugzilla-997d3dfb571243fef274f2a8f9e2a783bc42e68d.tar.gz
bugzilla-997d3dfb571243fef274f2a8f9e2a783bc42e68d.tar.xz
WIP: misc
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Migrate/Flyspray.pm37
1 files changed, 22 insertions, 15 deletions
diff --git a/Bugzilla/Migrate/Flyspray.pm b/Bugzilla/Migrate/Flyspray.pm
index 701a71a94..8116392a9 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",
},
};
@@ -275,6 +277,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,
@@ -307,7 +310,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},
@@ -324,6 +328,7 @@ sub _read_bugs {
if (length($bug->{comment}) > 65535) {
$bug->{comment} = "--- 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",
@@ -498,7 +503,9 @@ sub after_insert {
my ($self) = @_;
for my $dupe (keys %{$self->{dupes}}) {
- $self->{dbh}->do("INSERT INTO duplicates (dupe_of, dupe) VALUES (?, ?)", undef, $self->{dupes}->{$dupe}, $$dupe);
+ my $dupe_of = $self->{dupes}->{$dupe};
+ my $bug = Bugzilla::Bug->new($dupe_of);
+ $self->{dbh}->do("INSERT INTO duplicates (dupe_of, dupe) VALUES (?, ?)", undef, $dupe_of, $dupe) unless defined $bug->{error};
}
}