Suppress Azure DevOps work items in the 'Removed' state#176
Conversation
Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/a5388263-1bd3-4e22-a541-7312b517430f Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This pull request updates the Azure DevOps work-item mapping so that work items in the Removed state are fully excluded from BuildMark build notes (both delivered changes and known issues), aligning output with Azure DevOps semantics for explicitly abandoned/cancelled items.
Changes:
- Add a suppressed-state check (
Removed) toWorkItemMapper.MapWorkItemToItemInfothat returnsnullearly. - Add a unit test validating
Removedwork items are suppressed for both bug and feature types. - Update reqstream/design/verification docs to capture the new suppression requirement and behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/DemaConsulting.BuildMark/RepoConnectors/AzureDevOps/WorkItemMapper.cs | Adds SuppressedStates and early null return to suppress Removed work items globally. |
| test/DemaConsulting.BuildMark.Tests/RepoConnectors/AzureDevOps/WorkItemMapperTests.cs | Adds coverage ensuring Removed items map to null. |
| docs/reqstream/build-mark/repo-connectors/azure-devops/work-item-mapper.yaml | Introduces a new requirement for suppressing Removed work items and links it to the new test. |
| docs/design/build-mark/repo-connectors/azure-devops/work-item-mapper.md | Documents suppressed states and updates mapping steps. |
| docs/verification/build-mark/repo-connectors/azure-devops/work-item-mapper.md | Updates verification narrative and adds a scenario for the new suppression behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot apply changes based on the comments in this thread Additionally once done please run lint-fix |
…irement IDs Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/6637279d-f2cc-4274-bd2b-ca6ff33c7f5a Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Done in commit
lint-fix was also run and the one MD013 line-length violation it found was auto-fixed. |
Pull Request
Description
Azure DevOps work items in the
Removedstate (explicitly abandoned/cancelled) were appearing in build notes as delivered changes and open known issues. SinceRemovedis an explicit abandonment state, these items should not surface in any section of build notes.Changes
WorkItemMapper.cs— AddedSuppressedStatesHashSet ("Removed") and an early-exitnullreturn at the top ofMapWorkItemToItemInfo. A single check covers both code paths (PR-linked changes viaProcessLinkedWorkItemsand known-issues collection), since both callMapWorkItemToItemInfoand guard onnull:WorkItemMapperTests.cs— AddedWorkItemMapper_MapWorkItemToItemInfo_RemovedState_ReturnsNullcovering bug and feature work items in theRemovedstate.work-item-mapper.yaml(reqstream) — AddedBuildMark-AzureDevOps-SuppressRemovedWorkItemsrequirement.work-item-mapper.md(design) — DocumentedSuppressedStatesas a distinct concept fromResolvedStates; correctedMapWorkItemToItemInfosteps so thatSystem.Stateis listed only under the suppressed-state check (step 1) and not repeated in step 2.work-item-mapper.md(verification) — Corrected the verification approach text to accurately reflect covered behaviours; aligned all test scenario names with the actual test methods; corrected requirement coverage IDs fromBuildMark-RepoConnectors-WorkItemMappertoBuildMark-AzureDevOps-WorkItemMapper; added coverage entries forBuildMark-AzureDevOps-CustomFieldsandBuildMark-AzureDevOps-SuppressRemovedWorkItems.Type of Change
Pre-Submission Checklist
Before submitting this pull request, ensure you have completed the following:
Build and Test
pwsh ./build.ps1Code Quality
Quality Checks
Please run the following checks before submitting:
pwsh ./lint.ps1Testing
Documentation
Additional Notes
SuppressedStatesis intentionally separate fromResolvedStates—Removedis not semantically "resolved" (completed), it was abandoned. This separation keeps the intent ofIsWorkItemResolvedclean and makes it straightforward to add other abandonment states in the future.