Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007938TestLinkDatabase MySQLpublic2017-05-15 10:312017-05-16 13:41
Reporterhughkay 
Assigned To 
PriorityhighSeveritycrashReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS Version
Product Version1.9.16 (2016 Q4) 
Fixed in Version 
Summary0007938: Milestone table is created wrong if using "MySQL" as database
DescriptionWithin the file "install/sql/mysql/testlink_create_tables.sql" the following source code is defined in order to create "milestones" table:

    CREATE TABLE /*prefix*/milestones (
      id int(10) unsigned NOT NULL auto_increment,
      testplan_id int(10) unsigned NOT NULL default '0',
      target_date date NULL,
      start_date date NOT NULL,
      a tinyint(3) unsigned NOT NULL default '0',
      b tinyint(3) unsigned NOT NULL default '0',
      c tinyint(3) unsigned NOT NULL default '0',
      name varchar(100) NOT NULL default 'undefined',
      PRIMARY KEY (id),
      KEY /*prefix*/testplan_id (`testplan_id`),
      UNIQUE KEY /*prefix*/name_testplan_id (`name`,`testplan_id`)
    ) DEFAULT CHARSET=utf8;


However, the "start_date" attribute is given as "NOT NULL" while "target_date" can be "NULL".
It should be vice versa, as "start_date" attribute is optional, according to the GUI.

Creating a Milestone for a testplan in the GUI while leaving the "start_date" attribute empty, leads to an SQL error resulting in a crash.
Steps To Reproduce1. Create a Test Project
2. Create a Test Plan
3. Go to "Milestones" page and click on "Create"
4. Fill out every field, except for "Start Date". This has to be left empty
5. Click on "Save"
--> The GUI will crash showing a MySQL DB Query error.
Additional InformationIn order to fix the issue, "start_date" should be set to "NULL" as default value, "target_date" must not be "NULL".

Note: The code for "MSSQL" and "Postgres" database types is, however, correct.
TagsNo tags attached.
Database (MySQL,Postgres,etc)MySQL
BrowserFirefox
PHP Version5.5.37
TestCaseID
QA Team - Task Workflow Status
Attached Filesjpg file icon Create Milestone Error2.JPG [^] (82,780 bytes) 2017-05-15 10:31


jpg file icon Create Milestone Error1.JPG [^] (71,425 bytes) 2017-05-15 10:32

- Relationships

-  Notes
(0026365)
fman (administrator)
2017-05-16 13:41

thanks

- Issue History
Date Modified Username Field Change
2017-05-15 10:31 hughkay New Issue
2017-05-15 10:31 hughkay File Added: Create Milestone Error2.JPG
2017-05-15 10:32 hughkay File Added: Create Milestone Error1.JPG
2017-05-16 13:41 fman Note Added: 0026365



Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker