Problems with creation of requirement in the v 1.6 RC2

The release 1.6 is going to be unsupported by Community. Because our effort moves ahead. However there are still valuable informations for you.
Locked
SunGirl

Problems with creation of requirement in the v 1.6 RC2

Post by SunGirl »

Hello guys!
When I try to create new requirement the error message below appears.

Failed to update database! - details: Requirement Req 1

Invalid query The INSERT request fails with these values:Req 1, , vINSERT INTO requirements (id_srs, req_doc_id, title, scope, status, type, id_author, create_date) VALUES (1,\'1\',\'Req 1\',\'\',\'v\',\'\',20, CURRENT_DATE).

Could you help me to solve this problem?
havlatm
Member of TestLink Community
Posts: 940
Joined: Mon Oct 31, 2005 1:24 am
Location: Czech

Post by havlatm »

It seems like a php configuration problem. What is your setting of magic quotas?
fman
Member of TestLink Community
Posts: 3110
Joined: Tue Nov 15, 2005 7:19 am

This is an ISSUE, please move it to Mantis

Post by fman »

This is an Issue and there is only on place to report issues:

http://www.testlink.org/mantis


Please help us to help you and other users, reporting issues ONLY on
Mantis.

Would you mind reporting this issue ?

The solution to your problem:

please check the SQL script that creates the requirements table,
control that all field are present on your db. This error is
produced normally by the doc id column missing


Regards


Francisco
franmarch
TestLink user
Posts: 1
Joined: Fri Dec 02, 2005 6:43 pm

Post by franmarch »

The Script to create the tables has an error in it causing the \"requirements\" table not to be created. There is a comma missing at the end of the INDEX line.
I added the corrected script to this message.
If you are not familiar with MySQL replace this file in the install\\sql directory and re-install.

If you don\'t want to re-install. jUst take the part about the requirements table and run it using the Mysql Command line interface.

I\'m not sure the attachment works so here is the section to change:
#
# Table structure for table `requirements`
#

DROP TABLE IF EXISTS `requirements`;
CREATE TABLE `requirements` (
`id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
`id_srs` INT( 10 ) UNSIGNED NOT NULL ,
`req_doc_id` varchar(16) default NULL,
`title` VARCHAR( 100 ) NOT NULL ,
`scope` TEXT,
`status` char(1) default \'v\' NOT NULL,
`type` char(1) default NULL,
`id_author` INT( 10 ) UNSIGNED NULL,
`create_date` date NOT NULL default \'0000-00-00\',
`id_modifier` INT( 10 ) UNSIGNED NULL,
`modified_date` date NOT NULL default \'0000-00-00\',
PRIMARY KEY ( `id` ) ,
INDEX ( `id_srs` , `status` ),
KEY `req_doc_id` (`req_doc_id`)
) TYPE=MyISAM;
Francois ;-)
havlatm
Member of TestLink Community
Posts: 940
Joined: Mon Oct 31, 2005 1:24 am
Location: Czech

Post by havlatm »

I\'ve looked to CVS. And this bug is already corrected. Thank you for the information.
Locked