Email for moderator changes

Bug #333378 reported by Paul Everitt on 2009-02-23
2
Affects Status Importance Assigned to Milestone
KARL3
Medium
Chris Rossi

Bug Description

Send an email whenever the moderator information changes.

Specification
===============

- Sent when there is a change of moderation status (add a moderator, remove a moderator) on any of the moderators

- Email is To: all new and old moderators. Meaning, if someone had their moderation status removed, they also get the email

- The email should look like this:

  - The To: line has all the old/new moderators, full name plus email

  - The From: line is the community email address, community-id@system_email_domain

  - Subject is "Change in moderators for Community Title"

  - The body shows: a link to the community, a listing of the previous list of
    moderators (with links to profile), and ditto for the new list

- HTML-only, no plaintext version

- There is an attachment to this issue that shows the HTML formatting

Implementation notes for ChrisR
================================

- Free to refactor

- Code will go in src/karl/karl/views/members.py, in def manage_members_view

- You get to this in the browser by going to /communities/default, click on "Members" link, then click on "Manage Members"

- Look for:

        for action in c_moderators:
            if action['remove']:

- I generated the emails using ZPTs, in src/karl/karl/views/templates/email_*.pt

- Find any ways to improve the tests

- I will include an example of what the emails should look like

- Make sure you ask questions via this task, I'll subscribe

Changed in karl3:
assignee: nobody → paul-agendaless
importance: Undecided → Low
milestone: none → m3
Paul Everitt (paul-agendaless) wrote :
description: updated
Paul Everitt (paul-agendaless) wrote :

Hi Chris, take a look at my writeup and see if it makes sense. I will be a subscriber to this issue, so just email the LP bug and I'll get it.

Changed in karl3:
assignee: paul-agendaless → chris-archimedeanco
importance: Low → Medium
Paul Everitt (paul-agendaless) wrote :

Looking at the code, I realize that the flow of control is going to take some work to explain where things go.

First, the formdata is organized using FormEncode's system of NestedVariables. This is similar to Zope's long-ago postpending of characters to form field names (e.g. :record). With NestedVariables, you can impose a key-oriented and record-oriented structure.

In our case, the form data comes in 3 piles: moderators, members, and invitations. Each of those map to a sequence of dicts, one for each row in the grid.

Perhaps the simplest way to do this task is to record the list of moderators beforehand, then the list of moderators afterwards. If they are different, send the emails.

Thinking about the user story for this, I know that it would be easier for me to grok what had occurred if the email presented not just the before and after states but a summary of what had changed:

The moderators for the Paul Private community have changed:

Fred is no longer a moderator.
Wilma is no longer a moderator.
Barney is now a moderator.

Previous Moderators:
Fred
Linus
Lucy
Wilma

New Moderators:
Barney
Linus
Lucy

I will implement such if there is no objection.

I agree, that's better.

--Paul

On Feb 24, 2009, at 9:57 AM, Chris Rossi wrote:

> Thinking about the user story for this, I know that it would be easier
> for me to grok what had occurred if the email presented not just the
> before and after states but a summary of what had changed:
>
> The moderators for the Paul Private community have changed:
>
> Fred is no longer a moderator.
> Wilma is no longer a moderator.
> Barney is now a moderator.
>
> Previous Moderators:
> Fred
> Linus
> Lucy
> Wilma
>
> New Moderators:
> Barney
> Linus
> Lucy
>
> I will implement such if there is no objection.
>
> --
> Email for moderator changes
> https://bugs.launchpad.net/bugs/333378
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Porting KARL to a new architecture: New
>
> Bug description:
> Send an email whenever the moderator information changes.
>
> Specification
> ===============
>
> - Sent when there is a change of moderation status (add a moderator,
> remove a moderator) on any of the moderators
>
> - Email is To: all new and old moderators. Meaning, if someone had
> their moderation status removed, they also get the email
>
> - The email should look like this:
>
> - The To: line has all the old/new moderators, full name plus email
>
> - The From: line is the community email address, community-
> id@system_email_domain
>
> - Subject is "Change in moderators for Community Title"
>
> - The body shows: a link to the community, a listing of the
> previous list of
> moderators (with links to profile), and ditto for the new list
>
> - HTML-only, no plaintext version
>
> - There is an attachment to this issue that shows the HTML formatting
>
>
> Implementation notes for ChrisR
> ================================
>
> - Free to refactor
>
> - Code will go in src/karl/karl/views/members.py, in def
> manage_members_view
>
> - You get to this in the browser by going to /communities/default,
> click on "Members" link, then click on "Manage Members"
>
> - Look for:
>
> for action in c_moderators:
> if action['remove']:
>
> - I generated the emails using ZPTs, in src/karl/karl/views/
> templates/email_*.pt
>
> - Find any ways to improve the tests
>
> - I will include an example of what the emails should look like
>
> - Make sure you ask questions via this task, I'll subscribe
>

I've noticed that the 'results' construct in 'manage_members_view' doesn't really compile info about what actually happened. Since that's in the same basic code as this bug, I'll roll a fix for that into this. This note is mostly to remind me to do that.

Changed in karl3:
status: New → In Progress
Changed in karl3:
status: In Progress → Fix Committed
Changed in karl3:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers