RG-T137 Fixing Profile Saving Issue - #538
Conversation
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
|
Thanks for opening this, but we'd appreciate a little more information. Could you update it with more details? |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: Resgrid/Core/.coderabbit.yaml Review profile: CHILL Plan: Essentials Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. Your free on-demand review promotion remains active until October 9, 2026 at 6:00 PM UTC. 📝 WalkthroughWalkthroughThe pull request adds a direct phone-number package reference and updates service XML documentation for staffing, personnel, protocols, and units. It also relocates the v3 staffing input and result documentation entries. ChangesPhone number package
Service XML documentation
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to No actionable issue was confirmed. The phone-number binding fix still needs validation in the supported build environment. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
| var resolved = typeof(PhoneNumbers.PhoneNumberUtil).Assembly.GetName().Version; | ||
|
|
||
| resolved.Should().BeGreaterThanOrEqualTo(required); |
There was a problem hiding this comment.
Assembly-binding validation allows an incompatible PhoneNumbers version, so provider parse calls can fail when the resolved assembly is 9.0.40.0 while GlobalPhone references 8.10.1.0, allowing this test to pass while profile saves reject valid phone numbers. Assert the exact assembly identity required by GlobalPhone or exercise an actual GlobalPhone parse under the production host binding, then select a package/build or binding configuration that satisfies that identity.
var resolvedAssembly = typeof(PhoneNumbers.PhoneNumberUtil).Assembly.GetName();\nresolvedAssembly.Name.Should().Be("PhoneNumbers");\nresolvedAssembly.Version.Should().Be(required);Prompt for LLM
File Tests/Resgrid.Tests/Providers/PhoneNumberLibraryBindingTests.cs:
Line 22 to 24:
Assembly-binding validation allows an incompatible PhoneNumbers version, so provider parse calls can fail when the resolved assembly is 9.0.40.0 while GlobalPhone references 8.10.1.0, allowing this test to pass while profile saves reject valid phone numbers. Assert the exact assembly identity required by GlobalPhone or exercise an actual GlobalPhone parse under the production host binding, then select a package/build or binding configuration that satisfies that identity.
Suggested Code:
var resolvedAssembly = typeof(PhoneNumbers.PhoneNumberUtil).Assembly.GetName();\nresolvedAssembly.Name.Should().Be("PhoneNumbers");\nresolvedAssembly.Version.Should().Be(required);
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
|
Approve |
Summary
Fixes phone number validation failures that prevented profiles containing phone numbers from being saved.
Changes
libphonenumber-csharpdependency at version9.0.40to ensure the resolvedPhoneNumbersassembly satisfies the version required byGlobalPhone.PhoneNumbersassembly version is greater than or equal to the version referenced byGlobalPhone.This prevents assembly binding failures that caused phone number parsing to fail and valid numbers to be reported as invalid.