Skip to content

Commit

Permalink
Ignore source/empty ids when adding multiple relationships
Browse files Browse the repository at this point in the history
Fixes #25533
  • Loading branch information
dregad committed Mar 2, 2019
1 parent 969201b commit 4b99aec
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bug_relationship_add.php
Expand Up @@ -50,6 +50,13 @@
$t_dest_bug_id_array = explode( '|', $t_dest_bug_id_string );

foreach( $t_dest_bug_id_array as $t_dest_bug_id ) {
# Skip empty bug ids and ignore source bug when processing multiple targets
if( count( $t_dest_bug_id_array ) > 1
&& ( is_blank( $t_dest_bug_id ) || $f_src_bug_id == $t_dest_bug_id )
) {
continue;
}

$t_data = array(
'query' => array( 'issue_id' => $f_src_bug_id ),
'payload' => array(
Expand Down

0 comments on commit 4b99aec

Please sign in to comment.