-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update: Group samples count calculation should include shared groups and projects #862
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
201b69c
to
b597634
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and is working as specified. Just one small change.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great, just one small comment.
Can you change line 15 in app/controllers/groups/samples_controller.rb
to use aggregated_samples_count
instead of the query it is currently doing.
73d2743
to
d29b696
Compare
Changed in bcc3fed |
This comment has been minimized.
This comment has been minimized.
d29b696
to
cba4420
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor comment, but also could you review and fix the rubocop warnings in app/models/group.rb
cba4420
to
19c1044
Compare
643a741
to
50a9866
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great, just only one minor comment and then this can be merged in.
Code Metrics Report
Code coverage of files in pull request scope (99.3%)
Reported by octocov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
What does this PR do and why?
Describe in detail what your merge request does and why.
This PR changes the sample count of a group to incorporate sample counts from it's shared groups and projects. This update will allow the samples count to properly reflect the amount of samples shown after clicking samples on the sidebar for a group.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other pull requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
General check:
Sharing a project:
Sharing a group:
**Direct samples count for a shared project = samples count of that project
**Direct samples count for a shared group = the sum of all samples found within projects in itself and it's ancestor groups. (This does not include the samples count of projects or groups that have been shared with it)
PR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.