Closed Bug 371181 Opened 17 years ago Closed 17 years ago

Ordering of application versions appears random

Categories

(addons.mozilla.org Graveyard :: Developer Pages, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jwkbugzilla, Assigned: wenzel)

References

()

Details

If I want to change the max/min Firefox version for some extension I have to look through the whole list searching for the correct version number. Version numbers should be sorted, using alphabetic sorting like https://addons.mozilla.org/faq.php at the very least. Ideally however bsmedberg's PHP version comparison code would be used to sort the list after retrieving it from the database (it would get things like 0.10 coming after 0.3 right).
Assignee: nobody → fligtar
Target Milestone: --- → 3.1
bsmedberg: Can you or Wladimir provide a pointer to the sorting code he mentions?
Thanks, Justin. I didn't know we already had this code in Remora.

Any reason we don't use natsort()? I just tested it and at least with Firefox, I get the same result as I get when using the complex version comparison component.
In order not to run into problems with strange versioning schemes, I decided to use the component for now to sort these strings. If it turns out later that natsort() is sufficient for all occuring version schemes, simplification is easy. For now, I call this fixed (SVN r2289).
Assignee: fligtar → fwenzel
Severity: major → normal
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
natsort is definitely not sufficient for any possible versioning string: see the testcases at http://lxr.mozilla.org/mozilla/source/xpcom/tests/TestVersionComparatorRunner.pl#41

It might be sufficient for version strings that AMO would actually support in practice, but I'm not even sure about that.
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.