Skip to content

RE1-T46 Bug fixes#297

Merged
ucswift merged 1 commit intomasterfrom
develop
Mar 12, 2026
Merged

RE1-T46 Bug fixes#297
ucswift merged 1 commit intomasterfrom
develop

Conversation

@ucswift
Copy link
Member

@ucswift ucswift commented Mar 12, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling of null and invalid coordinate data with enhanced validation.
    • Added parameter sanitization for year filtering in archived calls.
    • Strengthened access control checks for geofence and group member operations.
    • Fixed navigation link for viewing archived calls.

@request-info
Copy link

request-info bot commented Mar 12, 2026

Thanks for opening this, but we'd appreciate a little more information. Could you update it with more details?

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0b91c6d8-7d92-498f-bad3-3d1497a5c4de

📥 Commits

Reviewing files that changed from the base of the PR and between 115a62c and 3c34323.

📒 Files selected for processing (5)
  • Core/Resgrid.Services/DepartmentGroupsService.cs
  • Repositories/Resgrid.Repositories.DataRepository/CallsRepository.cs
  • Web/Resgrid.Web/Areas/User/Controllers/DispatchController.cs
  • Web/Resgrid.Web/Areas/User/Controllers/GroupsController.cs
  • Web/Resgrid.Web/wwwroot/js/app/internal/dispatch/resgrid.dispatch.archive.js

📝 Walkthrough

Walkthrough

This pull request introduces defensive programming improvements across the service, repository, and controller layers, along with frontend updates. Changes include null/whitespace sanitization for year parameters, new coordinate parsing validation in the services layer, stricter access control checks for group operations, and a URL routing update for archived calls.

Changes

Cohort / File(s) Summary
Year Parameter Sanitization
Repositories/Resgrid.Repositories.DataRepository/CallsRepository.cs, Web/Resgrid.Web/Areas/User/Controllers/DispatchController.cs
Added whitespace trimming for year string parsing in repository method and introduced normalization logic in controller to handle null, whitespace, and string "null" values; alters service overload selection based on sanitized input.
Coordinate Parsing Refactor
Core/Resgrid.Services/DepartmentGroupsService.cs
Added private static helper method ParseCoordinates() to centralize coordinate string parsing with null and whitespace checks; refactored existing coordinate parsing paths to use this helper; modified GetMapCenterCoordinatesForGroupAsync() to return null when target group is not found.
Access Control & Validation Enforcement
Web/Resgrid.Web/Areas/User/Controllers/GroupsController.cs
Introduced stricter precondition validation in SaveGeofence() and GetMembersForGroup() methods, enforcing null checks, department ownership verification, and permission authorization via CanUserEditDepartmentGroupAsync() before allowing operations.
Frontend Routing Update
Web/Resgrid.Web/wwwroot/js/app/internal/dispatch/resgrid.dispatch.archive.js
Updated View action URL in archived calls table from /User/Dispatch/CallInfo?callId= to /User/Dispatch/ViewCall?callId=.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'RE1-T46 Bug fixes' is vague and generic, using non-descriptive terms that don't convey meaningful information about the specific changes in the changeset. Replace with a more specific title that describes the primary change, such as 'Add coordinate parsing helper and improve input validation' or 'Refactor coordinate parsing and add group access controls'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch develop
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ucswift
Copy link
Member Author

ucswift commented Mar 12, 2026

Approve

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This PR is approved.

@ucswift ucswift merged commit b9c1c75 into master Mar 12, 2026
18 of 19 checks passed
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.

1 participant