File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ use constant PUBLIC_METHODS => qw( attachments );
29
29
30
30
BEGIN {
31
31
*_attachment_to_hash = \&Bugzilla::WebService::Bug::_attachment_to_hash;
32
+ *_flag_to_hash = \&Bugzilla::WebService::Bug::_flag_to_hash;
32
33
}
33
34
34
35
sub attachments {
@@ -154,6 +155,11 @@ sub attachments {
154
155
isprivate => $attachment -> {is_private },
155
156
});
156
157
158
+ if ($flags ) {
159
+ my ($old_flags , $new_flags ) = extract_flags($flags , $bug , $attachment_obj );
160
+ $attachment_obj -> set_flags($old_flags , $new_flags );
161
+ }
162
+
157
163
push (@created , $attachment_obj );
158
164
159
165
$attachment_obj -> update($timestamp );
@@ -171,7 +177,7 @@ sub attachments {
171
177
$bug -> send_changes();
172
178
173
179
my %attachments_created = map { $_ -> id => $self -> _attachment_to_hash($_ , $params ) } @created ;
174
- my %attachments_modified = map { $_ -> {id }-> value => $_ } @modified ;
180
+ my %attachments_modified = map { ( ref $_ -> {id } ? $_ -> { id } -> value : $_ -> { id }) => $_ } @modified ;
175
181
176
182
return { attachments_created => \%attachments_created , attachments_modified => \%attachments_modified };
177
183
}
You can’t perform that action at this time.
0 commit comments