Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004256TestLinkExport/Importpublic2011-02-17 22:092011-03-23 10:57
Reporterfrl 
Assigned Tofman 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformApache 2.2 - PHP 5.x - MySQL 5.xOSWindows 7 & Linux Debian 5OS Version
Product Version1.9.1 (bug fixing) 
Fixed in Version1.9.2 (2011 Q2 - bug fixing) 
Summary0004256: Import Req. Specs with cfield stops with SQL fatal error instead of clear message when req. creation failed
DescriptionReq Specs XML File import stops when a requirement creation failed (2 reqs with same title for example) with following error message displayed on screen :

=> Remaining (valid) requirements in the imported file are not imported in project

==============================================================================
 DB Access Error - debug_print_backtrace() OUTPUT START
 ==============================================================================
#0 database->exec_query(/* Class:cfield_mgr - Method: design_values_to_db */ SELECT value FROM cfield_design_values WHERE field_id=11 AND node_id=) called at [D:\EasyPHP-5.3.5.0\www\testlink-1.9.1\lib\functions\cfield_mgr.class.php:865]
#1 cfield_mgr->design_values_to_db(Array ([11] => Array ([type_id] => 9,[cf_value] => Generic)), , , simple) called at [D:\EasyPHP-5.3.5.0\www\testlink-1.9.1\lib\functions\requirement_mgr.class.php:1524]
0000002 requirement_mgr->createFromMap(Array ([node_order] => 1,[title] => TestForDuplicateReq,[docid] => RQT-RDD-2,[description] => La plateforme doit pouvoir être utilisée par plusieurs personnes si
Steps To Reproduce- create an empty project
- assign a CF to requirement model in your projet (CF_RQ_CLASS - type radio with 2 possible values Generic|Specific for example file provided)
- go to Import Req. Specs Screens
- import a Req Specs XML File with 2 requirements with same title (cf example file provided)
- you get the error message just above
Additional InformationBug Analysis (on TL 1.9.1) - see ./lib/functions/requirement_mgr.class.php

1 - method create() does not return a null object when check_basic_data() failed (here because duplicate req title) but an array ($result)
2 - in createFromMap () - line 1396 - $newReq is not set with a valid req object but $status_ok remains true
3 - in createFromMap () - line 1493 - $req_version_id assignment fails which causes the error during call $this->cfield_mgr->design_values_to_db($cf2insert,$req_version_id,null,'simple'); (line 1525)

Fix : added test after create() call line 1399 of requirement_mgr.class.php

1396 $newReq = $this->create(...);
1399 // FRL : patch error import when req creation failed
1400 //$msgID = 'import_req_created';
... $status_ok = ($newReq['status_ok'] == 1);
            if ($status_ok)
            {
                $msgID = 'import_req_created';
            }
            else
            {
                $result = $newReq;
            }
TagsNo tags attached.
Database (MySQL,Postgres,etc)mySQL 5.x
BrowserIE 8
PHP Version5.x
TestCaseID
QA Team - Task Workflow Status
Attached Filesxml file icon Req_2011-02-16_19-40-15.xml [^] (1,521 bytes) 2011-02-17 22:09

- Relationships
related to 0004210closedfman import requirements csv file containing more than 1500 requirements done partially 

-  Notes
(0013669)
fman (administrator)
2011-02-17 23:06

always submit complete functional file attached in zip format, is the easier way for dev team to use.
(0014218)
frl (reporter)
2011-03-22 23:58

pbm fixed in TL 1.9.2 (with changes made for issue#4210)

- Issue History
Date Modified Username Field Change
2011-02-17 22:09 frl New Issue
2011-02-17 22:09 frl File Added: Req_2011-02-16_19-40-15.xml
2011-02-17 23:04 fman Description Updated View Revisions
2011-02-17 23:06 fman Note Added: 0013669
2011-02-17 23:06 fman Assigned To => fman
2011-02-17 23:06 fman Status new => assigned
2011-03-22 23:58 frl Note Added: 0014218
2011-03-23 10:56 fman Relationship added related to 0004210
2011-03-23 10:56 fman Fixed in Version => 1.9.2 (2011 Q2 - bug fixing)
2011-03-23 10:57 fman Status assigned => closed
2011-03-23 10:57 fman Resolution open => fixed



Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker