Skip to content

request a reason from the user when suggesting dupes - #2790

Merged
chris48s merged 1 commit into
masterfrom
duplicates20260805
Aug 13, 2026
Merged

request a reason from the user when suggesting dupes#2790
chris48s merged 1 commit into
masterfrom
duplicates20260805

Conversation

@chris48s

@chris48s chris48s commented Aug 5, 2026

Copy link
Copy Markdown
Member

Refs https://app.asana.com/1/1204880536137786/project/1204880927741389/task/1213280348486701?focus=true

In this PR, we give the user a textbox at the point they suggest a duplicate so they can give reasons or supporting evidence which is then surfaced when we review.

I've based this off #2782 which also makes changes to the duplicates flow.

I've also made this PR a stack: https://docs.github.com/en/pull-requests/how-tos/stacked-pull-requests although in this case we might want to merge #2782 independently of this one. I've stacked them more for "avoid doing extra work solving merge conflict" reasons rather than "split one big feature down into easier to review chunks" reasons.

@chris48s
chris48s force-pushed the duplicates20260805 branch from 059be22 to 1e1a84e Compare August 5, 2026 13:31
@chris48s
chris48s marked this pull request as ready for review August 5, 2026 13:38
@chris48s
chris48s requested a review from symroe August 5, 2026 14:18
# reason. The initial GET request (used to check the other person
# ID before the reason has been entered on the review page) opts
# out of this by passing require_reason=False.
self.fields["suggestion_reason"].required = require_reason

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see why you've done this, but would it be better to just add a data migration to existing suggestions to add a 'no reason given' stock message, and then we don't need to complicate the rest of the code with this case?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can do that, and that would allow us to set blank=False on the model, but I don't think it would change much on the form. The reason this is a bit messy isn't really about the historic data. It is about the inline form on the person page.

Basically I wanted to keep this form

Screenshot at 2026-08-10 08-11-22

as a single input and just put the big "reason" box on the confirmation screen.

There are two reasons I wanted to do this:

  1. I didn't want to squeeze a multi-line textbox into that sidebar - it is too much clutter
  2. That first form interaction passes you to the next page using a GET request. ?person=123 is fine in a URL, but if you've written a long justification for why these two people are the same it all ends up in a query param in the URL, which feels messy (and possibly limits the length of response you can provide). I wanted to only show the reason box at the point where your next interaction is a POST.

In order to do that we have to disable the validation of suggestion_reason when we validate the initial GET request.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense

Base automatically changed from duplicates20260716 to master August 10, 2026 07:05
@chris48s
chris48s force-pushed the duplicates20260805 branch from 1e1a84e to 15a7046 Compare August 10, 2026 07:05
@chris48s

Copy link
Copy Markdown
Member Author

Interesting. Merging #2782 changes the base branch of this PR to master and automatically triggers a rebase.

@chris48s
chris48s merged commit 452be63 into master Aug 13, 2026
6 checks passed
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