View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0014503 | mantisbt | feature | public | 2012-07-24 20:25 | 2012-08-09 16:46 |
Reporter | zuallauz | Assigned To | dregad | ||
Priority | immediate | Severity | major | Reproducibility | always |
Status | closed | Resolution | duplicate | ||
Product Version | 1.2.11 | ||||
Summary | 0014503: Incorrect order of versions in dropdowns | ||||
Description | The versions being displayed in the dropdowns for Product Version, Fixed in Version and Target Version are incorrectly ordered. Currently they use an unknown order - probably the order they were added. They should be ordered from latest version to oldest version in the dropdown. It makes sense that the latest version would be at the top as most bugs will be filed against that. Also it doesn't make sense for a random order as it makes it harder to find the version. | ||||
Steps To Reproduce | View any of the version drop downs in the lists. You'll note the order will be something like this: '7.1.7' They should look like this: '8.1.3' | ||||
Additional Information | I have created a small patch for this which I tested in version 1.1.8: Line 832 in /usr/share/mantis/www/core/print_api.php Add in the following code: // Sort the versions from highest to lowest | ||||
Tags | No tags attached. | ||||
duplicate of | 0010419 | acknowledged | Allow customized sorting of versions |
I confirm this bug But, versions should be ordered by date and not its name You don't always have numeric version. Example with dokuwiki : so version_compare will failed ;) |
|
Can I close this as a duplicate of 0011095 ? |
|
Ok I understand that it works ordering by date. However I'm working for an organisation that has 70+ different versions created, all with incorrect dates so everything is out of order. I believe they just added the versions without assigning a proper date to the version. It would be quite time consuming to go back and assign dates to the random order they are in. Is it possible just to have a small feature which sorts it by date by default, but if the user chooses then they can select an option to sort the dropdowns by the version name/number? The code above works fine sorting versions that aren't in format "3.2.1" it just puts them at the end of the list. However you could always order ones with non numeric characters alphabetically as well. If you're still supporting the PHP 5.2 and lower the code above won't work because it uses a closure, so you'd have to use the old usort format with a separate function. |
|
Please see issue 0010419 (the one mentioned by atrol earlier is actually a duplicate of that one). As for your immediate problem, since it is quite unlikely that the requested feature gets implemented in the short term, I would advise you to write a small, one-time fix script that will update the version's date in the database table based on the desired version number. |
|