Page 1 of 1

How to change the order of versions in the list?

Posted: 09 Jun 2010, 09:31
by karl.reichert
Because I didn't get any answer on this thread, I now created versions for my projekct ranging from 1.0.0 to 3.9.99 using a sql script directly in the MySQL database:

Code: Select all

INSERT INTO `mantis_project_version_table` (`id`, `project_id`, `version`, `date_order`, `description`, `released`) VALUES
(44  , 26, '1.0.0 ', '1970-01-01 01:00:00', '', 1),
(45  , 26, '1.0.1 ', '1970-01-01 01:00:00', '', 1),
[...]
(3042, 26, '3.9.98', '1970-01-01 01:00:00', '', 1),
(3043, 26, '3.9.99', '1970-01-01 01:00:00', '', 1);
When one enters a bug in this project, the versions are ordered increasingly, except for the first two ones:
Image
Why is that the case? I checked the table in the database, everything was created like expected. I guess the order of the versions is done by the 'id' of the version in mantis_project_version_table? If so, everything should be ordered as I want it to be, but it's not.

So how to change the order of the versions in the list?

Re: How to change the order of versions in the list?

Posted: 09 Jun 2010, 09:44
by atrol
Ordering is by field "date_order"

Re: How to change the order of versions in the list?

Posted: 09 Jun 2010, 09:48
by karl.reichert
This field is set to '1970-01-01 01:00:00' for all versions, so why are the first two versions not ordered correctly, but all the others are?

Re: How to change the order of versions in the list?

Posted: 09 Jun 2010, 14:49
by atrol
This is exactly the expected behaviour: If ordering is by field "date_order" and "data_order" is the same for all entries, the ordering is pure random, depending on the internals of a database. This can change from database to database manufacturer and even from databse version to database version.