summaryrefslogtreecommitdiffstats
path: root/extensions/BzAPI/lib/Resources
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/BzAPI/lib/Resources')
-rw-r--r--extensions/BzAPI/lib/Resources/Bug.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/extensions/BzAPI/lib/Resources/Bug.pm b/extensions/BzAPI/lib/Resources/Bug.pm
index eed439a00..d9a2604a9 100644
--- a/extensions/BzAPI/lib/Resources/Bug.pm
+++ b/extensions/BzAPI/lib/Resources/Bug.pm
@@ -587,6 +587,12 @@ sub add_attachment_request {
}
}
}
+
+ # Add comment if one is provided
+ if (exists $params->{comments} && scalar @{ $params->{comments} }) {
+ $params->{comment} = $params->{comments}->[0]->{text};
+ delete $params->{comments};
+ }
}
sub update_attachment_request {
@@ -613,8 +619,9 @@ sub update_attachment_request {
}
}
}
+
# Add comment if one is provided
- if ($params->{comments}) {
+ if (exists $params->{comments} && scalar @{ $params->{comments} }) {
$params->{comment} = $params->{comments}->[0]->{text};
delete $params->{comments};
}