How to change the order of versions in the list?

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
karl.reichert
Posts: 38
Joined: 02 Apr 2009, 12:22

How to change the order of versions in the list?

Post 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?
Mantis: 1.2.1
OS: Windows Server 2003 R2
WampServer 2.0g-1 [03/12/09]
Includes :
- Apache 2.2.11
- MySQL 5.1.36
- PHP 5.2.11
atrol
Site Admin
Posts: 8542
Joined: 26 Mar 2008, 21:37
Location: Germany

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

Post by atrol »

Ordering is by field "date_order"
Please use Search before posting and read the Manual
karl.reichert
Posts: 38
Joined: 02 Apr 2009, 12:22

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

Post 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?
Mantis: 1.2.1
OS: Windows Server 2003 R2
WampServer 2.0g-1 [03/12/09]
Includes :
- Apache 2.2.11
- MySQL 5.1.36
- PHP 5.2.11
atrol
Site Admin
Posts: 8542
Joined: 26 Mar 2008, 21:37
Location: Germany

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

Post 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.
Please use Search before posting and read the Manual
Post Reply