@@ -45,7 +45,7 @@ function mc_issue_exists( $p_username, $p_password, $p_issue_id ) {
45
45
* @return Array that represents an IssueData structure
46
46
*/
47
47
function mc_issue_get ( $ p_username , $ p_password , $ p_issue_id ) {
48
-
48
+
49
49
$ t_user_id = mci_check_login ( $ p_username , $ p_password );
50
50
if ( $ t_user_id === false ) {
51
51
return mci_soap_fault_login_failed ();
@@ -138,13 +138,13 @@ function mci_get_category( $p_category_id ) {
138
138
* @return soapval the value to be encoded as the due date
139
139
*/
140
140
function mci_issue_get_due_date ( $ p_bug ) {
141
-
141
+
142
142
$ t_value = null ;
143
-
143
+
144
144
if ( access_has_bug_level ( config_get ( 'due_date_view_threshold ' ), $ p_bug ->id ) && !date_is_null ( $ p_bug ->due_date ) ) {
145
145
$ t_value = $ p_bug ->due_date ;
146
146
}
147
-
147
+
148
148
return SoapObjectsFactory::newDateTimeVar ( $ t_value ) ;
149
149
}
150
150
@@ -159,9 +159,9 @@ function mci_issue_set_custom_fields( $p_issue_id, &$p_custom_fields, $p_log_ins
159
159
# set custom field values on the submitted issue
160
160
if ( isset ( $ p_custom_fields ) && is_array ( $ p_custom_fields ) ) {
161
161
foreach ( $ p_custom_fields as $ t_custom_field ) {
162
-
162
+
163
163
$ t_custom_field = SoapObjectsFactory::unwrapObject ( $ t_custom_field );
164
-
164
+
165
165
# get custom field id from object ref
166
166
$ t_custom_field_id = mci_get_custom_field_id_from_objectref ( $ t_custom_field ['field ' ] );
167
167
@@ -358,7 +358,7 @@ function mci_issue_set_monitors( $p_issue_id , $p_requesting_user_id, $p_monitor
358
358
# 2. build new monitors ids
359
359
$ t_new_monitor_ids = array ();
360
360
foreach ( $ p_monitors as $ t_monitor ) {
361
- $ t_monitor = SoapObjectsFactory::unwrapObject ( $ t_monitor );
361
+ $ t_monitor = SoapObjectsFactory::unwrapObject ( $ t_monitor );
362
362
$ t_new_monitor_ids [] = $ t_monitor ['id ' ];
363
363
}
364
364
@@ -677,15 +677,15 @@ function mc_issue_add( $p_username, $p_password, $p_issue ) {
677
677
678
678
$ t_set_custom_field_error = mci_issue_set_custom_fields ( $ t_issue_id , $ p_issue ['custom_fields ' ], false );
679
679
if ( $ t_set_custom_field_error != null ) return $ t_set_custom_field_error ;
680
-
680
+
681
681
if ( isset ( $ p_issue ['monitors ' ] ) )
682
682
mci_issue_set_monitors ( $ t_issue_id , $ t_user_id , $ p_issue ['monitors ' ] );
683
683
684
684
if ( isset ( $ t_notes ) && is_array ( $ t_notes ) ) {
685
685
foreach ( $ t_notes as $ t_note ) {
686
-
686
+
687
687
$ t_note = SoapObjectsFactory::unwrapObject ( $ t_note );
688
-
688
+
689
689
if ( isset ( $ t_note ['view_state ' ] ) ) {
690
690
$ t_view_state = $ t_note ['view_state ' ];
691
691
} else {
@@ -741,7 +741,7 @@ function mc_issue_update( $p_username, $p_password, $p_issue_id, $p_issue ) {
741
741
}
742
742
743
743
$ g_project_override = $ t_project_id ; // ensure that helper_get_current_project() calls resolve to this project id
744
-
744
+
745
745
$ p_issue = SoapObjectsFactory::unwrapObject ( $ p_issue );
746
746
747
747
$ t_project_id = mci_get_project_id ( $ p_issue ['project ' ] );
@@ -862,7 +862,7 @@ function mc_issue_update( $p_username, $p_password, $p_issue_id, $p_issue ) {
862
862
863
863
$ t_set_custom_field_error = mci_issue_set_custom_fields ( $ p_issue_id , $ p_issue ['custom_fields ' ], true );
864
864
if ( $ t_set_custom_field_error != null ) return $ t_set_custom_field_error ;
865
-
865
+
866
866
if ( isset ( $ p_issue ['monitors ' ] ) )
867
867
mci_issue_set_monitors ( $ p_issue_id , $ t_user_id , $ p_issue ['monitors ' ] );
868
868
@@ -875,9 +875,9 @@ function mc_issue_update( $p_username, $p_password, $p_issue_id, $p_issue ) {
875
875
}
876
876
877
877
foreach ( $ p_issue ['notes ' ] as $ t_note ) {
878
-
878
+
879
879
$ t_note = SoapObjectsFactory::unwrapObject ( $ t_note );
880
-
880
+
881
881
if ( isset ( $ t_note ['view_state ' ] ) ) {
882
882
$ t_view_state = $ t_note ['view_state ' ];
883
883
} else {
@@ -1011,7 +1011,7 @@ function mc_issue_note_add( $p_username, $p_password, $p_issue_id, $p_note ) {
1011
1011
if ( !bug_exists ( $ p_issue_id ) ) {
1012
1012
return SoapObjectsFactory::newSoapFault ( 'Client ' , "Issue ' $ p_issue_id' does not exist. " );
1013
1013
}
1014
-
1014
+
1015
1015
$ p_note = SoapObjectsFactory::unwrapObject ( $ p_note );
1016
1016
1017
1017
if ( !isset ( $ p_note ['text ' ] ) || is_blank ( $ p_note ['text ' ] ) ) {
@@ -1111,7 +1111,7 @@ function mc_issue_note_update( $p_username, $p_password, $p_note ) {
1111
1111
}
1112
1112
1113
1113
$ p_note = SoapObjectsFactory::unwrapObject ( $ p_note );
1114
-
1114
+
1115
1115
if ( !isset ( $ p_note ['id ' ] ) || is_blank ( $ p_note ['id ' ] ) ) {
1116
1116
return SoapObjectsFactory::newSoapFault ('Client ' , "Issue note id must not be blank. " );
1117
1117
}
@@ -1177,9 +1177,9 @@ function mc_issue_note_update( $p_username, $p_password, $p_note ) {
1177
1177
*/
1178
1178
function mc_issue_relationship_add ( $ p_username , $ p_password , $ p_issue_id , $ p_relationship ) {
1179
1179
$ t_user_id = mci_check_login ( $ p_username , $ p_password );
1180
-
1180
+
1181
1181
$ p_relationship = SoapObjectsFactory::unwrapObject ( $ p_relationship );
1182
-
1182
+
1183
1183
$ t_dest_issue_id = $ p_relationship ['target_id ' ];
1184
1184
$ t_rel_type = SoapObjectsFactory::unwrapObject ( $ p_relationship ['type ' ] );
1185
1185
@@ -1373,6 +1373,8 @@ function mci_issue_data_as_array( $p_issue_data, $p_user_id, $p_lang ) {
1373
1373
$ t_additional_information = bug_get_text_field ( $ t_id , 'additional_information ' );
1374
1374
$ t_issue ['additional_information ' ] = mci_null_if_empty ( mci_sanitize_xml_string ( $ t_additional_information ) );
1375
1375
1376
+ $ t_issue ['due_date ' ] = SoapObjectsFactory::newDateTimeVar ( $ p_issue_data ->due_date );
1377
+
1376
1378
$ t_issue ['attachments ' ] = mci_issue_get_attachments ( $ p_issue_data ->id );
1377
1379
$ t_issue ['relationships ' ] = mci_issue_get_relationships ( $ p_issue_data ->id , $ p_user_id );
1378
1380
$ t_issue ['notes ' ] = mci_issue_get_notes ( $ p_issue_data ->id );
0 commit comments