Page MenuHomePhabricator

Misleading auto-email on self-commenting over an application
Closed, ResolvedPublicBUG REPORT

Description

Out of no particular need; I felt the need to add a certain point to my application for Cambridge University Press.

I received an instant mail that said:-

Thank you for applying for access to Cambridge University Press resources through The Wikipedia Library. There are one or more comments on your application that require a response from you. Please reply to these at https://wikipedialibrary.wmflabs.org/applications/evaluate/7445/ so we can evaluate your application.

which is blatantly misleading.

The interface ought not spam these emails when the poster of the comment is the applicant himself.

Event Timeline

This is definitely a bug, which should be avoided at https://github.com/WikipediaLibrary/TWLight/blob/3e3f2c69d3cb0442ff066b40822e119acc509ec1/TWLight/emails/tasks.py#L138.

I think we removed user_email from the comment object in https://github.com/WikipediaLibrary/TWLight/pull/220/files in which case this check would no longer work.

WingedBladesofGodric changed the subtype of this task from "Task" to "Bug Report".Mar 21 2019, 10:45 AM
Samwalton9-WMF moved this task from Incoming tasks to Done on the Library-Card-Platform board.

Ah. When we created our test comment objects we added the user_email field (https://github.com/WikipediaLibrary/TWLight/blob/master/TWLight/emails/tests.py#L55), but that information isn't actually passed through. Removing that line has the tests failing correctly.

Fixes filed at https://github.com/WikipediaLibrary/TWLight/pull/245