MantisBT - TestLink
View Issue Details
0007696TestLinkTest Specification Importpublic2016-10-07 12:462017-01-22 08:06
kanaduchi 
fman 
highmajoralways
closedfixed 
1.9.15 (2015 Q4) 
1.9.16 (2016 Q4) 
MySQL
TBD
0007696: testsuite.class.php has incorrect code on importing whole testsuite specification
testsuite.class.php has incorrect code on import testsuites.

At line 242:

      if( !is_null($name) )
      {
        $sql = " SET name='" . $this->db->prepare_string($name) . "' ";
        $sql = $sqlUpd . $sql . $where;
        $result = $this->db->exec_query($sql);
      }
      
      if( !is_null($node_order) && intval($node_order) > 0 )
      {
        $sql .= ' SET node_order=' . $this->db->prepare_int(intval($node_order));
        echo $sql;
        $sql = $sqlUpd . $sql . $where;
        $result = $this->db->exec_query($sql);
      }

This code generates incorrect SQL:
/* Class:testsuite - Method: update */ UPDATE nodes_hierarchy SET name='Search result' WHERE id = 42099 SET node_order=6

I've look at github and found that this code was added in commit:
Feature 7633: API-XMLRPC - updateTestSuite() from 6 August
No tags attached.
Issue History
2016-10-07 12:46kanaduchiNew Issue
2016-10-08 07:16fmanNote Added: 0025493
2016-10-08 07:39fmanNote Added: 0025498
2016-10-08 07:40fmanQA Team - Task Workflow Status => TBD
2016-10-08 07:40fmanFixed in Version => 1.9.16 (2016 Q4)
2016-10-08 07:40fmanStatusnew => resolved
2016-10-08 07:40fmanResolutionopen => fixed
2016-10-08 07:40fmanAssigned To => fman
2017-01-22 08:06fmanNote Added: 0025891
2017-01-22 08:06fmanStatusresolved => closed

Notes
(0025493)
fman   
2016-10-08 07:16   
Thanks for help
(0025498)
fman   
2016-10-08 07:39   
https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/1fa41e7ca1eefa55ceaffac8c44a219c05e710e2 [^]
(0025891)
fman   
2017-01-22 08:06   
1.9.16 released