@@ -216,8 +216,8 @@ class TestlinkXMLRPCServer extends IXR_Server {
216216    public  static  $ testCaseVersionParamName"tcversion " ;
217217    public  static  $ itsNameParamName"itsname " ;
218218    public  static  $ itsEnabledParamName"itsenabled " ;
219-     public  static  $ itsTypeParamName"itstype " ;
220-     public  static  $ itsCfgParamName"itscfg " ;
219+     public  static  $ itsTypeParamName"type " ;
220+     public  static  $ itsCfgParamName"cfg " ;
221221    public  static  $ itsIDParamName"itsid " ;
222222
223223    public  static  $ copyTestersFromBuildParamName"copytestersfrombuild " ;
@@ -8364,6 +8364,8 @@ public function updateIssueTrackerSystem($args) {
83648364     * @param string $args["devKey"] 
83658365     * @param string $args["itsid"] ITS ID 
83668366     * @param string $args["testprojectid"] Project ID 
8367+      * @param boolean $args["itsEnabled"] Enabled the ITS or not 
8368+      *                OPTIONAL 
83678369     * @access public 
83688370     */ 
83698371    public  function  setTestProjectITS ($ args
@@ -8378,16 +8380,34 @@ public function setTestProjectITS($args) {
83788380                return  $ this errors ;
83798381            }
83808382
8383+             $ itsID$ this args [self ::$ itsIDParamName
83818384            if  ($ this args [self ::$ itsIDParamName"" ) {
83828385                if (is_null ( $ this itsMgr  )) {
83838386                    $ this itsMgr  = new  tlIssueTracker ( $ this dbObj  );
83848387                }
83858388
8386-                 $ this itsMgr ->link ($ this args [self ::$ itsIDParamName$ this args [self ::$ testProjectIDParamName
8389+                 $ projectID$ this args [self ::$ testProjectIDParamName
8390+                 $ this itsMgr ->link ($ itsID$ projectID
83878391                $ resultInfoarray ();
8388-                 $ resultInfoarray ("operation "  => __FUNCTION__ ,
8389-                                      "additionalInfo "  => null ,
8390-                                      "status "  => true , "id "  => $ this args [self ::$ testProjectIDParamName"message "  => GENERAL_SUCCESS_STR );
8392+                 $ resultInfoarray ("operation "  => "link ITS " ,
8393+                                      "additionalInfo "  => "ITS ID  "  . $ itsID
8394+                                      "status "  => true ,
8395+                                      "id "  => $ projectID"message "  => GENERAL_SUCCESS_STR );
8396+ 
8397+                 // enable the ITS if needed 
8398+                 $ isEnabledfalse ;
8399+                 if  ($ this _isParamPresent (self ::$ itsEnabledParamName
8400+                     $ isEnabled$ this args [self ::$ itsEnabledParamName0 );
8401+                 }
8402+ 
8403+                 if  ($ isEnabled
8404+                     $ this tprojectMgr ->enableIssueTracker ($ projectID
8405+                     $ resultInfoarray ("operation "  => "enable ITS " ,
8406+                                          "additionalInfo "  => null ,
8407+                                          "status "  => true ,
8408+                                          "id "  => $ projectID"message "  => GENERAL_SUCCESS_STR );
8409+                 }
8410+ 
83918411                return  $ resultInfo
83928412            } else  {
83938413                $ this errors [] = new  IXR_Error (NO_ITSID , $ messagePrefixNO_ITSID_STR );
0 commit comments