Closed rebeccacremona closed 1 year ago
Merging #3351 (87bafe1) into develop (b108f48) will increase coverage by
0.04%
. The diff coverage is85.71%
.
@@ Coverage Diff @@
## develop #3351 +/- ##
===========================================
+ Coverage 69.99% 70.04% +0.04%
===========================================
Files 55 55
Lines 7026 7054 +28
===========================================
+ Hits 4918 4941 +23
- Misses 2108 2113 +5
Impacted Files | Coverage Δ | |
---|---|---|
perma_web/perma/urls.py | 80.95% <ø> (ø) |
|
perma_web/perma/views/common.py | 82.54% <81.48%> (-0.60%) |
:arrow_down: |
perma_web/perma/forms.py | 95.49% <100.00%> (+0.16%) |
:arrow_up: |
With the optional "message" field removed:
Currently, when a user clicks on the “Flag Inappropriate” button on the “Record Details” tray of a Perma Link they are redirected to our Contact Form with a pre-filled message.
We decided to extract that into its own form for special handling: see ENG-96 for more discussion about details and design.
Flow
This PR adds a form with two new fields: a select/dropdown of reasons for reporting, and a text field requesting info on where the user found the Perma Link.
If the reporting user is logged in, their email address is pre-populated for them.
If required fields are missing, users are prompted to fill them in, but otherwise, they are directed to the "Thanks!" page.
Perma admins are sent an email something like:
Design decisions
I chose not to have the form perform any checks to see if the GUID in question exists. While no more expensive than a regular 404, I wanted to minimize database usage, should a bot slip past our protections and make a gazillion submissions. But, I only send the email if something is supplied for GUID.
I'm not that worried about it, but it could be that we'd rather check for the existence of the link instead.