Mantis Bugtracker 

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004360TestLinkRequirement Managementpublic2011-03-29 18:442012-09-01 19:59
Assigned Tokinow 
PlatformOSOS Version
Product Version1.9.2 (2011 Q2 - bug fixing) 
Fixed in Version1.9.4 (2012 Q3 - bug fixing) 
Summary0004360: Project Creation: Use of Templates: Requirement/Test Case links are lost when creating a project with the use of a template.
DescriptionWhen ever a project is created with the use of a template, the link in between the requirements and test cases (issued here from the template) is lost, if the user is using the latest fix for issue 0004239

Please view the steps to reproduce for a clear example, these were taken originally from issue 0004239 and modified to the current behavior to have the best relation possible.
Steps To Reproduce1. Create a project named "Test"(this is the template)
2. Create 4 requirements named : RQT_001, RQT_002, RQT_003 and RQT_004
3. Create 4 test cases named : TestCase 1, TestCase 2, TestCase 3, TestCase 4
4. Link each requirement with a testcase :
   RQT_001 linked to TestCase 1
   RQT_002 linked to TestCase 2
   RQT_003 linked to TestCase 3
   RQT_004 linked to TestCase 4
5. Create another project named "Test_Reuse" from the existing one "Test" (created in step 1, this is the template).
6. Select the project named "Test".
7. Click on "Test Specification" tab
8. Click on TestCase 1
9. Please notice that TestCase 1 is properly linked to RQT_001.
10. Select the project named "Test_Reuse".
11. Click on "Test Specification" tab.
12. Click on TestCase 1
13. Please notice that TestCase 1 will not be linked to RQT_001 as it is in the project named "Test" (which was our template for "Test_Reuse")
Tagslanguage, TO BE FIXED on 2.0
Database (MySQL,Postgres,etc)MySQL
PHP Version
QA Team - Task Workflow Status
Attached Files? file icon requirement_mgr.class.php [^] (101,770 bytes) 2011-07-30 10:55

- Relationships
related to 0004239closedkinow Duplicated requirements in testcase layout and duplicated testcases in requirement layout when using testproject reuse feature 
has duplicate 0004591closedfman Creating a new project from an old project does not carry over requirement links any more 

-  Notes
spetitclerc (reporter)
2011-03-29 18:44

Please note that this issue happened directly after the fix for [^] was applied to our TestLink instance.
fman (administrator)
2011-03-29 20:12

Reminder sent to: kinow

do you have time to try to reproduce ?
let me know
kinow (reporter)
2011-03-29 20:22

Sure Francisco, I'm working with requirements relations. I'll give it a try. Thank you.
spetitclerc (reporter)
2011-05-03 17:22

Anything new on this?

kinow (reporter)
2011-05-03 17:32

My bad Simon, I totally forgot about this issue. Give me just a couple of days to reproduce it and update this issue with further information, ok? :-)
spetitclerc (reporter)
2011-05-03 17:46

Oh hey take your time ;-) was just wondering

Thanks for looking at it!

kinow (reporter)
2011-05-03 19:07

Hello again,

I just reproduced this issue and indeed it is not copying the test case / requirement links are not being copied.

I used the latest version of the code from Git master. When I created a new project copying an existing one an error happened while inserting the new project in database.

I will debug it to see what is causing this issue.

Cheers, Bruno.
fman (administrator)
2011-05-03 19:18

do not use HEAD code is under refactoring
use 1.9 branch and fix it on the branch, then when HEAD will be stable you can commit your changes
kinow (reporter)
2011-05-03 22:38

Oh, thank you very much for the heads up Francisco! I'll debug it against branch 1.9 and then I'll commit my changes there. Thanks again!
kinow (reporter)
2011-05-08 01:06

@spetitclerc: Could you try the steps to reproduce this issue using the attached requirement_mgr.class.php file, please? Just copy it to $TESTLINK_HOME/lib/functions/requirement_mgr.class.php (back up existing files or use a test environment :-)

TestLink is creating a new project with test suite, test cases and requirements. However the test cases are being linked to the requirements version in 1.9.2, instead of being linked to the requirement node.

@fman: Francisco, I will have a look at the code, but off the top of your head, do you know if it is safe to change the method copy_to() of requirement_mgr class, please?
fman (administrator)
2011-05-08 09:16

I need to check (also with julian) what has been our design choice:

1. Test Case linked to Req.
2. Test Case VERSION linked to Req VERSION.
Julian (reporter)
2011-05-08 10:19

Might be related to issue 0004239

Our design choice was Test case linked to requirement
spetitclerc (reporter)
2011-05-09 12:15
edited on: 2011-05-09 17:07

@kinow, sure can do, I'll hand the file over to the techs over here and I'll test it as soon as it's possible. Anything in particular we should be looking for? and/or you want us to test besides reproduction?

kinow (reporter)
2011-05-09 12:23

@spetitclerc, with this patched file your scenario should work correctly, however I didn't check to see if other parts of the system were using this code too. I will check that this change does not affect other parts of the system. If you notice anything broken in your projects after this update, please take notes and comment here, then I will be more than glad to have a look on it :-) Cheers, Bruno.
spetitclerc (reporter)
2011-05-09 12:24

@kinow, Right on will do! cheers
spetitclerc (reporter)
2011-06-10 17:49
edited on: 2011-06-10 17:49

@anyone still monitoring this issue, our company's technical team hasn't gotten the chance to hook this patch up, I however couldn't help but notice 0004591 having the same problem and this fixing it.

Can we expect this in 1.9.3? as I'm sure they will be applying the update.

Cheers and thank you again for your great work,


spetitclerc (reporter)
2011-06-15 16:56

@kinow, sorry for the delay, I know it's been a while but we just got around to it:

Tested, everything works A1 and perfect. Thanks again, a ton!
kinow (reporter)
2011-06-15 17:06

@spetitclerc: No worries, happy that it worked! Cheers
Julian (reporter)
2011-07-18 15:45


has this fix been commited and released with 1.9.3 already ?
let me know what the status of this issue is please.
kinow (reporter)
2011-07-18 22:22


Let me recheck it, please. I just changed jobs and now I am having some spare time to work on open source again. Will let you know until Wednesday about this issue's status.
kinow (reporter)
2011-07-20 00:13


Just checked the code in master of testlink gitorious repository and this fix haven't been applied yet. Should I do a push from my repository to TestLink's?
kinow (reporter)
2011-07-30 10:56

Just uploaded the final php file for this issue. Could you review and merge it, please?
fman (administrator)
2011-08-16 19:11

I've review code but is not clear for me why commenting this fix the issue.
can you explain please. ?
fman (administrator)
2011-08-17 19:50

issue seems related to mappings on copy_to() method on requirement class.
We were adding mapping for req and req version and seems we were overwritting req_id with req_version_id.
This seems to have effect on req to test case assignment copy.
I suspect Foreing Key forbid us to do the copy.

I'm going to fix this NOT REMOVING req version mapping, but changing mappings in order to isolate req_id mappings, from req_version_is mappings
kinow (reporter)
2011-08-18 12:10

@fman: Hello Francisco! Hmmmm, I was going to read the code and try to remember why that worked. However looks like you already found the root cause for this issue :) way to go! If you need anything, I will work in TestLink issues again starting on next Monday. Got to finish a project and a presentation for this Saturday :(

Cheers, Bruno
kinow (reporter)
2011-08-27 18:36

@fman: Hi Francisco. @asimon assigned the issue 4239 related to this one to me, however I believe your fix will solve both issues. Do you need anything? I could help testing your changes. I will have some spare time tomorrow at night to work on TestLink again, so let me know if you need anything. Bests, Bruno.
fman (administrator)
2011-09-04 17:42

2.0 [^]
fman (administrator)
2012-09-01 19:59

1.9.4 released

- Issue History
Date Modified Username Field Change
2011-03-29 18:44 spetitclerc New Issue
2011-03-29 18:44 spetitclerc Note Added: 0014355
2011-03-29 20:12 fman Note Added: 0014358
2011-03-29 20:22 kinow Note Added: 0014359
2011-05-03 17:22 spetitclerc Note Added: 0014783
2011-05-03 17:32 kinow Note Added: 0014784
2011-05-03 17:46 spetitclerc Note Added: 0014785
2011-05-03 19:07 kinow Note Added: 0014786
2011-05-03 19:18 fman Note Added: 0014787
2011-05-03 19:24 fman Assigned To => kinow
2011-05-03 19:24 fman Status new => assigned
2011-05-03 22:38 kinow Note Added: 0014788
2011-05-08 00:55 kinow File Added: requirement_mgr.class.php
2011-05-08 01:06 kinow Note Added: 0014811
2011-05-08 09:16 fman Note Added: 0014812
2011-05-08 10:19 Julian Relationship added related to 0004239
2011-05-08 10:19 Julian Note Added: 0014813
2011-05-09 12:15 spetitclerc Note Added: 0014814
2011-05-09 12:23 kinow Note Added: 0014815
2011-05-09 12:23 spetitclerc Note Edited: 0014814 View Revisions
2011-05-09 12:24 spetitclerc Note Added: 0014816
2011-05-09 17:07 spetitclerc Note Edited: 0014814 View Revisions
2011-06-07 21:37 fman Relationship added has duplicate 0004591
2011-06-10 17:49 spetitclerc Note Added: 0015226
2011-06-10 17:49 spetitclerc Note Edited: 0015226 View Revisions
2011-06-15 16:56 spetitclerc Note Added: 0015271
2011-06-15 17:06 kinow Note Added: 0015272
2011-07-18 15:45 Julian Note Added: 0015526
2011-07-18 22:22 kinow Note Added: 0015529
2011-07-20 00:13 kinow Note Added: 0015543
2011-07-30 10:54 kinow File Deleted: requirement_mgr.class.php
2011-07-30 10:55 kinow File Added: requirement_mgr.class(1).php
2011-07-30 10:55 kinow File Deleted: requirement_mgr.class(1).php
2011-07-30 10:55 kinow File Added: requirement_mgr.class.php
2011-07-30 10:56 kinow Note Added: 0015573
2011-08-16 19:11 fman Note Added: 0015681
2011-08-17 19:50 fman Note Added: 0015697
2011-08-17 21:30 fman Tag Attached: TO BE FIXED on 2.0
2011-08-18 12:10 kinow Note Added: 0015710
2011-08-27 18:36 kinow Note Added: 0015761
2011-09-03 14:34 fman Tag Detached: TO BE FIXED on 2.0
2011-09-03 14:40 fman Tag Attached: TO BE FIXED on 2.0
2011-09-04 17:42 fman Note Added: 0015794
2011-09-04 17:43 fman Status assigned => resolved
2011-09-04 17:43 fman Fixed in Version => 1.9.4 (2012 Q3 - bug fixing)
2011-09-04 17:43 fman Resolution open => fixed
2011-09-04 17:44 fman Tag Attached: language
2012-09-01 19:59 fman Note Added: 0017367
2012-09-01 19:59 fman Status resolved => closed

Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker