[WEB-6060] fix: module percentage calculation#8595
Conversation
📝 WalkthroughWalkthroughModified Django ORM aggregation logic in the module view layer by changing the grouping target for issue count annotations from the nested state group path to the direct issue_module relation. This affects how five issue count fields (completed, cancelled, started, unstarted, and backlog) are aggregated per module. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
There was a problem hiding this comment.
Pull request overview
This PR corrects workspace-level module metrics so that the counts of completed and other categorized issues correctly reflect the number of issues, rather than the number of distinct state groups.
Changes:
- Updated
WorkspaceModulesEndpointannotations forcompleted_issues,cancelled_issues,started_issues,unstarted_issues, andbacklog_issuesto count"issue_module"(with filters) instead of"issue_module__issue__state__group", ensuring the counts match the actual number of issues. - Kept filters and
distinct=Trueconsistent with the existingtotal_issuesannotation, aligning percentage calculations for module progress.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
this pull request fixes the calculation of completed issues versus total issues for a specific module.
Type of Change
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.