From 392c7fc0236c92629aa25ddcd11e1877252f32c0 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Tue, 10 Jul 2018 23:27:17 +0200 Subject: Flyspray: Add private bug support Signed-off-by: Florian Pritz --- Bugzilla/Migrate/Flyspray.pm | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'Bugzilla/Migrate/Flyspray.pm') diff --git a/Bugzilla/Migrate/Flyspray.pm b/Bugzilla/Migrate/Flyspray.pm index d96ebeaf4..b0fcf29e6 100644 --- a/Bugzilla/Migrate/Flyspray.pm +++ b/Bugzilla/Migrate/Flyspray.pm @@ -50,6 +50,7 @@ use constant FIELD_MAP => { 'comments' => 'comments', 'history' => 'history', 'attachments' => 'attachments', + 'groups' => 'groups', }; use constant VALUE_MAP => { @@ -237,6 +238,15 @@ sub _read_products { isactive => 1, components => $self->_get_fs_project_components($row->{project_id}), version => "unspecified", + groups => [ + { + name => "private", + description => "Private bug group", + owner => $self->_get_username(-1), + settings => + {"membercontrol" => CONTROLMAPSHOWN, "othercontrol" => CONTROLMAPSHOWN,} + }, + ], }; $self->{map_project_id_to_name}->{$row->{project_id}} = $row->{project_title}; } @@ -318,9 +328,6 @@ sub _read_bugs { my @result; while (my $row = $sth->fetchrow_hashref()) { - if ($row->{mark_private} == 1) { - ...; - } $self->debug("Processing bug " . $row->{task_id}, 2); my $bug = { short_desc => $row->{item_summary}, @@ -351,6 +358,10 @@ sub _read_bugs { if not defined $self->{project_id_components}->{$row->{project_id}} ->{$bug->{component}}; + if ($row->{mark_private} == 1) { + $bug->{groups} = ["private"]; + } + # handle initial comment/description if (length($bug->{comment}) > 65535) { $bug->{comment} -- cgit v1.2.3-24-g4f1b