[COMPASS-2734] Compass bug when similar views display incorrect values Created: 31/Mar/18  Updated: 29/Oct/23  Resolved: 09/Dec/20

Status: Closed
Project: Compass
Component/s: UI / UX, Views
Affects Version/s: None
Fix Version/s: 1.24.1

Type: Bug Priority: Minor - P4
Reporter: Andrej Rapoport Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Compass 1.12.4
Windows 10 x64
MongoDB 3.4.6 Community


Issue Links:
Related
is related to COMPASS-3524 Using a View Closed
Documentation Changes: Not Needed

 Description   

I have two views on the same collection. They both calculate a sum but using different filters.

If I open the first view in the Compass then I see a correct sum. Then if I switch to the second view I see an invalid sum (from the first view).

Opening any other views (e. g. a collection) and switching back to the second view helps - it starts showing correct value. Switching to the first view will show values from the second.

Pipeline I am using for views:

[ { $match: { state:  { $in: [1, 2] } } }, { $group: { _id: "$username", sum : { $sum: "$weight" } } } ]



 Comments   
Comment by Andrej Rapoport [ 10/Apr/18 ]

It seems to be that just switching between views doesn't trigger a proper UI update. Views can be even on different collections. If a view had one entry, and next view has more entries then entries from both views might even be combined on screen.

Comment by Andrej Rapoport [ 31/Mar/18 ]

"Opening any other views (e. g. a collection)" - I mean here a UI view in Compass, not a mongo view

Generated at Wed Feb 07 22:30:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.