Code review comment for lp:~sinzui/launchpad/list-urls-bug-463444

Revision history for this message
Curtis Hovey (sinzui) wrote :

This is my branch to fix team join emails have bad mailing list url.

    lp:~sinzui/launchpad/list-urls-bug-463444
    Diff size: 35
    Launchpad bug: https://bugs.launchpad.net/bugs/463444
    Test command: ./bin/test -vv -t teammembership-email-notification
    Pre-implementation: no one
    Target release: 3.1.10

= Fix team join emails have bad mailing list url =

The URL provided for subscribing to team emails is a launchpad.dev email.

== Rules ==

emailtemplates/team-list-subscribe-block has the server hard coded
teammembership-email-notification.txt will always pass.

    * Change the email template to use a %(editemails_url)s
      * Watch the test fail.
    * Add code to interpolar "+editemails" % canonical_url(person)
      * Watch the test pass.

== QA ==

    * Open the staging mailbox and mark all email read.
    * Add someone to your team on staging.
    * Update the mailbox and read the email to the new member.
    * Verify that the email's edit URL is:
      https://staging.launchpad.net/people/+me/+editemails

== Lint ==

Linting changed files:
  lib/canonical/launchpad/mailnotification.py
  lib/canonical/launchpad/emailtemplates/team-list-subscribe-block.txt

== Test ==

lp/registry/doc/teammembership-email-notification.txt did not change because
it was already testing for the correct result. The email template was
hard coded to always return the correct URL.

The test failed when the substitution variable was added. It passed after
a few trials make the URL from ILaunchpadRoot.

== Implementation ==

    * lib/canonical/launchpad/emailtemplates/team-list-subscribe-block.txt
      * Replaced the hard coded URL with a substiution variable.
    * lib/canonical/launchpad/mailnotification.py
      * Updated the code to create a URL from ILaunchpadRoot and to
        interpolate that into the team-list-subscribe-block text.

« Back to merge proposal