Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008518TestLinkTest Plan - Add/Remove Test Casespublic2018-12-20 12:362018-12-24 08:23
Reportercartman 
Assigned Tofman 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version1.9.18 (2018 Q3) 
Fixed in Version1.9.19 (2019 Q1) 
Summary0008518: database error when removing testcase from testplan
Descriptionwhen deleting test cases from a test plan the next day after adding to the test plan, a database error occurs

 ==============================================================================
 DB Access Error - debug_print_backtrace() OUTPUT START
 ATTENTION: Enabling more debug info will produce path disclosure weakness (CWE-200)
            Having this additional Information could be useful for reporting
            issue to development TEAM.
 ==============================================================================
#0 database->exec_query( DELETE FROM executions WHERE testplan_id = 22080 AND ( (tcversion_id = 22108 AND platform_id = 17) ) ) called at [/app/testlink/lib/functions/testplan.class.php:1224]
#1 testplan->unlink_tcversions(22080, Array ([tcversion] => Array ([22107] => 22108),[platform] => Array ([17] => 17),[items] => Array ([22107] => Array ([17] => 22108)))) called at [/app/testlink/lib/plan/planAddTC.php:84]
Steps To Reproduce1. On day x, follow the link test specification and create a new test case in the test suite

2. On day x, follow the link Add / Remove Test Cases link and perform the steps:
  2.1. Assign to user on add
  2.2. Select build
  2.3. check the selected test case and click the Add / Remove selected button

3. On day x, follow the link Execute Tests and pass the added test case

4. On day x+1,follow the link Add / Remove Test Cases link and perform the steps:
  4.1 Check executed test case for remove
  4.2 click the button Add / Remove selected
Additional Informationin the events we can see the following information:

ERROR ON exec_query () - database.class.php
-1 - ERROR: UPDATE or DELETE in the "executions" table violates the foreign key constraint "execution_tcsteps_execution_id_fkey" of the table "execution_tcsteps" DETAIL: By key (id) = (42625) There are still links in the "execution_tcsteps" table. - DELETE FROM executions WHERE testplan_id = 22080 AND (((tcversion_id = 22108 AND platform_id = 17))
THE MESSAGE: DELETE FROM executions WHERE testplan_id = 22080 AND ((tcversion_id = 22108 AND platform_id = 17)) Query failed: errorcode [-1] errormsg: ERROR: UPDATE or DELETE in the "executions" table violates the foreign key constraint "execution_tcsteps_execution_id_fkey" of the "execution_tcsteps" table DETAIL: The key (id) = (42625) still has links in the table "execution_tcsteps".

when removing executed test cases from a test plan on the same day after adding a plan to the test, there is no error, everything works.
TagsNo tags attached.
Database (MySQL,Postgres,etc)Postgres
BrowserChrome 62.0.3202.89
PHP Version7.0.31
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Files

- Relationships
child of 0008397closedfman Availables hot-fixes for 1.9.18 & How To get full fixed package from GitHub 

-  Notes
(0028370)
fman (administrator)
2018-12-21 19:18

Issue is not related to time, but to missing delete of test case step executions
(0028371)
fman (administrator)
2018-12-22 12:58

https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/f57eb7d56d9c6d69dcb61e19148e735c8191a35c [^]
(0028381)
cartman (reporter)
2018-12-24 07:43

thanks this fix helped
works as expected
(0028382)
fman (administrator)
2018-12-24 08:23

great!

- Issue History
Date Modified Username Field Change
2018-12-20 12:36 cartman New Issue
2018-12-21 19:18 fman Note Added: 0028370
2018-12-22 12:58 fman QA Team - Task Workflow Status => READY FOR TESTING
2018-12-22 12:58 fman Note Added: 0028371
2018-12-22 12:58 fman Status new => resolved
2018-12-22 12:58 fman Fixed in Version => 1.9.19 (2019 Q1)
2018-12-22 12:58 fman Resolution open => fixed
2018-12-22 12:58 fman Assigned To => fman
2018-12-22 12:59 fman Relationship added child of 0008397
2018-12-24 07:43 cartman Note Added: 0028381
2018-12-24 08:23 fman Note Added: 0028382



Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker