Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003560TestLinkExport/Importpublic2010-07-01 08:502014-07-27 10:04
ReporterJulian 
Assigned Tokinow 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.9 Beta 4 
Fixed in Version 
Summary0003560: Requirements Export does not Export Requirement Relations
DescriptionRequirements Export does not export Requirement Relations.
TagsNo tags attached.
Database (MySQL,Postgres,etc)
Browser
PHP Version
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Filesxml file icon all-req.xml [^] (2,397 bytes) 2011-02-23 11:33
jpg file icon image_3560.JPG [^] (115,721 bytes) 2011-02-23 11:34


? file icon requirement_mgr.class.php [^] (109,897 bytes) 2011-04-01 12:47
? file icon requirement_spec_mgr.class.php [^] (60,859 bytes) 2011-04-01 12:48
? file icon reqImport.php [^] (10,582 bytes) 2011-04-01 12:48
zip file icon contrib-relImport.zip [^] (78,659 bytes) 2012-01-18 22:54

- Relationships
related to 0006006closedfman Requirement relations are not exported and cannot be imported 
child of 0006048closedfman Availables hot-fixes for 1.9.9 & How To get full fixed package from gitorious 

-  Notes
(0012392)
fman (administrator)
2010-11-10 18:30

@kinow:
1. let's talk about what php files can be good to learn method we are using.
2. work to be with code get from CVS HEAD
(0013244)
Julian (reporter)
2011-01-11 14:57

how are things going ?
(0013296)
kinow (reporter)
2011-01-15 17:59

@fman: I think this issue will give me an insight in many different php files and I can learn a lot with it. Thanks for assigning it to me.

@Julian: Hi Julian, I have some free time this weekend so I'll start working on this issue tonight. Could you point me an entity in TestLink that I can export and it will export its relations too? Maybe TestCase?
(0013297)
fman (administrator)
2011-01-15 19:12

Only entity with relations is REQ => you can not copy from other code.
(0013321)
Julian (reporter)
2011-01-19 06:21

do you have some feedback for us? do not want to hurry you this is more to get to know if there are any problems we could maybe help you with.
(0013435)
kinow (reporter)
2011-01-26 00:43

@Julian:
Hey Julian! It would be great have some help here! Could you correct if what I say is wrong, please? (-:

I was thinking that a requirement relationship was req_spec -> requirements. But it is actually a requirement -> requirement relationship, where one of the requirements is the source, and the other the destination.

Tomorrow I'll read the code that exports the requirements and see how to implement the relations.

@all:
What do you think of this?

-requirement-specification

--req_spec*
--type
--node_order
--total_req
--scope

---requirement*
----docid
----title
----node_order
----description
----status
----type
----expected_coverage

---relation*
----id
----source_id
----destination_id
----relation_type
----author_id
----creation_ts

I will keep the same structure that is now, but I will add the relation child tag, in the same level as <requirement>, but after all requirement's, as mentioned in this issue.

Cheers
(0013471)
Julian (reporter)
2011-01-30 10:51

sounds good - i do not know much about exported file structure, but i think author and creation_ts is not used normally
(0013472)
fman (administrator)
2011-01-30 14:21

@kinow
1. we all have to understand clearly what we are talking about before developing. Misunderstanding on what is req relation is an example.
 
2. part of note 13435 regarding format IMHO is far from clear.

what is this structure presented after
>> @all:
>> What do you think of this?

structure of XML that will be generated ?
is answer is yes, it would be better to display it as what it is an XML, instead
of a pseudo-format.
In addition is not clear what source_id is
If is a DB ID will be not useful, DOCID need to be used.
This means that each piece of XML must be documented, in order to allow users
(not TL developers) to use it.

CRITIC: it was not mention on this issue but you has to work not only on export but also on import to fullfil this requirement.
You need to think how info you have exported will be imported, and what issue you will face like: related REQ non present on system.

Then:
When we export relations need to export all related items ?
What is the drawback of this ?
(0013507)
kinow (reporter)
2011-02-03 21:54

Hi Francisco, no worries, just tried to make things easier to understand. Next time I will use the xml, ok?

I am aware that I will need to export and import the requirements. Before submitting it I will make sure it passes at least in the basic test: create some requirements, make the relations, export the requirements, check the exported files and database, then import the files to a new installation and compare both scenarios.

But about the DOCID, thanks very much. I was wondering if I should follow the physical or the logical entities. I will write some code and upload as soon as the sourceforge.net CVS is back up, so I can check out the code and compare before uploading it here.

Thanks Julian, thanks Francisco. Bruno.
(0013699)
kinow (reporter)
2011-02-20 20:10

Hi, just a quick update. I finished the code to export the relations. Now I'm adding a few verifications in the code. Then I will implement the code to import it. I guess it is easier to implement this part of the code. I'll post the final code as soon as I finish it for revision. Cheers.
(0013729)
kinow (reporter)
2011-02-23 11:32
edited on: 2011-02-23 11:37

Hi all, I need some help here, please (-:

I finished the code to export requirement relations. I was testing it and found a situation where a relation is exported twice. I uploaded the image image_3560.JPG to help you guys understand what is happening.

Basically, I have two requirement specs. Each requirement spec contains two requirements. I created some relations among the requirements. One requirement in the req_spec1 is related to another requirement in the req_spec2.

When I export each req_spec separately, it works perfectly. However when I export all requirements in the project (both req_specs) then the relation between req_1 (in req_spec1) and req_4 (in req_spec2) is exported twice. First in the req_spec_1 and later again in req_spec_2.

The problem is that I cannot decide whether it is correct export this relation only in req_spec_1 or only req_spec_2. A solution would be export duplicated in both req_specs and during the importing check if the relation already exists.

What do you guys think? I would appreciate any idea or suggestion. I uploaded the export xml too, maybe it helps.

Thank you all, hope have been clear in my explanation.

Bruno

(0013866)
Julian (reporter)
2011-03-14 14:37

When importing those relations there has to be a check if relation already exists before adding to database (as you already said). According to Andreas, functions to create relations exist that have this check implemented.

not sure how far you came, but check reqCommands.class.php - doAddReleation().

hope this helps, if not try to send a reminder to Andreas (asimon) and/or fman.
(0014265)
fman (administrator)
2011-03-25 07:20

Reminder sent to: kinow

hi, we need to understand whe this will be available.
can you give us some feedback?
(0014301)
kinow (reporter)
2011-03-26 12:21

@fman
Hi Francisco, It's 60% done. The export requirements and its relations is working, however I'm stuck implementing the code to import the relations.

This code is in my office's computer, I copied it to my USB hard drive but it is corrupted. On Monday morning I'll send the code that exports requirements, so it can be reviewed while I finish the other part.

Today I'll work on the other issues assigned to me here.
(0014328)
kinow (reporter)
2011-03-28 16:51

Hi all, I just uploaded the code to export relations just in case somebody would like to have a look on it. I'm working in the code to import it.

I will review the @ revision entries, sync with master and test the code when I have finished the import feature, and then will upload the final files. I intend to finish this code this week :)

Cheers, Bruno.
(0014389)
kinow (reporter)
2011-04-01 01:14

Hi all,

I finished the code but with few TODO's and TBD's in it. Some are for review, and others because I didn't have time to add i18n to some messages used and I didn't find the code to retrieve the relation type text, so I'm using the relation type number.

https://gitorious.org/~kinow/testlink-ga/kinows-testlink-code/commit/0a718f5502373b15fb969c15ae8fce834dbd35a1 [^]

Still learning Git, but I tried to fork testlink-code repo and push my changes to the forked repo. This way we can pull it to master branch after reviewing it. Hope it helps.

Bruno
(0014390)
fman (administrator)
2011-04-01 06:23

do not know if this will be the simplest way to review changes.
just to allow method comparison
upload here zip file with all affected files.
try also to ask for a merge request

regards
(0014392)
kinow (reporter)
2011-04-01 12:54
edited on: 2011-04-01 12:54

Just uploaded the affected files.

I asked for a merge request. This is the first time I'm using this feature in gitorious, I hope I did it correctly.

Thank you

(0015542)
kinow (reporter)
2011-07-19 23:32

@Julian:

I pushed this one to a fork of TestLink repository that I created, and also sent a pull (merge) request in gitorious. I believe if the version that I sent works with TL 1.9.3 we could close this issue :-)
(0016263)
frl (reporter)
2012-01-18 22:53

As I find this feature very interesting and I need it on my platform (but it seems not integrated yet : I did'nt find it on trunk in git), I ported the files of kinow on my platform (based on TL 1.9.3) and made some little enhancements
- support of interproject_linking config option with optional <source_project> or <destination_project> element
- some validity checks enforced (not relation on same req, source or dest must belong to the current project)
- i18n of few error messages

During my tests, I saw some surprising situations (relation exported twice if requirements do not belong to same req spec, related requirement may be not part of exported file), but nothing really inconsistent. Reimporting the files previously exported creates all the relations as expected (with just warning messages in the Result column in some cases)

So, in case you plan to integrate this feature in future, I join this new version in the attached file contrib-relImport.zip with some XML files I have used for tests and some documentation.
(0016268)
fman (administrator)
2012-01-19 21:27

Thanks a lot for your help
We will try to add this to 1.9.4
(0019886)
KarenNyre (reporter)
2013-10-28 07:31

Ladies and Gentlemen,

With TestLink 1.9.8 we have made much effort to link requirements and now are looking forward to exporting data. Will you soon support exporting requirements which are linked with each other?
(0020323)
fman (administrator)
2014-01-14 21:24

https://gitorious.org/testlink-ga/testlink-code/commit/259df2d6b3e0779253d09018c52e089ccaceaa3e [^]
(0021332)
fman (administrator)
2014-07-27 10:04

done

- Issue History
Date Modified Username Field Change
2010-07-01 08:50 Julian New Issue
2010-11-10 18:29 fman Assigned To => kinow
2010-11-10 18:29 fman Status new => assigned
2010-11-10 18:30 fman Note Added: 0012392
2011-01-11 14:57 Julian Note Added: 0013244
2011-01-15 17:59 kinow Note Added: 0013296
2011-01-15 19:12 fman Note Added: 0013297
2011-01-19 06:21 Julian Note Added: 0013321
2011-01-26 00:43 kinow Note Added: 0013435
2011-01-30 10:51 Julian Note Added: 0013471
2011-01-30 14:21 fman Note Added: 0013472
2011-02-03 21:54 kinow Note Added: 0013507
2011-02-20 20:10 kinow Note Added: 0013699
2011-02-23 11:32 kinow Note Added: 0013729
2011-02-23 11:33 kinow File Added: all-req.xml
2011-02-23 11:34 kinow File Added: image_3560.JPG
2011-02-23 11:37 kinow Note Edited: 0013729 View Revisions
2011-03-14 14:37 Julian Note Added: 0013866
2011-03-25 07:20 fman Note Added: 0014265
2011-03-26 12:21 kinow Note Added: 0014301
2011-03-28 16:48 kinow File Added: requirement_spec_mgr.class.php
2011-03-28 16:49 kinow File Added: requirement_mgr.class.php
2011-03-28 16:51 kinow Note Added: 0014328
2011-04-01 01:14 kinow Note Added: 0014389
2011-04-01 06:23 fman Note Added: 0014390
2011-04-01 12:46 kinow File Deleted: requirement_spec_mgr.class.php
2011-04-01 12:46 kinow File Deleted: requirement_mgr.class.php
2011-04-01 12:47 kinow File Added: requirement_mgr.class.php
2011-04-01 12:48 kinow File Added: requirement_spec_mgr.class.php
2011-04-01 12:48 kinow File Added: reqImport.php
2011-04-01 12:54 kinow Note Added: 0014392
2011-04-01 12:54 kinow Note Edited: 0014392 View Revisions
2011-07-19 23:32 kinow Note Added: 0015542
2011-08-04 11:37 kavitha_atre Note Added: 0015595
2011-08-04 20:42 fman Note Deleted: 0015595
2012-01-18 22:53 frl Note Added: 0016263
2012-01-18 22:54 frl File Added: contrib-relImport.zip
2012-01-19 21:27 fman Note Added: 0016268
2013-10-28 07:31 KarenNyre Note Added: 0019886
2014-01-14 20:15 fman QA Team - Task Workflow Status => TBD
2014-01-14 21:24 fman QA Team - Task Workflow Status TBD => READY FOR TESTING
2014-01-14 21:24 fman Note Added: 0020323
2014-01-14 21:24 fman Status assigned => resolved
2014-01-14 21:24 fman Resolution open => fixed
2014-01-14 21:25 fman Relationship added related to 0006006
2014-01-14 21:26 fman Relationship added child of 0006048
2014-07-27 10:04 fman Note Added: 0021332
2014-07-27 10:04 fman Status resolved => closed



Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker