Skip to content

[test]: Reproduce Record Set query scoping bug#8316

Open
rijulpoudel wants to merge 1 commit into
mainfrom
issue-8315
Open

[test]: Reproduce Record Set query scoping bug#8316
rijulpoudel wants to merge 1 commit into
mainfrom
issue-8315

Conversation

@rijulpoudel

@rijulpoudel rijulpoudel commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Fixes #8315

Summary by CodeRabbit

  • Tests
    • Added coverage to verify that queries generated from a source recordset remain correctly scoped to that recordset.
    • Confirmed the expected query-building context and source recordset identifier are passed during execution.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bc65593f-67d3-4277-8393-204c3f175b7a

📥 Commits

Reviewing files that changed from the base of the PR and between bc644bc and 631ed43.

📒 Files selected for processing (1)
  • specifyweb/backend/stored_queries/tests/test_execution/test_recordset.py

📝 Walkthrough

Walkthrough

Changes

Record Set Query Scoping

Layer / File(s) Summary
Source record set scoping validation
specifyweb/backend/stored_queries/tests/test_execution/test_recordset.py
Adds an isolated unit test confirming recordset(...) passes the source recordsetid through BuildQueryProps when building the query.
🚥 Pre-merge checks | ✅ 5 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Testing Instructions ⚠️ Warning PR description only says “Fixes #8315” and gives no run/test steps; the change is a single unit test on recordset()/build_query, so instructions are missing. Add a brief How to Test section with the exact pytest command for specifyweb/backend/stored_queries/tests/test_execution/test_recordset.py and note it checks recordsetid scoping.
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: reproducing a Record Set query scoping bug with a test.
Linked Issues check ✅ Passed The added test covers creating a Record Set from another Record Set and verifies the query is scoped to the source recordset.
Out of Scope Changes check ✅ Passed The change is limited to a focused unit test and does not introduce unrelated code changes.
Automatic Tests ✅ Passed The PR adds an automated unit test module, and no non-test code changes are present.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-8315

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.

@github-actions

Copy link
Copy Markdown

Warning

One or more dependencies are approaching or past End-of-Life.
Please plan upgrades accordingly.

STATUS=WARNING
NODE_VERSION=20
NODE_CYCLE=20
EOL_DATE=2026-04-30
DAYS_REMAINING=-76

--- Node.js ---
Version: 20
EOL: 2026-04-30
Status: WARNING

STATUS=OK
PYTHON_VERSION=3.12
PYTHON_CYCLE=3.12
EOL_DATE=2028-10-31
DAYS_REMAINING=839

--- Python ---
Version: 3.12
EOL: 2028-10-31
Status: OK

STATUS=WARNING
DJANGO_VERSION=4.2
DJANGO_CYCLE=4.2
EOL_DATE=2026-04-07
DAYS_REMAINING=-99

--- Django ---
Version: 4.2
EOL: 2026-04-07
Status: WARNING


@rijulpoudel

Copy link
Copy Markdown
Collaborator Author

@CodeRabbit Full Review

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@CarolineDenis

Copy link
Copy Markdown
Contributor

will review once we fix the issue in 12.2

@CarolineDenis CarolineDenis added this to the 7.12.2 milestone Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 📋Back Log

Development

Successfully merging this pull request may close these issues.

[test]: Add unit test for creating a Record Set from another Record Set

2 participants