mysociety / writetothem

Write to your MP, MEP, & other elected representatives.
https://www.writetothem.com
Other
54 stars 11 forks source link

Councillor's email address not updating #372

Open MyfanwyNixon opened 7 years ago

MyfanwyNixon commented 7 years ago

I have recently chatted to @dracos about a few of these and he has fixed them, but since he's not in today I thought it might be more sense to ticket it (plus then the rest of the team knows about it too).

There seem to be a number of councillors whose email addresses are correct in match.cgi but who have a different entry in our database, which overrides this.

https://www.writetothem.com/admin/index.php?page=reps&rep_id=55468 is an example - he has a hastingsandryelabour.org.uk email address which is failing, but click through to cgi and he has a more standard hastings.gov.uk one.

Please could someone manually fix this so he has the correct email address and I can then re-send the user's mail which is currently stuck in the queue having bounced back with an 'email address unknown' status.

dracos commented 7 years ago

(Deleted rogue row with delete from representative_edited where order_id=18708; then resaved reps page to switch Unknown back to Email.)

I believe the issue is caused by keeping reps tab open when editing the person in match.cgi (as then the email address in reps tab is then out of date and updating Unknown to Email also stores that address by mistake). The reps page code should not be looking at the read-only fields, that would then fix the issue, it should only look at Method for a councillor.

struan commented 7 years ago

I've been through the database and I think I've fixed all the places where this is going to cause a problem in future.