Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003987TestLinkGeneralpublic2010-11-08 17:142012-09-01 19:59
Reporterkinow 
Assigned Tokinow 
PrioritynormalSeverityfeature requestReproducibilityN/A
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.9 RC 1 
Fixed in Version1.9.4 (2012 Q3 - bug fixing) 
Summary0003987: Contribution - Add attachments to a Test Plan
DescriptionHi guys, I was playing around with TestLink source code and reading some issues here in Mantis. After reading issue 2178 by keeyou I did as he suggested and added some code to enable Test Plans to have attachments.

What do you guys think? I'm using TestLink 1.9 QA - 20101107.

BTW, I couldn't find what I had to do once a Test Plan was deleted. Should the attachments be deleted as well? If so, I didn't implement it yet )-:

Cheers
TagsNo tags attached.
Database (MySQL,Postgres,etc)MySQL 5>
BrowserFirefox/IE
PHP Version5.3 x86 thread-safe VC 6
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Files? file icon planEdit.php [^] (10,648 bytes) 2010-11-08 17:17
? file icon planEdit.tpl [^] (6,840 bytes) 2010-11-08 17:17
? file icon planEdit_20120810.php [^] (11,074 bytes) 2012-08-10 17:00
? file icon planEdit_20120810.tpl [^] (6,855 bytes) 2012-08-10 17:00

- Relationships

-  Notes
(0012327)
fman (administrator)
2010-11-08 18:49
edited on: 2010-11-08 19:32

>> BTW, I couldn't find what I had to do once a Test Plan was deleted.
What is the use of having an attachment that has no more parent ?
You always need to follow our patterns => look what is done when a test case is deleted.

Please use following development guides
1. add on each file header a comment regarding issue (as you have done on functions)

2. follow TL standard naming convention -> tplanID OK , planID KO (planEdit.tpl)

Please add screenshots regarding screen changes

Thanks for your help

(0012335)
kinow (reporter)
2010-11-08 19:47

I think I wasn't thinking clearly when I wrote that Francisco hahaha, thanks for the heads up.

I checked what is done when a Test Case is deleted and noticed it is already done with test plans. When the user deletes the test plan it already calls the method deleteAttachments from the super class tlObjectWithAttachments.

Just to make sure, I tested deleting the Test Plan and all its attachments were deleted too.

I'm enjoying get the gist of TestLink code :-) I hope someday I can contribute to TestLink with some important issue. Thanks!
(0012337)
Julian (reporter)
2010-11-08 20:31

Reminder sent to: amitkhullar, Eloff

would one of you please take care of this issue ?

please let me know if you want this to be part of 1.9.1 or 2.0

thanks
(0012338)
fman (administrator)
2010-11-08 20:33

If you can help good!, we can start assigning you minor issues , in this way you will do a soft start. (by the way any issue have his part of challenge :) ).
During this period you will not have CVS write access, but you will have to attach your code for reviews (done normally by me).
Then after both parts (you and dev team) feels confident we can talk about CVS write access.

Let me know.

Francisco
(0012342)
kinow (reporter)
2010-11-08 22:57

Thanks a lot Francisco! That would be great!

I'm up for it. After reading the documentation and inspecting the code I have to agree with you that it takes some time to be able to do some changes in the code confidently and without mistakes. If you, or some other dev, could review my code that would be much appreciated.

Thanks again.

Bruno
(0012345)
fman (administrator)
2010-11-09 10:31

I've do a quick review as you have seen.
I will give a better look and give you feedback (anyway the changes for this issue are minimal => very difficult to make errors)
(0012346)
kinow (reporter)
2010-11-09 10:51

Cool, thanks a lot Francisco. I hope I didn't make any mistake in this minor issue (-:
(0017066)
KuiBie (reporter)
2012-08-08 15:55

Hello,

I was wondering if there are any new developments regarding this issue.
It's a highly anticipated feature for me because if it was implemented, I could add my risk analysis and other documents as attachments to the test plan.

Sincerely
(0017067)
fman (administrator)
2012-08-08 19:25

no plans to add to official 1.9.4 release.
You can use attached code and give a try
(0017070)
kinow (reporter)
2012-08-09 00:30

Hi KuiBie, I'm leaving on vacations for a few days, but if you can give it a try as @fman said, before Friday, I can try to fix any bugs you may find, or update this issue.

Thanks, -B
(0017077)
KuiBie (reporter)
2012-08-10 10:16

Hey guys,

I added kinow's changes to my own planEdit.php and planEdit.tpl.
Once I opened the "Edit Test Plan" window I saw the "Attached files" frame.
I uploaded a file, opened it, and deleted it. No problems there.

I don't know what it means, but maybe the next information is useful to you.
When I checked the events I had multiple warnings that downloadOnly was an Undefined index in ...\templates_c\...planEdit.tpl.php.

Other than that everything seems to work ok.
Thank you.
(0017078)
kinow (reporter)
2012-08-10 17:02

Hi KuiBie!

Nice catch, I wasn't sending the downloadOnly variable. This variable defines whether a user can edit the attachment or just download it. I've updated the code to show the attachment as download only, if the user has no rights to edit it (it is the same right as to create/edit a test plan).

@fman, should I merge this code in testlink_1_9?

Cheers, -B
(0017080)
kinow (reporter)
2012-08-10 23:55

@fman: Merged the code few hours ago, and now added a new test case in tlqarepo (under Test Plan Management / Attachments). I did some simple tests with the version of testlink_1_9, and everything seems to be working fine. Let me know if anything is broken and I will fix it right away.

Thanks
(0017081)
fman (administrator)
2012-08-11 12:11

@kinow
please do not forget to follow the standard guidelines:
when resolving an issue to have to indicate on what version it has been solved.

New guideline:
change task workflow status to READY TO BE TESTED
(0017082)
fman (administrator)
2012-08-11 14:45
edited on: 2012-08-11 14:49

issues
1. the attach section has not to be displayed when CREATING a test plan, because you do not have test plan id yet.

2. when creating test plan 2 as COPY of test plan 1, and test plan 1 has attachments: test plan 2 DO NOT HAVE THE ATTACHMENTS.
here two options COPY ALWAYS without asking.
add a new option: do you want to copy attachments?

(0017083)
kinow (reporter)
2012-08-13 00:29

Hi @fman!

>issues
>1. the attach section has not to be displayed when CREATING a test plan, >because you do not have test plan id yet.

True! I've fixed that, sorry.

>2. when creating test plan 2 as COPY of test plan 1, and test plan 1 has >attachments: test plan 2 DO NOT HAVE THE ATTACHMENTS.
>here two options COPY ALWAYS without asking.
>add a new option: do you want to copy attachments?

Hmmm, also forgot about that. I've included this option now, and will add more tests to tlqarepo. Thanks!

The commit: https://gitorious.org/testlink-ga/testlink-code/commit/1d58e8007caaae2b95ac91674e7ef0cb7d8165c1 [^]

@KuiBie: all ready, the code is ready for test (and probably is being tested right now ;-).

Thanks all! -B
(0017084)
kinow (reporter)
2012-08-13 00:31

@fman,

>please do not forget to follow the standard guidelines:
>when resolving an issue to have to indicate on what version it has been solved.

Damn! Thought I wouldn't make any mistake this time :/ Will pay more attention next time.

>New guideline:
>change task workflow status to READY TO BE TESTED

Hmmm, this will be useful, specially for the QA team, in case they want to check which features are ready for test. Good idea.

Thanks, -B
(0017294)
fman (administrator)
2012-09-01 19:59

1.9.4 released

- Issue History
Date Modified Username Field Change
2010-11-08 17:14 kinow New Issue
2010-11-08 17:17 kinow File Added: planEdit.php
2010-11-08 17:17 kinow File Added: planEdit.tpl
2010-11-08 18:49 fman Note Added: 0012327
2010-11-08 19:32 fman Note Edited: 0012327 View Revisions
2010-11-08 19:47 kinow Note Added: 0012335
2010-11-08 20:31 Julian Note Added: 0012337
2010-11-08 20:33 fman Note Added: 0012338
2010-11-08 22:57 kinow Note Added: 0012342
2010-11-09 10:31 fman Note Added: 0012345
2010-11-09 10:51 kinow Note Added: 0012346
2012-08-08 15:55 KuiBie Note Added: 0017066
2012-08-08 19:25 fman Note Added: 0017067
2012-08-09 00:30 kinow Note Added: 0017070
2012-08-10 10:16 KuiBie Note Added: 0017077
2012-08-10 15:35 fman Assigned To => kinow
2012-08-10 15:35 fman Status new => assigned
2012-08-10 17:00 kinow File Added: planEdit_20120810.php
2012-08-10 17:00 kinow File Added: planEdit_20120810.tpl
2012-08-10 17:02 kinow Note Added: 0017078
2012-08-10 23:55 kinow Note Added: 0017080
2012-08-10 23:56 kinow Task Workflow Status => TBD
2012-08-10 23:56 kinow Status assigned => resolved
2012-08-10 23:56 kinow Resolution open => fixed
2012-08-11 12:11 fman Note Added: 0017081
2012-08-11 12:11 fman Task Workflow Status TBD => READY FOR TESTING
2012-08-11 12:11 fman Fixed in Version => 1.9.4 (2012 Q3 - bug fixing)
2012-08-11 14:45 fman Note Added: 0017082
2012-08-11 14:49 fman Note Edited: 0017082 View Revisions
2012-08-13 00:29 kinow Note Added: 0017083
2012-08-13 00:29 kinow Status resolved => assigned
2012-08-13 00:29 kinow Resolution fixed => reopened
2012-08-13 00:31 kinow Note Added: 0017084
2012-08-13 16:56 fman Status assigned => resolved
2012-08-13 16:56 fman Resolution reopened => fixed
2012-09-01 19:59 fman Note Added: 0017294
2012-09-01 19:59 fman Status resolved => closed



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker