Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007772TestLinkTest Executepublic2016-12-05 22:152017-01-22 08:06
Reporteranton7811 
Assigned Tofman 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformLinuxOSScientific LinuxOS Version7
Product Version1.9.14 (2015 Q3) 
Fixed in Version1.9.16 (2016 Q4) 
Summary0007772: Attachements are not deleted if related build isremoved.
DescriptionIn case I remove test execution its attachments are also deleted.
When I remove build test executions are deleted but attachments are still in place.
Additional InformationI know that 1.9.14 isn't the last release but I'd like to have a fix for it. The last release uses features from MySQL5.6/MariaDB10 which are not accessible for my production platform.
TagsNo tags attached.
Database (MySQL,Postgres,etc)MariaDB 5.5
Browser
PHP Version
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Files

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

-  Notes
(0025659)
fman (administrator)
2016-12-06 23:14

1) First you need to test on latest stable release in a sandbox, to check if issue is still present
2) Unfortunately you do not provide detailed steps to reproduce then I do not understand step to do for 'remove build test executions', because you can not execute a test case without a testplan and a build
(0025681)
anton7811 (reporter)
2016-12-07 05:21

1) The issue is reproducible on the latest 1.9.15 release on ubuntu 16.04 with PHP7.
2)
- Open "Test Execution". Set execution result for some build and attach a file.
- Look into upload_area/execution - file is there
- Delete test execution result.
- Look into upload_area/execution - file is removed. Folder related to execution ID is empty.
- Set execution result for some test again and attach a file
- Go to TEst Plan -> Builds/Releases and delete appropriate build.
It shows warning that "All dependant data (i.e., test results) will also be deleted!" However attachments are still in the upload_area/execution/<execution_id>
(0025693)
fman (administrator)
2016-12-07 18:29

use this

https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/01d3ef44348d0611423d43efd1547f3ef5e08e69 [^]

to compare with file on 1.9.14 and apply differences please provide feedback after test.
(0025695)
anton7811 (reporter)
2016-12-08 01:21

Verified on 1.9.14. It works!

Thank you very much!

Please let me know if you need to verify it on 1.9.15.
(0025700)
fman (administrator)
2016-12-11 14:30

It will be great if you can verify on 1.9.15 and provide feedback
thanks a lot
(0025737)
anton7811 (reporter)
2016-12-15 04:22

In general it works on 1.9.15.
I haven't installed fresh Testlink 1.9.15 for verification, so it contained attachments left after build deletion. After I have applied patch I reported new execution results and delete them. I have then deleted build and fix works.

The only issue I found is the following:
Recently created results used the same ID folders in upload_area/executions as from old deleted build (before patch applied). As a result, after I have reported new execution result, I was able to see previous left (not deleted) attachment!

# Just reported some result with attachment
ubuntu@u1664:/var/www/testlink/upload_area/executions$ find . -name *.png -exec ls -l {} \;
-rw-r--r-- 1 www-data www-data 329144 Dec 6 21:14 ./2/fb6bb8533f83dad0b8ddeb9215ed351f.png
-rw-r--r-- 1 www-data www-data 89455 Dec 14 19:59 ./1/0e0000697f67b3dd9d7898e68580b81e.png <-- Here is it! Somehow it uses an old ID:1
# Deleted result
ubuntu@u1664:/var/www/testlink/upload_area/executions$ find . -name *.png -exec ls -l {} \;
-rw-r--r-- 1 www-data www-data 329144 Dec 6 21:14 ./2/fb6bb8533f83dad0b8ddeb9215ed351f.png <-- ID:1 attachment deleted
# Report a new result with the same attachment as at the first attempt
ubuntu@u1664:/var/www/testlink/upload_area/executions$ find . -name *.png -exec ls -l {} \;
-rw-r--r-- 1 www-data www-data 89455 Dec 14 20:01 ./2/ddf6958b769bccf8da519c41a3c71b80.png <-- Here is it! (check file size) BUT it reuses ID:2 and in web I see 2 attachments instead of 1.
-rw-r--r-- 1 www-data www-data 329144 Dec 6 21:14 ./2/fb6bb8533f83dad0b8ddeb9215ed351f.png

# Delete the whole build
ubuntu@u1664:/var/www/testlink/upload_area/executions$ find . -name *.png -exec ls -l {} \;
# No attachments! Success!

# Afterwards I tried to report a new results, delete them or delete a build and it works. Old IDs were not reused.
ubuntu@u1664:/var/www/testlink/upload_area/executions$ find . -name *.png -exec ls -l {} \;
-rw-r--r-- 1 www-data www-data 89455 Dec 14 20:03 ./3/1646bd0a477198d5810d217fcf9b27fb.png
ubuntu@u1664:/var/www/testlink/upload_area/executions$ find . -name *.png -exec ls -l {} \;
-rw-r--r-- 1 www-data www-data 89455 Dec 14 20:04 ./4/43c37a3b9aaebaeed8da9514c0f6a94b.png
ubuntu@u1664:/var/www/testlink/upload_area/executions$
ubuntu@u1664:/var/www/testlink/upload_area/executions$
ubuntu@u1664:/var/www/testlink/upload_area/executions$
ubuntu@u1664:/var/www/testlink/upload_area/executions$ find . -name *.png -exec ls -l {} \;
ubuntu@u1664:/var/www/testlink/upload_area/executions$ find . -name *.png -exec ls -l {} \;
-rw-r--r-- 1 www-data www-data 89455 Dec 14 20:15 ./5/70aef5bfc13be36d5a00505e60e94c87.png


For fresh installation, users shouldn't see any problems. But if somebody will do upgrade, they might have some side effects.
The good news is that they will be able to manage untracked files )))
(0025884)
fman (administrator)
2017-01-22 08:06

1.9.16 released

- Issue History
Date Modified Username Field Change
2016-12-05 22:15 anton7811 New Issue
2016-12-06 23:14 fman Note Added: 0025659
2016-12-06 23:14 fman Assigned To => fman
2016-12-06 23:14 fman Status new => feedback
2016-12-07 05:21 anton7811 Note Added: 0025681
2016-12-07 05:21 anton7811 Status feedback => assigned
2016-12-07 18:29 fman Note Added: 0025693
2016-12-07 18:29 fman Status assigned => feedback
2016-12-07 18:30 fman Relationship added child of 0007666
2016-12-07 18:34 fman QA Team - Task Workflow Status => TBD
2016-12-07 18:34 fman Fixed in Version => 1.9.16 (2016 Q4)
2016-12-08 01:21 anton7811 Note Added: 0025695
2016-12-08 01:21 anton7811 Status feedback => assigned
2016-12-11 14:30 fman Note Added: 0025700
2016-12-11 14:30 fman Status assigned => feedback
2016-12-15 04:22 anton7811 Note Added: 0025737
2016-12-15 04:22 anton7811 Status feedback => assigned
2016-12-17 05:42 fman QA Team - Task Workflow Status TBD => READY FOR TESTING
2016-12-17 05:42 fman Status assigned => resolved
2016-12-17 05:42 fman Resolution open => fixed
2017-01-22 08:06 fman Note Added: 0025884
2017-01-22 08:06 fman Status resolved => closed



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker