Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008524TestLinkTest Specificationpublic2018-12-24 08:462018-12-24 14:19
Reportercartman 
Assigned Tofman 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSRed Hat Enterprise Linux ServerOS Version6.7
Product Version1.9.18 (2018 Q3) 
Fixed in Version1.9.19 (2019 Q1) 
Summary0008524: Postgres - crash due to FK when removing step from executed testcase
Descriptionwhen deleting step from an executed test case 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(/* Class:testcase - Method: delete_step_by_id */ DELETE FROM tcsteps WHERE id IN (22219) ) called at [/app/testlink/lib/functions/testcase.class.php:5456]
#1 testcase->delete_step_by_id(22219) called at [/app/testlink/lib/testcases/testcaseCommands.class.php:756]
0000002 testcaseCommands->doDeleteStep(stdClass Object ([assigned_keywords_list] => ,[container_id] => 0,[file_id] => 0,[tcase_id] =>latest_tcase_version_number,[latest_tcase_version_id] => latest_tcase_version_id,[latest_req_version] => latest_req_version,[latest_req_version_id] => latest_req_version_id,[latest_rspec_revision] => latest_rspec_revision),[*auditCfg] => stdClass Object ([eventSource] => GUI,[logEnabled] => 1)),[21] => tlRight Object (
Steps To Reproduce1.follow the link test specification and perform the steps:
 1.1. create a new test case in the test suite
 1.2. add a new step in the test case

2. follow the link Add / Remove Test Cases link and assign test-case to user

3. follow the link Execute Tests and perform the steps:
 3.1. pass the test step marking it passed
 3.2. pass the test case setting the result as passed

4.follow the link test specification and perform the steps:
  4.1. select the passed test case in the test tree in the left pane
  4.2. remove test step from test case
Additional Informationthe events have the following information:

ERROR ON exec_query () - database.class.php
-1 - ERROR: UPDATE or DELETE in the "tcsteps" table violates the foreign key "execution_tcsteps_tcstep_id_fkey" of the table "execution_tcsteps" DETAIL: On the key (id) = (22219) There are still links in the "execution_tcsteps" table. - / * Class: testcase - Method: delete_step_by_id * / DELETE FROM tcsteps WHERE id IN (22219)
THE MESSAGE: / * Class: testcase - Method: delete_step_by_id * / DELETE FROM tcsteps WHERE id IN (22219) Query failed : errorcode [-1] errormsg: ERROR: UPDATE or DELETE in the "tcsteps" table violates the foreign key constraint "execution_tcsteps_tcstep_id_fkey" of the "execution_tcsteps" table
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 0008397assignedfman Availables hot-fixes for 1.9.18 & How To get full fixed package from GitHub 

-  Notes
(0028385)
fman (administrator)
2018-12-24 11:27

Please do not add tons of text that make things impossible to read.
Take the time to analyze the error, and provide the significant text.
(0028386)
fman (administrator)
2018-12-24 11:30

isssue arise due to FK in postgres.
Going to fix
(0028387)
fman (administrator)
2018-12-24 12:55

https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/fa8a138959085b921975d2f0c86b5393aaa81681 [^]
(0028388)
cartman (reporter)
2018-12-24 14:19

thank you so much fman! This fix resolves the issue. Now deleting a step works as expected.

- Issue History
Date Modified Username Field Change
2018-12-24 08:46 cartman New Issue
2018-12-24 11:27 fman Note Added: 0028385
2018-12-24 11:29 fman QA Team - Task Workflow Status => TBD
2018-12-24 11:29 fman Description Updated View Revisions
2018-12-24 11:30 fman Note Added: 0028386
2018-12-24 12:53 fman Summary database error when removing step from executed testcase => Postgres - crash due to FK when removing step from executed testcase
2018-12-24 12:55 fman QA Team - Task Workflow Status TBD => READY FOR TESTING
2018-12-24 12:55 fman Note Added: 0028387
2018-12-24 12:55 fman Status new => resolved
2018-12-24 12:55 fman Fixed in Version => 1.9.19 (2019 Q1)
2018-12-24 12:55 fman Resolution open => fixed
2018-12-24 12:55 fman Assigned To => fman
2018-12-24 12:55 fman Relationship added child of 0008397
2018-12-24 14:19 cartman Note Added: 0028388



Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker