diff options
author | David Lawrence <dkl@redhat.com> | 2014-07-02 18:39:32 +0200 |
---|---|---|
committer | David Lawrence <dkl@redhat.com> | 2014-07-02 18:39:32 +0200 |
commit | e0d898d3883c2e715b72e6a46bb92cd77cf79314 (patch) | |
tree | 958b79ba59b38d662ecc7f3c1cdb7187699ccf2b | |
parent | 48577f23ee0cccfcc476cbac477a9b30c5194fa9 (diff) | |
download | bugzilla-e0d898d3883c2e715b72e6a46bb92cd77cf79314.tar.gz bugzilla-e0d898d3883c2e715b72e6a46bb92cd77cf79314.tar.xz |
Bug 1033258 - bzexport fails to leave a comment when attaching a file using the BzAPI compatibility layer
-rw-r--r-- | extensions/BzAPI/lib/Resources/Bug.pm | 9 |
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}; } |