Fix Clearing Ticket Priority Back to None - #505
Open
SarkarShubhdeep wants to merge 2 commits into
Open
Conversation
UI sent empty priority and the API rejected it; use a none sentinel and unset the field so priority can be cleared and filtered. Co-authored-by: Cursor <cursoragent@cursor.com>
🚀 Preview Deployment Ready
Preview auto-deletes when this PR is closed. |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes priority clearing by using a none sentinel and removing the persisted priority.
Changes:
- Adds None selection and filtering in ticket views.
- Unsets priority in the Meteor backend.
- Adds backend regression coverage.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/features/tickets/TicketsPage.tsx |
Adds None filtering and editing. |
src/features/tickets/TicketDetailPage.tsx |
Supports clearing priority with error handling. |
meteor-backend/tests/tickets.test.ts |
Tests priority clearing. |
meteor-backend/server/tickets.js |
Validates the sentinel and unsets priority. |
meteor-backend/server/main.js |
Adds none to input schemas. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+139
to
+143
| status && priority && !clearPriority | ||
| ? 'status-priority-changed' | ||
| : status | ||
| ? 'status-changed' | ||
| : 'priority-changed'; |
Collaborator
Author
There was a problem hiding this comment.
Agreed. Will preserve 'none' in the activity payload and classify combined status + priority clears as status-priority-changed; DB will still $unset.
Activity feeds treat null as missing; log the none sentinel and classify status+priority clears as a combined change. DB still unsets. Co-authored-by: Cursor <cursoragent@cursor.com>
Collaborator
|
Looks good ! |
Dharp02
approved these changes
Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #503: once a ticket priority is set (Low, High, etc.), it could not be cleared back to None — including after reload.
Cause: the UI sent an empty string / skipped the field, and the backend only allowed
low | medium | high | critical, so the clear never persisted.Changes:
nonesentinel in the priority Select (detail page + edit modal)$unsets priority whennoneis sentTest plan
Made with Cursor