Skip to content

refactor(CoreBusiness): Rename ApprovedForRelease to Approved - #168

Merged
mpaulosky merged 1 commit into
mainfrom
squad/152-approved
Sep 30, 2026
Merged

mpaulosky merged 1 commit into
mainfrom
squad/152-approved

Conversation

@mpaulosky

Copy link
Copy Markdown
Owner

Summary

Second half of #152 (the Status names landed in #166).

CONTEXT.md defines Approval as an Admin's decision that an Issue may be shown to every User, not that it ships in a release.

  • IssueModel.ApprovedForRelease is now Approved, across CoreBusiness, PlugIns, Services, UI and the tests.
  • Its doc comments, and those on GetApprovedIssues in IIssueService and IIssueRepository, now describe it that way.
  • It is still stored as approved_for_release ([BsonElement], as before), so existing data needs no migration.

Testing

  • New IssueModelTests test: an approved Issue serializes with approved_for_release: true and no Approved element, so a future rename can't silently change the stored field.
  • CoreBusiness 87, Services 99, PlugIns 37, UI 148 passed; dotnet build -warnaserror clean; scripts/gate.sh passed.

Fixes #152

🤖 Generated with Claude Code

CONTEXT.md defines Approval as an Admin's decision that an Issue may be
shown to every User, not that it ships in a release. The property is
now Approved, and its doc comments and the approved-Issue queries say
what it means. It is still stored as approved_for_release, so existing
data needs no migration, and a new test holds that.

Fixes #152

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings September 30, 2026 00:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The rename is consistently applied and persistence compatibility is explicitly preserved and tested.

Review effort: Balanced
Findings: None

What changed in this PR

Renames the approval domain property while preserving MongoDB compatibility and existing visibility behavior.

Changes:

  • Renames ApprovedForRelease to Approved across all layers.
  • Retains the approved_for_release MongoDB field.
  • Updates documentation, fakes, and tests.
File Description
tests/​IssueTracker.UI.Tests.Unit/​Pages/​ProfileTests.cs Updates profile test data.
tests/​IssueTracker.UI.Tests.Unit/​Pages/​DetailsTests.cs Updates visibility test data.
tests/​IssueTracker.UI.Tests.Unit/​Pages/​CommentTests.cs Updates comment visibility tests.
tests/​IssueTracker.UI.Tests.Unit/​Pages/​AdminTests.cs Updates admin test setup.
tests/​IssueTracker.Services.Tests.Unit/​Issue/​IssueServiceTests.cs Updates service approval tests.
tests/​IssueTracker.PlugIns.Tests.Unit/​DataAccess/​IssueRepositoryTests.cs Updates repository filter tests.
tests/​IssueTracker.PlugIns.Tests.Integration/​DataAccess/​GetIssuesWaitingForApprovalTests.cs Updates pending-issue integration coverage.
tests/​IssueTracker.PlugIns.Tests.Integration/​DataAccess/​GetApprovedIssuesTests.cs Updates approved-issue integration coverage.
tests/​IssueTracker.CoreBusiness.Tests.Unit/​Models/​IssueModelTests.cs Verifies persisted BSON field compatibility.
src/​UI/​IssueTracker.UI/​Pages/​Profile.razor.cs Uses the renamed property for grouping.
src/​UI/​IssueTracker.UI/​Pages/​Admin.razor.cs Uses the renamed property when approving.
src/​Services/​IssueTracker.Services/​PlugInRepositoryInterfaces/​IIssueRepository.cs Clarifies approval semantics.
src/​Services/​IssueTracker.Services/​Issue/​IssueService.cs Updates issue visibility logic.
src/​Services/​IssueTracker.Services/​Issue/​Interface/​IIssueService.cs Clarifies approval semantics.
src/​PlugIns/​IssueTracker.PlugIns/​DataAccess/​IssueRepository.cs Updates approval filters.
src/​CoreBusiness/​IssueTracker.CoreBusiness/​Models/​IssueModel.cs Renames the property while retaining its BSON name.
src/​CoreBusiness/​IssueTracker.CoreBusiness/​BogusFakes/​FakeIssue.cs Updates generated issue data.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results Summary

483 tests  +1   483 ✅ +1   15s ⏱️ -8s
  9 suites ±0     0 💤 ±0 
  9 files   ±0     0 ❌ ±0 

Results for commit e1a5a22. ± Comparison against base commit a554ba3.

@codecov

codecov Bot commented Sep 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.40%. Comparing base (a554ba3) to head (e1a5a22).

Files with missing lines Patch % Lines
...IssueTracker.PlugIns/DataAccess/IssueRepository.cs 0.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #168   +/-   ##
=======================================
  Coverage   85.40%   85.40%           
=======================================
  Files          77       77           
  Lines        1596     1596           
  Branches      150      150           
=======================================
  Hits         1363     1363           
  Misses        189      189           
  Partials       44       44           
Files with missing lines Coverage Δ
.../IssueTracker.CoreBusiness/BogusFakes/FakeIssue.cs 100.00% <100.00%> (ø)
...ess/IssueTracker.CoreBusiness/Models/IssueModel.cs 100.00% <100.00%> (ø)
...rvices/IssueTracker.Services/Issue/IssueService.cs 97.95% <100.00%> (ø)
src/UI/IssueTracker.UI/Pages/Admin.razor.cs 93.75% <100.00%> (ø)
src/UI/IssueTracker.UI/Pages/Profile.razor.cs 100.00% <100.00%> (ø)
...IssueTracker.PlugIns/DataAccess/IssueRepository.cs 93.75% <0.00%> (ø)

@mpaulosky
mpaulosky merged commit 13c9144 into main Sep 30, 2026
29 checks passed
@mpaulosky
mpaulosky deleted the squad/152-approved branch September 30, 2026 00:18
mpaulosky added a commit that referenced this pull request Sep 30, 2026
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Align Status and Approval names in code with CONTEXT.md

2 participants