Skip to content

Commit

Permalink
fix #15356 [SOAP Api] Check errors raised by mci_issue_set_custom_field
Browse files Browse the repository at this point in the history
  • Loading branch information
jeckyll authored and rombert committed Jan 12, 2013
1 parent f39ff7b commit 4d90707
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions api/soap/mc_issue_api.php
Expand Up @@ -675,7 +675,9 @@ function mc_issue_add( $p_username, $p_password, $p_issue ) {
# submit the issue
$t_issue_id = $t_bug_data->create();

mci_issue_set_custom_fields( $t_issue_id, $p_issue['custom_fields'], false );
$t_set_custom_field_error = mci_issue_set_custom_fields( $t_issue_id, $p_issue['custom_fields'], false );
if ( $t_set_custom_field_error != null ) return $t_set_custom_field_error;

if ( isset ( $p_issue['monitors'] ) )
mci_issue_set_monitors( $t_issue_id , $t_user_id, $p_issue['monitors'] );

Expand Down Expand Up @@ -858,7 +860,9 @@ function mc_issue_update( $p_username, $p_password, $p_issue_id, $p_issue ) {
$t_bug_data->target_version = isset( $p_issue['target_version'] ) ? $p_issue['target_version'] : '';
}

mci_issue_set_custom_fields( $p_issue_id, $p_issue['custom_fields'], true );
$t_set_custom_field_error = mci_issue_set_custom_fields( $p_issue_id, $p_issue['custom_fields'], true );
if ( $t_set_custom_field_error != null ) return $t_set_custom_field_error;

if ( isset ( $p_issue['monitors'] ) )
mci_issue_set_monitors( $p_issue_id , $t_user_id, $p_issue['monitors'] );

Expand Down

0 comments on commit 4d90707

Please sign in to comment.