@@ -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
@@ -678,15 +678,15 @@ function mc_issue_add( $p_username, $p_password, $p_issue ) {
678
678
679
679
$ t_set_custom_field_error = mci_issue_set_custom_fields ( $ t_issue_id , $ p_issue ['custom_fields ' ], false );
680
680
if ( $ t_set_custom_field_error != null ) return $ t_set_custom_field_error ;
681
-
681
+
682
682
if ( isset ( $ p_issue ['monitors ' ] ) )
683
683
mci_issue_set_monitors ( $ t_issue_id , $ t_user_id , $ p_issue ['monitors ' ] );
684
684
685
685
if ( isset ( $ t_notes ) && is_array ( $ t_notes ) ) {
686
686
foreach ( $ t_notes as $ t_note ) {
687
-
687
+
688
688
$ t_note = SoapObjectsFactory::unwrapObject ( $ t_note );
689
-
689
+
690
690
if ( isset ( $ t_note ['view_state ' ] ) ) {
691
691
$ t_view_state = $ t_note ['view_state ' ];
692
692
} else {
@@ -742,7 +742,7 @@ function mc_issue_update( $p_username, $p_password, $p_issue_id, $p_issue ) {
742
742
}
743
743
744
744
$ g_project_override = $ t_project_id ; // ensure that helper_get_current_project() calls resolve to this project id
745
-
745
+
746
746
$ p_issue = SoapObjectsFactory::unwrapObject ( $ p_issue );
747
747
748
748
$ t_project_id = mci_get_project_id ( $ p_issue ['project ' ] );
@@ -863,7 +863,7 @@ function mc_issue_update( $p_username, $p_password, $p_issue_id, $p_issue ) {
863
863
864
864
$ t_set_custom_field_error = mci_issue_set_custom_fields ( $ p_issue_id , $ p_issue ['custom_fields ' ], true );
865
865
if ( $ t_set_custom_field_error != null ) return $ t_set_custom_field_error ;
866
-
866
+
867
867
if ( isset ( $ p_issue ['monitors ' ] ) )
868
868
mci_issue_set_monitors ( $ p_issue_id , $ t_user_id , $ p_issue ['monitors ' ] );
869
869
@@ -876,9 +876,9 @@ function mc_issue_update( $p_username, $p_password, $p_issue_id, $p_issue ) {
876
876
}
877
877
878
878
foreach ( $ p_issue ['notes ' ] as $ t_note ) {
879
-
879
+
880
880
$ t_note = SoapObjectsFactory::unwrapObject ( $ t_note );
881
-
881
+
882
882
if ( isset ( $ t_note ['view_state ' ] ) ) {
883
883
$ t_view_state = $ t_note ['view_state ' ];
884
884
} 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 ' ] ) ) {
@@ -1107,7 +1107,7 @@ function mc_issue_note_update( $p_username, $p_password, $p_note ) {
1107
1107
}
1108
1108
1109
1109
$ p_note = SoapObjectsFactory::unwrapObject ( $ p_note );
1110
-
1110
+
1111
1111
if ( !isset ( $ p_note ['id ' ] ) || is_blank ( $ p_note ['id ' ] ) ) {
1112
1112
return SoapObjectsFactory::newSoapFault ('Client ' , "Issue note id must not be blank. " );
1113
1113
}
@@ -1173,9 +1173,9 @@ function mc_issue_note_update( $p_username, $p_password, $p_note ) {
1173
1173
*/
1174
1174
function mc_issue_relationship_add ( $ p_username , $ p_password , $ p_issue_id , $ p_relationship ) {
1175
1175
$ t_user_id = mci_check_login ( $ p_username , $ p_password );
1176
-
1176
+
1177
1177
$ p_relationship = SoapObjectsFactory::unwrapObject ( $ p_relationship );
1178
-
1178
+
1179
1179
$ t_dest_issue_id = $ p_relationship ['target_id ' ];
1180
1180
$ t_rel_type = SoapObjectsFactory::unwrapObject ( $ p_relationship ['type ' ] );
1181
1181
@@ -1399,6 +1399,8 @@ function mci_issue_data_as_array( $p_issue_data, $p_user_id, $p_lang ) {
1399
1399
$ t_additional_information = bug_get_text_field ( $ t_id , 'additional_information ' );
1400
1400
$ t_issue ['additional_information ' ] = mci_null_if_empty ( mci_sanitize_xml_string ( $ t_additional_information ) );
1401
1401
1402
+ $ t_issue ['due_date ' ] = SoapObjectsFactory::newDateTimeVar ( $ p_issue_data ->due_date );
1403
+
1402
1404
$ t_issue ['attachments ' ] = mci_issue_get_attachments ( $ p_issue_data ->id );
1403
1405
$ t_issue ['relationships ' ] = mci_issue_get_relationships ( $ p_issue_data ->id , $ p_user_id );
1404
1406
$ t_issue ['notes ' ] = mci_issue_get_notes ( $ p_issue_data ->id );
0 commit comments