Fix release field missing on admin interface #316
No reviewers
Labels
No labels
Closed As
Duplicate
Closed As
Fixed
Closed As
Invalid
discussions
easyfix
enhancement
task
ai-review-please
Backlog Status
Needs Review
Backlog Status
Ready
chore
documentation
points
01
points
02
points
03
points
05
points
08
points
13
pr2jira
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Sprint Status
Blocked
Sprint Status
Done
Sprint Status
In Progress
Sprint Status
Review
Sprint Status
To Do
Technical Debt
Work Item
Bug
Work Item
Epic
Work Item
Spike
Work Item
Task
Work Item
User Story
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Blocks
#279 Can't create milestones because there is nowhere to input the release
quality/blockerbugs
Reference
quality/blockerbugs!316
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/279-release-input"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Restores release field in admin interface form
Fixes 279
Assisted-by: Claude Code
WIP: Fix release field missing on admin interfaceto Fix release field missing on admin interfaceAI Code Review
📋 MR Summary
Fixes a bug where the
releasefield was missing from the admin interface by forcing SQLAlchemy relationship initialization.configure_mappers()call before Flask-Admin view registration to ensure relationships are initialized.TestMilestoneAdminFormandTestReleaseAdminFormto verify admin form fields.Detailed Code Review
The solution properly addresses the missing field issue caused by deferred relationship initialization in SQLAlchemy 2.0. The placement of
configure_mappers()is appropriate. The added tests are excellent for preventing future regressions.✅ Summary
🤖 AI Code Review | Generated with ai-code-review | Model:
gemini-3.1-pro-preview⚠️ AI-generated suggestions may be incorrect. Verify before applying. Not a replacement for human review.
Ready for review
There's a lot of repetition in the tests. Can we factor that out? I like using pytest parametrize, but however you want to do it...it'd just be nice not to repeat 99% of the code.
The initial commit misses
#on theFixesline. Please correct that in the final commit, thanks!@ -92,2 +93,4 @@# Force SQLAlchemy to initialize relationship metadata before Flask-Admin introspects# models to scaffold forms.For those of us not so strong in SQLAlchemy, can this also explain why? 🙂️
Expanded the comment.
I tested the code and it works. Surprisingly it adds more fields to the Milestone and Release forms, like Bugs, Updates and Succeeds. I don't know if they were a part of it originally or not, but it doesn't matter, we don't need to touch them. Most importantly, new releases and milestones can now be added directly from the admin UI.
@adamwill wrote in #316 (comment):
I don't have a strong opinion on this. I myself repeat code a lot in tests. While it can be often abstracted, it then hurts readability. Depends on a particular case. Here it's just two tests, not ten, so I don't really mind.
Ready for review
c73654e934d4beae03cb