results.webkit.org: Collapse results with the same version name (Follow-up fix)
authorjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Sep 2019 20:50:59 +0000 (20:50 +0000)
committerjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Sep 2019 20:50:59 +0000 (20:50 +0000)
https://bugs.webkit.org/show_bug.cgi?id=201779

Rubber-stamped by Aakash Jain.

* resultsdbpy/resultsdbpy/view/static/js/configuration.js:
(Configuration.prototype.compare): Correctly compare constructed version names.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250251 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/resultsdbpy/resultsdbpy/view/static/js/configuration.js

index cc4cb69..244a60d 100644 (file)
@@ -1,3 +1,13 @@
+2019-09-23  Jonathan Bedard  <jbedard@apple.com>
+
+        results.webkit.org: Collapse results with the same version name (Follow-up fix)
+        https://bugs.webkit.org/show_bug.cgi?id=201779
+
+        Rubber-stamped by Aakash Jain.
+
+        * resultsdbpy/resultsdbpy/view/static/js/configuration.js:
+        (Configuration.prototype.compare): Correctly compare constructed version names.
+
 2019-09-16  Jiewen Tan  <jiewen_tan@apple.com>
 
         [WebAuthn] LocalAuthenticator tests are failing on internal bots
index abe063b..ec0e192 100644 (file)
@@ -190,8 +190,12 @@ class Configuration {
                     return;
 
                 if (this[key] !== null && configuration[key] !== null) {
-                    if (typeof this[key] === 'string')
-                        result = this[key].localeCompare(configuration[key]);
+                    if (typeof this[key] === 'string') {
+                        if (key === 'version_name' && this[key].startsWith(configuration[key]))
+                            result = 0;
+                        else
+                            result = this[key].localeCompare(configuration[key]);
+                    }
                     else if (typeof this[key] === 'number' || typeof this[key] === 'boolean')
                         result = this[key] - configuration[key];
                     else