Skip to content

feat: AdvancedRequestModal preselects the calculated routing rule on create - #2832

Closed
Mczubi wants to merge 3 commits into
seerr-team:fallenbagel/feat/routing-rulesfrom
Mczubi:advanced-requests-routing-rules-apply
Closed

feat: AdvancedRequestModal preselects the calculated routing rule on create#2832
Mczubi wants to merge 3 commits into
seerr-team:fallenbagel/feat/routing-rulesfrom
Mczubi:advanced-requests-routing-rules-apply

Conversation

@Mczubi

@Mczubi Mczubi commented Apr 6, 2026

Copy link
Copy Markdown

Description

Reasoning

I discovered that there was an PR open which would solve most of the issues i have with assigning the correct service / profile automatically.
Testing this feature i saw that for non admin users, restricted to making only requests, this worked perfectly.
The rules were calculated correctly and the request could get approved by an admin.

But when using an administrative user, the advanced request modal would always fallback to the initial settings.
In other words, it did not use the calculation functionality introduced by the rules routing feature.
As this was a major letdown, i decided to implement a feature that would allow an admin user to also have the calculated default preselected, but still granting him the option to change the reasoning of the automation.

Detail

Implemented a new route GET /api/v1/request/resolved-route which returns the calculated output of
the routing rule using the same logic as the post request route.
This route then is used by the request modal to determine the correct
initial setting for a newly created request.
This grants admin users the same quality of life feature as a non admin one has.

This PR is a follow-up to PR #2452.
It adds preselection for advanced requests which depends on the changes introduced there.

How Has This Been Tested?

Tests were performed manually by performing the request creation action with both admin and non admin user.
Test instance was connected to my local running Sonarr / Radarr instances and ran against both of them.

Each new request created through my test instance landed on the correct Instance either chosen by the auto calculated rules or by the manual override performed by an admin user.

No affect was noticed on any other component throughout testing

Screenshots / Logs (if applicable)

Checklist:

  • I have read and followed the contribution guidelines.
  • Disclosed any use of AI (see our policy)
  • I have updated the documentation accordingly.
  • All new and existing tests passed.
    Ran cypress and all seemed fine
  • Successful build pnpm build
  • Translation keys pnpm i18n:extract
  • Database migration (if required)

Mczubi added 3 commits April 6, 2026 17:01
…ule on create

Implemented a new route GET /api/v1/request/resolved-route which returns the calculated output of
the routing rule.
This route then is used by the request modal to determine the correct
initial setting for a newly created request.
This grants admin users the possibility to have the same qol feature as
a non admin one.

re seerr-team#2452
@Mczubi
Mczubi requested a review from a team as a code owner April 6, 2026 16:37
@coderabbitai

coderabbitai Bot commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 96dc9b34-1848-4c3c-8cab-f3f85bb1baa0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@Mczubi Mczubi changed the title AdvancedRequestModal preselects the calculated routing rule on create feat: AdvancedRequestModal preselects the calculated routing rule on create Apr 6, 2026
@fallenbagel

fallenbagel commented Apr 6, 2026

Copy link
Copy Markdown
Member

The routing rules pr will be rebased for #2164 which literally adds the same support

This PR is the same thing as #2164

@fallenbagel fallenbagel closed this Apr 6, 2026
@Mczubi
Mczubi deleted the advanced-requests-routing-rules-apply branch April 6, 2026 19:58
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.

2 participants