Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005255TestLinkRequirement Managementpublic2012-09-26 22:352013-05-26 18:53
Reporterskilletaudio 
Assigned Tofman 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.9.3 (2011 Q3 - bug fixing) 
Fixed in Version1.9.5 (2012 Q4 - bug fixing) 
Summary0005255: Deleting requirement with relations does not remove requirement, partial deletion, cannot remove
DescriptionWhen a requirement has a relation to another requirement, and the requirement is deleted without deleting the relation first, DB backtrace errors will be printed.

The deleted requirement is not removed from the test requirement specification tree.

Clicking the deleted requirement results in a DB backtrace error being printed on the displayed page. The requirement cannot be succesfully deleted after this point as clicking 'delete' on the displayed page has no effect.

Requirement reports generated can contain DB backtrace errors as well.

I am attaching a text file containing the DB queries logged during the delete action - it is apparant that several 'DELETE FROM' calls are failing due to the entry in req_relations not being deleted first.

Steps To Reproduce* Create test project with requirement feature enabled
* Click Requirement specification
* Create 'section' item at top of requirement spec tree, and create two 'use case' requirements in that section, named requirement1 and requirement2.
* Select requirement1 from tree.
* Set a 'related to' relation on requirement1: related to requirement2. Click 'add' to add relation to requirement1
* Click 'delete' to delete requirement1.
* issue should be reproduced
Additional InformationAlso occurs in 1.9.4 as released, although clicking the requirement that is left in the tree results in the page showing 'the requirement does not exist' rather than a DB backtrace error.

TagsTO BE FIXED on 2.0
Database (MySQL,Postgres,etc)Postgres 8.4
BrowserChrome
PHP Version5.3.3
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Filestxt file icon delete_requirement_DB_log.txt [^] (7,853 bytes) 2012-09-26 22:35 [Show Content]
zip file icon 5255_requirement_mgr.class.zip [^] (50,513 bytes) 2012-09-26 22:48

- Relationships
child of 0005193closedfman Availables hot-fixes for 1.9.4 & How To get full fixed package from gitorious 

-  Notes
(0017571)
skilletaudio (reporter)
2012-09-26 22:39

Please provide workaround / recovery feedback on the issue if possible, as we have several requirement entries in a test project that cannot be removed via the requirement interface - will it be safe to locate the entries in the 'requirements' and 'nodes_hierarchy' table which failed to remove (see attached DB log) and manually delete them?
(0017572)
skilletaudio (reporter)
2012-09-26 22:52

For your review / contribution: I have uploaded a zip file (5255_requirement_mgr.class.zip) containing a tweak to the order of deletion calls which has caused the issue to stop for the repro steps detailed in this ticket.

(archive has files for 1.9.3 and 1.9.4)
(0017574)
fman (administrator)
2012-09-27 08:19

update to 1.9.4 and retest
(0017575)
skilletaudio (reporter)
2012-09-27 14:20

Thanks, I actually did install a fresh copy of 1.9.4 and tested before reporting the bug (See 'additional information')

In 1.9.4 the requirement still fails to delete from the requirement tree, but when you click on it, it loads a page which says 'the requirement does not exist anymore'. In 1.9.3, this page would load as an incomplete edit page with DB error on it.

After reproducing the issue in 1.9.4, I can confirm generating a requirements specification document with all options checked continues to result in DB errors being printed into the generated document, similar to behavior in 1.9.3.
(0017578)
fman (administrator)
2012-09-27 17:36

OK my fault for requesting test on 1.9.4, I'm sorry.

I will try to provide a fix in following days
(0017580)
fman (administrator)
2012-09-27 19:06

Please try with
http://gitorious.org/testlink-ga/testlink-code/commit/f3d418adcaf941a99b333e18ec96e0883e77ee5e [^]

and provide feedback
(0017584)
skilletaudio (reporter)
2012-09-27 21:04

Thank you, I applied the patch provided to 1.9.4 and it seems to have fixed the issue.

- Issue History
Date Modified Username Field Change
2012-09-26 22:35 skilletaudio New Issue
2012-09-26 22:35 skilletaudio File Added: delete_requirement_DB_log.txt
2012-09-26 22:39 skilletaudio Note Added: 0017571
2012-09-26 22:48 skilletaudio File Added: 5255_requirement_mgr.class.zip
2012-09-26 22:52 skilletaudio Note Added: 0017572
2012-09-27 08:19 fman Note Added: 0017574
2012-09-27 14:20 skilletaudio Note Added: 0017575
2012-09-27 17:36 fman Note Added: 0017578
2012-09-27 19:06 fman Note Added: 0017580
2012-09-27 19:06 fman Assigned To => fman
2012-09-27 19:06 fman Status new => feedback
2012-09-27 19:06 fman Tag Attached: TO BE FIXED on 2.0
2012-09-27 19:06 fman Task Workflow Status TBD => READY FOR TESTING
2012-09-27 19:06 fman Fixed in Version => 1.9.5 (2012 Q4 - bug fixing)
2012-09-27 19:07 fman Relationship added child of 0005193
2012-09-27 21:04 skilletaudio Note Added: 0017584
2012-09-27 21:04 skilletaudio Status feedback => assigned
2012-09-27 21:44 fman Status assigned => resolved
2012-09-27 21:44 fman Resolution open => fixed
2013-05-26 18:53 fman Status resolved => closed



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker