Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008502TestLinkTest Cases Assigned to Mepublic2018-12-12 15:002019-07-24 15:05
Reporterjanzhanal 
Assigned Tofman 
PrioritylowSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSCentos OS Version7.6
Product Version1.9.18 (2018 Q3) 
Fixed in Version1.9.20 Raijing DEV 
Summary0008502: Delete testcase version
DescriptionWhen deleting active version of testcase attached log is displayed. User has rights for deleting tescases
Steps To ReproduceCreate testcase version.
Try to delete this version.
After confirmation error is shown.
Additional InformationDon't hesitate to ask for more details if needed!
TagsNo tags attached.
Database (MySQL,Postgres,etc)Postgres
BrowserFirefox
PHP Versionlatest
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Filestxt file icon testlink_db_bug.txt [^] (407,063 bytes) 2018-12-12 15:00

- Relationships

-  Notes
(0028315)
fman (administrator)
2018-12-12 19:41

Tested on latest code from github, unable to reproduce.

Please get latest code from github, do fresh install, retest & provide feedback
(0028318)
janzhanal (reporter)
2018-12-13 09:47

Fixed.
(0029039)
janzhanal (reporter)
2019-07-23 15:58

Finaly I managed to isolate the issue, still in the 1.9.19:
Testcase needs to have Keywords.

Then in event table:

ERROR ON exec_query() - database.class.php
-1 - ERROR: update or delete on table "tcversions" violates foreign key constraint "testcase_keywords_tcversion_id_fkey" on table "testcase_keywords"
DETAIL: Key (id)=(6) is still referenced from table "testcase_keywords". - /* Class:testcase - Method: _blind_delete */ DELETE FROM tcversions WHERE id IN (6,6,6,6,6)
THE MESSAGE : /* Class:testcase - Method: _blind_delete */ DELETE FROM tcversions WHERE id IN (6,6,6,6,6)
Query failed: errorcode[-1]
    errormsg:ERROR: update or delete on table "tcversions" violates foreign key constraint "testcase_keywords_tcversion_id_fkey" on table "testcase_keywords"
DETAIL: Key (id)=(6) is still referenced from table "testcase_keywords".


Workaround: remove all keywords from testcase before deleting it.
(0029040)
janzhanal (reporter)
2019-07-23 16:05

Probably related:
http://mantis.testlink.org/view.php?id=8604 [^]
(0029041)
fman (administrator)
2019-07-23 17:01

thanks, this does not happens with mysql because Foreing Keys are not present
going to check
(0029042)
fman (administrator)
2019-07-23 18:46

would you mind to test this fix?
https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/bb8853e489092c8d3d305322b4f611806f68e449 [^]
(0029043)
janzhanal (reporter)
2019-07-24 14:02

Looks good and working,
Thank you
(0029044)
fman (administrator)
2019-07-24 15:04

thanks for the tests

- Issue History
Date Modified Username Field Change
2018-12-12 15:00 janzhanal New Issue
2018-12-12 15:00 janzhanal File Added: testlink_db_bug.txt
2018-12-12 19:41 fman Note Added: 0028315
2018-12-12 19:42 fman Assigned To => fman
2018-12-12 19:42 fman Status new => feedback
2018-12-13 09:47 janzhanal Note Added: 0028318
2018-12-13 09:47 janzhanal Status feedback => assigned
2018-12-13 15:41 fman QA Team - Task Workflow Status => READY FOR TESTING
2018-12-13 15:41 fman Status assigned => resolved
2018-12-13 15:41 fman Fixed in Version => 1.9.19 (2019 Q1)
2018-12-13 15:41 fman Resolution open => fixed
2019-07-23 15:58 janzhanal Note Added: 0029039
2019-07-23 15:58 janzhanal Status resolved => assigned
2019-07-23 15:58 janzhanal Resolution fixed => reopened
2019-07-23 16:05 janzhanal Note Added: 0029040
2019-07-23 17:01 fman Note Added: 0029041
2019-07-23 18:46 fman Note Added: 0029042
2019-07-23 18:46 fman Status assigned => feedback
2019-07-24 14:02 janzhanal Note Added: 0029043
2019-07-24 14:02 janzhanal Status feedback => assigned
2019-07-24 15:04 fman Note Added: 0029044
2019-07-24 15:05 fman Fixed in Version 1.9.19 (2019 Q1) => 1.9.20 Raijing DEV
2019-07-24 15:05 fman Status assigned => resolved
2019-07-24 15:05 fman Resolution reopened => fixed



Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker