[COMPASS-6156] Count in Aggregation tab is not updated after a deletion after first calculation Created: 24/Sep/22  Updated: 29/Oct/23  Resolved: 22/Dec/22

Status: Closed
Project: Compass
Component/s: Aggregation pipeline, Count
Affects Version/s: 1.33.1
Fix Version/s: 1.35.0

Type: Bug Priority: Minor - P4
Reporter: Felicia Hsieh Assignee: Basit Chonka
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

mac 12.6
Compass 1.33.1


Attachments: PNG File image-2022-09-24-16-50-16-078.png    
Issue Links:
Documented
Story Points: 2
Documentation Changes: Needed
Documentation Changes Summary:

In this ticket we introduced a new button to refresh the count of documents on Run Aggregation screen.

Sprint: Iteration Quahog, Iteration Ragfish

 Description   

Problem Statement/Rationale

What is going wrong? What action would you like the Engineering team to take?

Please be sure to attach relevant logs with any sensitive data redacted.

After running an aggregation pipeline, Count is not accurate after a deletion, even after clicking "Run (aggregation button)" button. Must use "Edit" button>"Run">"count results" link. (This is also a bit clunky as "count results" link is an additional step).

Steps to Reproduce

How could an engineer replicate the issue you’re reporting?

  1. Run aggregate query
  2. Get count
  3. Delete or add a document in a different tab
  4. Click Run from the original tab to re-run the aggregate, the count does not refresh
    To see the updated count
  5. Click Edit
  6. Re-run the aggregate and then click to show the count, the updated count is displayed

Expected Results

What do you expect to happen?

Accurate count always

Actual Results

What do you observe is happening?

Count is not being updated after a deletion in Documents tab or deletion using mongo shell.

Additional Notes

Any additional information that may be useful to include.



 Comments   
Comment by Githook User [ 03/Jan/23 ]

Author:

{'name': 'Basit', 'email': '1305718+mabaasit@users.noreply.github.com', 'username': 'mabaasit'}

Message: feat(aggregations): add refresh document count in aggregation results COMPASS-6156 (#3912)
Branch: 1.35-releases
https://github.com/mongodb-js/compass/commit/3b95e7794c93eeceebadb6bd8bd53301914ee3fa

Comment by Githook User [ 03/Jan/23 ]

Author:

{'name': 'Basit', 'email': '1305718+mabaasit@users.noreply.github.com', 'username': 'mabaasit'}

Message: feat(aggregations): add refresh document count in aggregation results COMPASS-6156 (#3912)
Branch: fix-missing-name-prop
https://github.com/mongodb-js/compass/commit/3b95e7794c93eeceebadb6bd8bd53301914ee3fa

Comment by Githook User [ 22/Dec/22 ]

Author:

{'name': 'Basit', 'email': '1305718+mabaasit@users.noreply.github.com', 'username': 'mabaasit'}

Message: feat(aggregations): add refresh document count in aggregation results COMPASS-6156 (#3912)
Branch: COMPASS-6159-fix-export-to-java-class-name
https://github.com/mongodb-js/compass/commit/3b95e7794c93eeceebadb6bd8bd53301914ee3fa

Comment by Githook User [ 22/Dec/22 ]

Author:

{'name': 'Basit', 'email': '1305718+mabaasit@users.noreply.github.com', 'username': 'mabaasit'}

Message: feat(aggregations): add refresh document count in aggregation results COMPASS-6156 (#3912)
Branch: main
https://github.com/mongodb-js/compass/commit/3b95e7794c93eeceebadb6bd8bd53301914ee3fa

Comment by Githook User [ 20/Dec/22 ]

Author:

{'name': 'Basit', 'email': '1305718+mabaasit@users.noreply.github.com', 'username': 'mabaasit'}

Message: Merge branch 'main' into COMPASS-6156-add-refresh-doc-count
Branch: COMPASS-6156-add-refresh-doc-count
https://github.com/mongodb-js/compass/commit/ac29a1c6d14b40bec6e3ec1885cc0814184cc737

Comment by Githook User [ 20/Dec/22 ]

Author:

{'name': 'Basit', 'email': '1305718+mabaasit@users.noreply.github.com', 'username': 'mabaasit'}

Message: Merge branch 'main' into COMPASS-6156-add-refresh-doc-count
Branch: COMPASS-6156-add-refresh-doc-count
https://github.com/mongodb-js/compass/commit/0820254e4f28bb38479863e0a4daaa25a6fe47ff

Comment by Rhys Howell [ 03/Oct/22 ]

We should reset the count status after the pipeline is re-run.

If it's easy to fix at the same time, let's show `0` as the count when no documents are returned. Currently we still show the count results button even when no documents were returned.

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