View Issue Details

IDProjectCategoryView StatusLast Update
0009245mantisbtapi soappublic2009-01-15 11:26
Reporterjeremib Assigned Tovboctor  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Fixed in Version1.2.0a3 
Summary0009245: target_version not passed through via SOAP
Description

So target_version is not being handled at all through any of the files in api/soap. So I edited the code to include target_version in the function mc_issue_get. It works perfect when I call this function through straight PHP:

<?
require_once('/var/www/bugs/api/soap/nusoap/nusoap.php');
require_once('/var/www/bugs/api/soap/mc_core.php');
print_r(mc_issue_get('jeremib','password',1450));
?>

But if I try and use the function through SOAP, the variable is not passed back. The only thing that I can see that is happening different is the $t_issue_data that is getting returned from mc_issue_get is going through some sort of steps to be conformed to an IssueData object from mantisconnect.php

Additional Information

I've attached the svn diff to show what code I edited

Tagspatch
Attached Files
mantis_svn_diff.txt (3,600 bytes)   
Index: mc_filter_api.php
===================================================================
--- mc_filter_api.php	(revision 5348)
+++ mc_filter_api.php	(working copy)
@@ -106,6 +106,7 @@
 
 	 		$t_issue['resolution'] = mci_enum_get_array_by_id( $t_issue_data['resolution'], 'resolution', $t_lang );
 			$t_issue['fixed_in_version'] = mci_null_if_empty( $t_issue_data['fixed_in_version'] );
+			$t_issue['target_version'] = mci_null_if_empty( $t_issue_data['target_version'] );
 
 			$t_issue['description'] = bug_get_text_field( $t_id, 'description' );
 
Index: mc_issue_api.php
===================================================================
--- mc_issue_api.php	(revision 5348)
+++ mc_issue_api.php	(working copy)
@@ -96,6 +96,7 @@
 
  		$t_issue_data['resolution'] = mci_enum_get_array_by_id( $t_bug['resolution'], 'resolution', $t_lang );
 		$t_issue_data['fixed_in_version'] = mci_null_if_empty( $t_bug['fixed_in_version'] );
+		$t_issue_data['target_version'] = mci_null_if_empty( $t_bug['target_version'] );
 
 		$t_issue_data['description'] = $t_bug['description'];
 		$t_issue_data['steps_to_reproduce'] = mci_null_if_empty( $t_bug['steps_to_reproduce'] );
@@ -506,6 +507,7 @@
 		$t_bug_data->platform = isset( $v_platform ) ? $v_platform : '';
 		$t_bug_data->version = isset( $v_version ) ? $v_version : '';
 		$t_bug_data->fixed_in_version = isset( $v_fixed_in_version ) ? $v_fixed_in_version : '';
+		$t_bug_data->target_version = isset( $v_target_version ) ? $v_target_version : '';
 		$t_bug_data->build = isset( $v_build ) ? $v_build : '';
 		$t_bug_data->view_state = $t_view_state_id;
 		$t_bug_data->summary = $v_summary;
@@ -669,6 +671,7 @@
         $t_bug_data->platform = isset( $v_platform ) ? $v_platform : '';
         $t_bug_data->version = isset( $v_version ) ? $v_version : '';
         $t_bug_data->fixed_in_version = isset( $v_fixed_in_version ) ? $v_fixed_in_version : '';
+        $t_bug_data->target_version = isset( $v_target_version ) ? $v_target_version : '';
         $t_bug_data->build = isset( $v_build ) ? $v_build : '';
         $t_bug_data->view_state = $t_view_state_id;
         $t_bug_data->summary = $v_summary;
Index: mantisconnect.php
===================================================================
--- mantisconnect.php	(revision 5348)
+++ mantisconnect.php	(working copy)
@@ -288,6 +288,7 @@
 
 			'resolution'		=>	array( 'name' => 'resolution',		'type' => 'tns:ObjectRef', 	'minOccurs' => '0' ),
 			'fixed_in_version'	=>	array( 'name'=>'fixed_in_version',	'type' => 'xsd:string', 	'minOccurs' => '0' ),
+			'target_version'	=>	array( 'name'=>'target_version',	'type' => 'xsd:string', 	'minOccurs' => '0' ),
 
 			'description'				=>	array( 'name' => 'description',				'type' => 'xsd:string', 	'minOccurs' => '0' ),
 			'steps_to_reproduce'		=>	array( 'name' => 'steps_to_reproduce',		'type' => 'xsd:string', 	'minOccurs' => '0' ),
Index: mc_project_api.php
===================================================================
--- mc_project_api.php	(revision 5348)
+++ mc_project_api.php	(working copy)
@@ -63,6 +63,7 @@
 
             $t_issue['resolution'] = mci_enum_get_array_by_id( $t_issue_data['resolution'], 'resolution', $t_lang );
             $t_issue['fixed_in_version'] = mci_null_if_empty( $t_issue_data['fixed_in_version'] );
+            $t_issue['target_version'] = mci_null_if_empty( $t_issue_data['target_version'] );
 
             $t_issue['description'] = bug_get_text_field( $t_id, 'description' );
             $t_issue['steps_to_reproduce'] = mci_null_if_empty( bug_get_text_field( $t_id, 'steps_to_reproduce' ) );
mantis_svn_diff.txt (3,600 bytes)   

Relationships

related to 0008284 closedvboctor SOAP API doesn't support target_version 
related to 0009337 closedvboctor [patch] Target version is not erased anymore when using the SOAP API 

Activities