Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007765TestLinkTest Project Managementpublic2016-11-29 20:122017-01-22 07:57
Reporterlczub 
Assigned Tofman 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.9.15 (2015 Q4) 
Fixed in Version1.9.16 (2016 Q4) 
Summary0007765: deleting test projects with execution step results raise fatale db error
Descriptiondeleting test projects with execution step results (table execution_tcsteps) raise fatale db error


Problem is reproducable with 1.9.14, 1.9.15 and current 1.9.16 developement state (commit 933f2fe)
Steps To Reproduce1. create test project with test case and test plan
2. execute test case with adding execution step results
3. delete test project -> fatal db error

ERROR ON exec_query() - database.class.php
-1 - FEHLER: Aktualisieren oder Löschen in Tabelle »executions« verletzt Fremdschlüssel-Constraint »execution_tcsteps_execution_id_fkey« von Tabelle »execution_tcsteps« DETAIL: Auf Schlüssel (id)=(1688) wird noch aus Tabelle »execution_tcsteps« verwiesen. - DELETE FROM executions WHERE testplan_id=12530
Additional InformationSuggestion for fix :

reason is a missing sql DELETE statement for table execution_tcsteps in testlink-git/lib/functions/testplan.class.php near line 1867:
  
  function delete($id)
  {
    ...
    // When deleting from executions, we need to clean related tables
    $the_sql[]="DELETE FROM {$this->tables['execution_tcsteps']} WHERE execution_id ".
           "IN (SELECT id FROM {$this->tables['executions']} WHERE testplan_id={$id})";
    ...
TagsNo tags attached.
Database (MySQL,Postgres,etc)psql 9.2
Browser
PHP Version
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Files

- Relationships

-  Notes
(0025672)
fman (administrator)
2016-12-06 23:39

Thanks a lot for your help (testing on MySQL without constraint is the reason why this was not catched)
(0025809)
fman (administrator)
2016-12-28 18:52

Please get latest code from github, do fresh install, retest and provide feedback
(0025838)
fman (administrator)
2017-01-14 18:02

no more user feedback
(0025866)
fman (administrator)
2017-01-22 07:57

1.9.16 released

- Issue History
Date Modified Username Field Change
2016-11-29 20:12 lczub New Issue
2016-12-06 23:39 fman Note Added: 0025672
2016-12-06 23:40 fman QA Team - Task Workflow Status => TBD
2016-12-28 18:51 fman QA Team - Task Workflow Status TBD => READY FOR TESTING
2016-12-28 18:52 fman Note Added: 0025809
2016-12-28 18:52 fman Assigned To => fman
2016-12-28 18:52 fman Status new => feedback
2017-01-14 18:02 fman Note Added: 0025838
2017-01-14 18:02 fman Status feedback => resolved
2017-01-14 18:02 fman Resolution open => fixed
2017-01-14 18:04 fman Fixed in Version => 1.9.16 (2016 Q4)
2017-01-22 07:57 fman Note Added: 0025866
2017-01-22 07:57 fman Status resolved => closed



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker