Closed
Bug 802769
Opened 14 years ago
Closed 14 years ago
[socorro-crashstats] product order differs between Advanced Search page and global-navigation <select> product pulldown
Categories
(Socorro :: Webapp, task)
Socorro
Webapp
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: stephend, Assigned: rhelmer)
References
()
Details
Attachments
(1 file)
|
217.29 KB,
image/png
|
Details |
We have a test, test_that_options_are_sorted_the_same, (https://github.com/mozilla/Socorro-Tests/blob/master/tests/test_smoke_tests.py#L36) that asserts that the products are sorted the same in the <select> dropdown as in the "Product" multi-select in Advanced Search.
They're currently not, on crash-stats-new-dev; see screenshot
| Reporter | ||
Updated•14 years ago
|
Summary: [socorro-crashstats] → [socorro-crashstats] product order differs between Advanced Search page and global-navigation <select> product pulldown
| Assignee | ||
Comment 1•14 years ago
|
||
We have at least three similar services:
Products
CurrentVersions
ProductVersions
I don't really understand the difference between the latter two.
CurrentVersions is complete but is kind of a pain to use, so I recently introduced an OrderedDict called "release" that is available to all templates that use the @base_data decorator.
Is there a reason we shouldn't just use the same one everywhere? CurrentVersions is called on every single pageload (we need it to build the product/versions pulldowns in the base template) and is cached for one hour.
Having a service like Products is false economy, if we already have "releases" data structure cached (you can do .keys() on it to get the products back in sorted order)
I haven't looked at ProductVersions, if it can replace CurrentVersions that's fine and we should do so.
In any case, I plan to just make /query use "releases" unless someone has a better idea :)
Assignee: nobody → rhelmer
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•14 years ago
|
||
r? https://github.com/mozilla/socorro-crashstats/pull/172
This is the smallest fix I can think of - looks like products is used elsewhere. I think it could trivially be changed to use releases instead and remove the extra mware call to Products service, though.
Comment 3•14 years ago
|
||
ProductVersions is inheriting CurrentVersions, it was just a way for to get data formated as the /query page expected it. Maybe that logic should be moved to the query view.
ProductVersions basically returns the exact same data than CurrentVersions but as a dict where keys are product names and values are lists of all versions of that product.
| Assignee | ||
Comment 4•14 years ago
|
||
(In reply to Adrian Gaudebert [:adrian] from comment #3)
> ProductVersions is inheriting CurrentVersions, it was just a way for to get
> data formated as the /query page expected it. Maybe that logic should be
> moved to the query view.
>
> ProductVersions basically returns the exact same data than CurrentVersions
> but as a dict where keys are product names and values are lists of all
> versions of that product.
ah ok, that is basically what I have done with the "releases" OrderedDict - keys are the product name, but keeps all the other info like featured versions etc:
https://github.com/mozilla/socorro-crashstats/blob/master/crashstats/crashstats/utils.py#L151
Comment 5•14 years ago
|
||
Commits pushed to master at https://github.com/mozilla/socorro-crashstats
https://github.com/mozilla/socorro-crashstats/commit/4ffc9b53d5754f16b976ecfaa4d5868be7e4141f
bug 802769 - enumerate products in order for /query
https://github.com/mozilla/socorro-crashstats/commit/752cf59f9a6c18c8036f87c01fbcbd89bbf38c84
Merge pull request #172 from rhelmer/bug802769-query-product-order
bug 802769 - enumerate products in order for /query
| Assignee | ||
Updated•14 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 6•14 years ago
|
||
(In reply to Robert Helmer [:rhelmer] from comment #4)
> ah ok, that is basically what I have done with the "releases" OrderedDict -
> keys are the product name, but keeps all the other info like featured
> versions etc:
>
> https://github.com/mozilla/socorro-crashstats/blob/master/crashstats/
> crashstats/utils.py#L151
I knew this kind of things would happen, we just need to remember to do some cleanup once we have passed secreview.
| Reporter | ||
Comment 7•14 years ago
|
||
Verified FIXED; w00t!
Passed tests.test_smoke_tests.TestSmokeTests test_that_options_are_sorted_the_same
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•