Relation picker (MultipleRecordPicker) removes a linked record instantly on uncheck — no confirmation, no undo #24676
Replies: 6 comments
|
Kind: Probably a feature request. The picker currently unlinks a selected relation immediately, while the report requests a new confirmation or undo safeguard. |
🟠 Sonarly Analysis — High SeverityUnconfirmed relation removal in MultipleRecordPicker Unchecking a selected relation immediately persists a destructive unlink. For junction relations, the associated junction record and its stored fields are deleted without confirmation or undo. Root CauseThe relation picker treats every checkbox change as an immediate persistence event instead of a draft change requiring confirmation.
The picker’s For ordinary one-to-many relations, For explicit junction relations, the same picker callback reaches The existing The triggering cause is the user interaction described in the report: an existing selected relation is unchecked. This deterministically invokes the destructive callback. The exact deployment, traffic pattern, first affected release, and data-change trigger are unknown because this issue has no observability data and the checked-out repository does not contain the reported v2.32.0 release metadata. Blame commit: Suggested FixUpdated Analyzed by Sonarly · View full analysis |
|
Hi everyone! 👋 I've just opened a PR to address this here: #24665. I implemented the suggested intercept step using the ConfirmationModal to prevent accidental unlinking. Let me know if you need any changes or adjustments during review! |
|
Hi @massimilianoalu-art not sure it's a bug, done on purpose. Record edition/update (unset a relation is record edition) does not have confirmation flow for other field types |
|
Hi @etiennejouan, thanks for looking at this, but I'd push back on "by design" here — the response conflates two very different categories of edit. Why relation unlinking isn't like other field edits:
The actual inconsistency: PR #8818 already established that Twenty treats deleting a related record as dangerous enough to need a confirmation modal. Unlinking via the picker checkbox is the same category of action — severing a relationship that took deliberate effort to create — but currently gets less protection than deletion, not equal protection. The bug isn't "editing needs confirmation" as a blanket rule; it's that this one specific edit path has a materially higher blast radius than the field types it's being grouped with, and the UI gives it zero visual weight to match. Why this isn't hypothetical for us: we ended up locking the entire object at the permission level (canUpdateObjectRecords: false) to stop this in our workspace, because field-level canUpdateFieldValue: false on the relation field doesn't block the picker either — so there's currently no scoped mitigation available short of removing update access to the whole object. That's a pretty blunt instrument for what should be a narrow, well-defined UX fix. Could this be reopened as a feature request for a confirmation step (or an "are you sure" / undo toast) specifically on relation-picker uncheck, rather than closed outright? I see there is already a PR for that. Thanks, |
|
@etiennejouan just to let you know that unfortunately, and I'm very sorry because I believe this project has a lot of potential, we had to switch platforms due to this issue, which I consider a showstopper. But I'd love to hear what the community thinks... All the best, |
Uh oh!
There was an error while loading. Please reload this page.
Bug Description
Unchecking an already-linked record in the relation picker (the checkbox/search dropdown used to edit a ONE_TO_MANY relation, e.g. a Company's "People" column, or a Person's/Course's relation to a custom join object) removes the association immediately, with no confirmation step and no undo. This is inconsistent with the confirmation modal already added for the sibling action — deleting a related record entirely from a record's detail-page relation list (#8818, merged Dec 2024) — which explicitly cited "safety... because this action can be disruptive" as the rationale.
Steps to reproduce:
The link is severed on click, no confirmation, no way to undo from the UI.
Why this matters:
Environment: self-hosted, twentycrm/twenty:v2.32.0.
Expected behavior
Unchecking an already-linked record should prompt for confirmation before the association is actually removed, the same way #8818 gated the "delete related record" trash-icon action.
Technical inputs
MultipleRecordPicker/SingleRecordPicker (object-record module) appear to be the shared components behind this picker across several contexts (relation editing, filter drilldown, etc.), so a fix likely needs to scope the confirmation specifically to "removing an already-selected relation," not filter-picker usage.
All reactions