fix(api): exclude removed issues from module progress#362
Conversation
StateDistributionByProject is a raw query, so GORM doesn't inject the soft-delete scope, and it was missing AND mi.deleted_at IS NULL. Issues removed from a module (a soft delete on module_issues) still counted toward its progress totals. The cycle equivalent already filters this; match it. Closes Devlaner#343 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe module state distribution query now excludes soft-deleted ChangesModule issue count filtering
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies" 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 |
Summary
Module progress counted issues that had been removed from the module.
Linked issues
Closes #343
Type of change
fix:)Surface
apps/api/)What changed
ModuleStore.StateDistributionByProjectis a raw SQL query, so GORM doesn't add the soft-delete scope automatically, and it was missingAND mi.deleted_at IS NULL.RemoveModuleIssuesoft-deletes the link, so removed issues stayed in the progress totals. Added the filter, matching the cycle version which already has it.Test plan
go build,go vet,go test ./...greenCycleStore.StateDistributionByProjectAI assistance
Claude Code (Opus 4.8), commits carry aCo-Authored-By:trailerSummary by CodeRabbit