fix(requests): avoid saving advanced request defaults as overrides - #3477
fix(requests): avoid saving advanced request defaults as overrides#3477fallenbagel wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe request modal omits server-default overrides. The request edit handler clears omitted override fields to ChangesRequest override handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to Advanced request settings now omit selections matching the active server defaults and clear obsolete overrides when requests are edited. The updated default synchronization prevents anime routing changes from retaining standard selections as overrides, with no remaining merge-blocking risk. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
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 |
…rrides The advanced request form submists whatever sits in its dropdowns, so every request made with advanced permissions saved a root folder, quality profile, language profile and tags even when the user changed nothing. A value saved that way is later read back as a deliberate override, which is what defeats the anime root folder once one is configured. The form now submits a field only when the selection differs from the default it presented, and reverting a field on an existing request clears it instead of leaving the previous value behind.
25f8cb4 to
6b41cce
Compare
Description
The advanced request form fills its dropdowns with the defaults for the server it is about to use and submits them regardless of whether the user touched anything, so every request made with advanced permissions stores a root folder, quality profile, language profile and tags. Once stored, those values are indistinguishable from a deliberate override when the request is sent on, and anything stored before an anime root folder was configured then wins over it for good. Turning on anime routing does nothing for requests that already existed, and editing one of them writes the stale value straight back.
The form now submits a field only when the selection differs from the default it
presented, so a request carries an override only where the user actually chose something else, and reverting a field back to the default on an existing request clears it rather than leaving the old value behind. Requests made before this still carry whatever was stored at the time. Since a series keeps the folder it was given when it was first added, there is nothing to correct for anything already sent.
Note
Requests still pending or unapproved when this ships may still carry a stale stored value until they're next edited, which resubmits them through the fixed form and clears it. Anything already added to Sonarr is unaffected either way, since
addSeriesnever rewritesrootFolderPathon an existing series.How Has This Been Tested?
Tested via the unit tests attached but should work manually too by:
Screenshots / Logs (if applicable)
Checklist:
pnpm buildpnpm i18n:extractSummary by CodeRabbit
Bug Fixes
Tests